Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support MPI launching through MPICH & variants #672

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

benkirk
Copy link

@benkirk benkirk commented Sep 12, 2024

Modulus Pull Request

Description

Checklist

Dependencies

Copy link
Collaborator

@Alexey-Kamenev Alexey-Kamenev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor comments.


# for multi-node MPI jobs, determine "addr" as the
# address of global rank 0.
if "localhost" == addr:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we don't really use Yoda conditions in Modulus code since assignment to var is a syntax error (unless you use walrus op which has a different syntax).

from mpi4py import MPI
comm = MPI.COMM_WORLD
addr = comm.bcast(socket.gethostbyname(socket.gethostname()), root=0)
except ImportError: pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking that it's ok to silence the exception without any warnings and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants