software:mpi4py:caviness

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
software:mpi4py:caviness [2020-04-23 12:45] anitasoftware:mpi4py:caviness [2020-11-02 12:03] – [Recipes] anita
Line 82: Line 82:
 </code> </code>
  
-and modify it for your application. There are several ways to communicate the number and layout of worker processes. In this example, we will modify the job script to specify a single node and 4 cores using ''#SBATCH --nodes=1and ''#SBATCH --ntasks=4'' It is important to to carefully read the comments and select the appropriate options for your job.  Make sure you specify the correct VALET environment for your job selecting the correct version for Python 2 or 3 for python-mpi. Since the above example is based on Python 2, we will specify the correct Python version as follows:+and modify it for your application. There are several ways to communicate the number and layout of worker processes. In this example, we will modify the job script to specify a single node and 4 cores using ''#SBATCH --nodes=1'' and ''#SBATCH --ntasks=4'' It is important to to carefully read the comments and select the appropriate options for your job.  Make sure you specify the correct VALET environment for your job selecting the correct version for Python 2 or 3 for python-mpi. Since the above example is based on Python 2, we will specify the VALET package as follows:
  
 <code bash>  <code bash> 
Line 147: Line 147:
 [3] [ 0.  2.  4.  6.  8. 10. 12. 14. 16. 18. 20. 22. 24. 26. 28. 30.] [3] [ 0.  2.  4.  6.  8. 10. 12. 14. 16. 18. 20. 22. 24. 26. 28. 30.]
 </code> </code>
 +
 +===== Recipes =====
 +If you need to build a Python virtualenv based on a collection of Python modules including mpi4py, then you will need to follow this recipe to get a properly-integrated mpi4py module.
 +
 +  * [[technical:recipes:mpi4py-in-virtualenv|Building a Python virtualenv with a properly-integrated mpi4py module]]
  • software/mpi4py/caviness.txt
  • Last modified: 2021-04-27 16:21
  • by 127.0.0.1