-
Notifications
You must be signed in to change notification settings - Fork 374
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
How to launch an AMReX program with MPI? #4339
Comments
Maybe you are missing |
No, this option is set as YES as default. I wonder how i can run this with more mpi process after compilement.😭 |
You mentioned cmake, so I thought you had a build issue. If that is not the case, then you just run it as any other MPI programs. There is nothing special about an amrex code in terms of how to run it. I am actually not sure what your question is. I am just guessing. Is this what you are looking for ? https://www.mpich.org/static/docs/v3.0.x/www1/mpiexec.html If you still have questions, could you provide more details of what you do exactly step by step? |
Thanks for your patience! Actually I'm writing a code about MHD and I notice that AMReX initialize MPI automatically but always with only one MPI process. I tried to run it with mpirun or mpiexec(for example My question is whether I am allowed to increase the number of MPI processes initialized by AMReX. |
But your screenshot shows |
if you run mpiexec -n 8 ./GRMHD, then you see 8 copies of that screenshot by which I mean "do the same thing". I expect to see "MPI initialized with 8 MPI processes" for instance. |
I suspect you have multiple MPI libraries on you system and you are mixing mpicxx from one version with mpiexec from another. You want to remove either openmpi or mpich and keep only one version, or use |
Thanks for your advice! I'll check if I install two different version of MPI. |
@WeiqunZhang I'm encountering the same issue. On Ubuntu 24.04 I have the default mpich installed (4.2.0) and have confirmed that is the only MPI on the machine. Running the following with a fresh clone (noting that
Attempting to run in parallel produces the same behavior - N independent jobs each thinking they are running in serial.
This problem has occurred up on all of my machines that are running ubuntu 24.04. |
What do you see with |
And what do you see with |
@WeiqunZhang output of
and
|
This looks like an Ubuntu bug. Maybe you can install openmpi to work around the issue or wait for the bug fix. |
Wow, it is surprising that such a significant bug would make it into the .1 LTS for 2024. That is very unfortunate.. I suppose we'll switch to openmpi then. Oddly I remember encountering this same issue several years back (2017), and basically the fix was to switch from openmpi to mpich... |
Is there any automatic settings for an AMReX program to run it with MPI? I just write one and it always run with only ONE mpi process. I tried to use mpich/mpirun to run it with more process but it just re-run a same program instead of run it parallel-ly. What settings shall I write in CMakeLists.txt or command line?
The text was updated successfully, but these errors were encountered: