zhuminjie / OpenSeesPyDoc

OpenSeesPy Documentation
http://openseespydoc.readthedocs.io
Other
141 stars 105 forks source link

Issue with MPI in openseespy #298

Open tanzeel970 opened 8 months ago

tanzeel970 commented 8 months ago

Hi i want to use a HPC to run a multiple process analysis I have gone through the video https://www.youtube.com/watch?v=vjGm2kM5Ihc and was running the simple hello world code, i keep on getting no of processes to be 1, even though i am using multiple inputs ! /usr/mpi/gcc/openmpi-4.1.5rc2/bin/mpiexec -np 4 python codename.py following is the output Hello World 0 Total number of processes 1 Hello World 0 Total number of processes 1 Hello World 0 Total number of processes 1 Process 0 Terminating Hello World 0 Total number of processes 1 Process 0 Terminating Process 0 Terminating Process 0 Terminating

To check if the issue was with MPI i ran the following python code using the same command ! /usr/mpi/gcc/openmpi-4.1.5rc2/bin/mpiexec -np 4 python codename.py from mpi4py import MPI

comm = MPI.COMM_WORLD pid = comm.Get_rank() np = comm.Get_size()

print('Hello World from process:', pid) if pid == 0: print('Total processes:', np)

and i get the following output Hello World from process: 3 Hello World from process: 1 Hello World from process: 0 Total processes: 4 Hello World from process: 2 Am i missing something?

zhuminjie commented 8 months ago

Might be due to mpi version and implementation. We compiled it using MPICH.

tanzeel970 commented 8 months ago

Thank you for your kind response, I loaded the MPICH using module in the a separate environment and it worked