Last active
December 13, 2019 14:41
-
-
Save basnijholt/02ecc6f95abc687a925c23c6ee83e84a to your computer and use it in GitHub Desktop.
testing-mpi4py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from mpi4py.futures import MPIPoolExecutor | |
| def test(x): | |
| import time | |
| time.sleep(1) | |
| return x | |
| if __name__ == '__main__': | |
| with MPIPoolExecutor() as executor: | |
| image = executor.map(test, range(60*60)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #PBS -l nodes=3:ppn=20 | |
| #PBS -V | |
| #PBS -N mpi4py-test | |
| cd $PBS_O_WORKDIR | |
| . ~/.bashrc | |
| mpiexec -n 60 python -m mpi4py.futures mpi4py-test.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment