Child pages
  • Mox_mpi4py
Skip to end of metadata
Go to start of metadata

Below is for mox.hyak. For ikt.hyak see this link Hyak mpi4py


The Python package mpi4py provides bindings for the Message Passing Interface (MPI) standard.

Below is the link to the documentation for mpi4py:

http://mpi4py.readthedocs.org/en/stable/tutorial.html

Install your own copy of anaconda.

See section on "Install Anaconda Python" at below link

Hyak python programming

Issue below command to verify that you are using your own copy of Anaconda Python. The path which is printed should contain your own userid.

which python


Install mpi4py

module load gcc_4.8.5-impi_2017

pip install mpi4py --user

Run a mpi4py program

One mox node can run 28 processes. During an interactive session, you cannot run across multiple nodes.

module load gcc_4.8.5-impi_2017

mpirun -n 28 python my_mpi_program.py

In a batch job your mpi program can run across multiple nodes. In a batch job, do not specify the -n option since mpirun will automatically run across all the cores on all the nodes allocated to your batch job.

See below link for a sample MPI sbatch script.

Mox_mpi 


  • No labels