carronj / plancklens

Planck 2018 lensing pipeline
Other
21 stars 17 forks source link

new mpi detection #40

Closed Sebastian-Belkner closed 1 year ago

Sebastian-Belkner commented 1 year ago

os.environ['_'] contains info about what called the python command, thus, for srun python3 file.py, it will read /path/to/srun.

I believe this is the equivalent of cond4mpi4py = not has_key('NERSC_HOST') or (has_key('NERSC_HOST') and has_key('SLURM_SUBMIT_DIR')) on NERSC, and also works on CSCS.