Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate the correct platform-dependent parallel spawn command for examples #56

Open
MTCam opened this issue Aug 9, 2020 · 4 comments

Comments

@MTCam
Copy link
Member

MTCam commented Aug 9, 2020

In the current run_examples.sh . It should pass on most workstations which have mpiexec. However, this line will fail on LC machines due to it not using an appropriate parallel spawn command.

For quartz, we can easily just replace mpiexec with srun: srun -n <nproc> -ppdebug python <thing>-mpi.py. There is similar command for Lassen.

We could easily add hostname-parsing to the run_examples.sh script and be done with it (until the next unique platform) - but I wanted to ask the group. Is there a better, cleaner, or more robust way?

@MTCam
Copy link
Member Author

MTCam commented Aug 25, 2020

Related issue #69

@matthiasdiener
Copy link
Member

Instead of parsing the hostname, I would suggest looking for the presence of srun, jsrun, mpirun etc., and using the one that is found as the spawn command.

@MTCam
Copy link
Member Author

MTCam commented Sep 1, 2020

Instead of parsing the hostname, I would suggest looking for the presence of srun, jsrun, mpirun etc., and using the one that is found as the spawn command.

Uh oh.

[mtcampbe@lassen708:~]$ which srun
/usr/tcetmp/bin/srun
[mtcampbe@lassen708:~]$ which mpirun
/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2020.06.25/bin/mpirun
[mtcampbe@lassen708:~]$ 

@matthiasdiener
Copy link
Member

Instead of parsing the hostname, I would suggest looking for the presence of srun, jsrun, mpirun etc., and using the one that is found as the spawn command.

Uh oh.

[mtcampbe@lassen708:~]$ which srun
/usr/tcetmp/bin/srun
[mtcampbe@lassen708:~]$ which mpirun
/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2020.06.25/bin/mpirun
[mtcampbe@lassen708:~]$ 

Is that an issue?

if [[ command -v lrun ]]; then
# Run with lrun
elif [[ command -v srun ]]; then
# Run with srun
elif [[ command -v mpirun ]]; then
# Run with mpirun
fi
#etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants