Skip to content

Issue with MPI in openseespy #298

@tanzeel970

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?

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