rcgsheffield / conda-packages

A repository of custom conda packages
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

mpi4py all processes having same rank #2

Open ridago opened 5 years ago

ridago commented 5 years ago

I am new to MPI and trying to get mpi4py to work on SHARC.
I have a conda environment with python version 3.6.
I have only loaded the conda module, nothing else.
I have started an interactive session using the qrsh -pe mpi 2 command
Following the guide on http://docs.hpc.shef.ac.uk/en/latest/sharc/software/apps/python.html I added the repo to the conda config and installed openmpi and mpi4py to my current environment. This seemed to work fine with python 3.6 even though the guide does not specifically mention 3.6.
I tried testing the configuration using the following code:

from mpi4py import MPI
comm = MPI.COMM_WORLD  
name=MPI.Get_processor_name()  
print("hello world")  
print(("name:",name,"my rank is",comm.rank))

And running it using mpirun -n 2 python mpi_test.py The output I get is:

hello world name: sharc-node013.shef.ac.uk my rank is 0, my size is 1 hello world name: sharc-node013.shef.ac.uk my rank is 0, my size is 1

Which, as far as I can tell, is not what I should be seing.

ridago commented 5 years ago

Realised I should be using smp and not mpi for my use case so I won't be needing help on this after all.

willfurnass commented 5 years ago

Yes, mpi4py packages that support Intel Omni-Path interconnects (as used in ShARC) haven't yet been built for Python 3.6 or 3.7. Let us know if they are required.