-
Hey, I'm having an issue where my simulation hangs during the setup, before entering the main loop when using I don't believe this is a bug with Athena as I can run the provided pgens with static mesh refinement without issue (e.g. slotted_cylinder). I also don't think this a problem with the cluster I am using as I see the same behaviour on another cluster. Some more info: Setup loop:
Boundary conditions are of the form:
During the setup, in my pgen, I manage to get print statements out of: But no other boundary functions Does anyone have any ideas? Cheers! Version info
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Adding new MPI commands is somewhat dangerous. In this case, there may well be a problem with the fact that Athena++ has 1 MPI rank <-> 1 Mesh <-> 1 or more MeshBlocks ProblemGenerator() is called by each MeshBlock on the Mesh in turn. So if you have more MeshBlocks than ranks, the global communication is almost certainly not doing what you expect. If different Meshes have different numbers of MeshBlocks, then this code will hang, as different ranks will call the MPI routines different numbers of times. The code might work correctly if you have exactly 1 MeshBlock per rank. Otherwise, the communication pattern needs to be
|
Beta Was this translation helpful? Give feedback.
-
Ah yes that is the case - matching the number of ranks to the number of MeshBlocks solved this. |
Beta Was this translation helpful? Give feedback.
Adding new MPI commands is somewhat dangerous. In this case, there may well be a problem with the fact that Athena++ has
1 MPI rank <-> 1 Mesh <-> 1 or more MeshBlocks
ProblemGenerator() is called by each MeshBlock on the Mesh in turn. So if you have more MeshBlocks than ranks, the global communication is almost certainly not doing what you expect. If different Meshes have different numbers of MeshBlocks, then this code will hang, as different ranks will call the MPI routines different numbers of times.
The code might work correctly if you have exactly 1 MeshBlock per rank. Otherwise, the communication pattern needs to be