You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated sorcha docs on Parallelization
In multi_sorcha.py, fixed the order of parameters config and stats in the function run_sorcha, and removed path_inputs as it wasn't being used. Also updated the code so that --norbits is no longer required. Now the code will split the ObjIDs provided in the input file and --chunksize into different cores as equally as possible using the np.array_split function.
Updated multi_sorcha.sh and hpc.rst to match these changes to multi_sorcha.py
* Used black
Copy file name to clipboardExpand all lines: docs/hpc.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,13 @@ Below is a more complex example of a Slurm script. Here, multi_sorcha.sh calls m
43
43
.. note::
44
44
We provide these here for you to copy, paste, and edit as needed. You might have to some slight modifications to both the Slurm script and multi_sorcha.py, for example if you're using ``Sorcha`` without calling the stats file.
45
45
46
-
``multi_sorcha.sh`` requests many parallel Slurm jobs of ``multi_sorcha.py``, feeding each a different --instance parameter. After changing ‘my_orbits.csv’, ‘my_colors.csv’, ‘my_pointings.db’, ‘my_config.ini’, and the various Slurm parameters to match the above, you could generate 10 jobs, each with 4 cores running 25 orbits each, as follows::
46
+
``multi_sorcha.sh`` requests many parallel Slurm jobs of ``multi_sorcha.py``, feeding each a different --instance parameter. After changing ‘my_orbits.csv’, ‘my_colors.csv’, ‘my_pointings.db’, ‘my_config.ini’, and the various Slurm parameters to match the above, for a file of 1000 objects you could generate 10 jobs with 4 cores running 25 orbits each, as follows::
47
47
48
-
sbatch --array=0-9 multi_sorcha.sh 25 4
48
+
sbatch --array=0-9 multi_sorcha.sh 100 4
49
49
50
50
You can run multi_sorcha.py on the command line as well::
This will generate a single output file. It should work fine on a laptop, and be a bit (but not quite 4x) faster than the single-core equivalent due to overheads.
0 commit comments