Skip to content

Issue with MPI in openseespy #298

Open

Description

@tanzeel970

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?

Activity

  1. zhuminjie commented on Dec 26, 2023

    @zhuminjie
    Owner

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

  2. tanzeel970 commented on Dec 28, 2023

    @tanzeel970
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions