Rate This Document
Findability
Accuracy
Completeness
Readability

Running and Verification

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Verify mpi4py.
    cd /path/to/mpi4py
  3. Create an example.
    1. Create a test.py file.
      vim test.py
    2. Press i to enter the insert mode and add the following content to the file:
      from mpi4py import MPI
      comm = MPI.COMM_WORLD
      rank = comm.Get_rank()
      print ('My rank is ', rank)
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Perform the verification.
    mpirun --allow-run-as-root -np 4 python3 test.py

    Information similar to the following is displayed: