File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ dev-install_conda:
31
31
conda env create -f environment-dev.yml && conda activate pylops_mpi && pip install -e .
32
32
33
33
lint :
34
- flake8 pylops_mpi/ tests/ examples/
34
+ flake8 pylops_mpi/ tests/ examples/ tutorials/
35
35
36
36
tests :
37
37
mpiexec -n $(NUM_PROCESSES ) pytest tests/ --with-mpi
@@ -48,4 +48,8 @@ servedoc:
48
48
49
49
# Run examples using mpi
50
50
run_examples :
51
- cd examples && sh mpi_examples.sh $(NUM_PROCESSES ) && cd ..
51
+ sh mpi_examples.sh examples $(NUM_PROCESSES )
52
+
53
+ # Run tutorials using mpi
54
+ run_tutorials :
55
+ sh mpi_examples.sh tutorials $(NUM_PROCESSES )
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# Folder path containing example files
4
+ cd $1 || exit ;
4
5
folder_path=" ."
5
6
6
7
# Number of mpi processes
7
- num_processes=$1
8
+ num_processes=$2
8
9
9
- if [ " $num_processes " -lt 2 ]; then
10
- echo " Number of processes should be greater than or equal to 2, $num_processes < 2"
11
- else
10
+ if [ " $num_processes " -ge 2 ]; then
12
11
for file in " $folder_path " /* .py; do
13
12
echo " Running $file with $num_processes processes"
14
13
mpiexec -n " $num_processes " python " $file "
15
14
done
15
+ else
16
+ echo " Number of processes should be greater than or equal to 2, $num_processes < 2"
16
17
fi
You can’t perform that action at this time.
0 commit comments