Question about multiple runtimes on MPI for MCNP6

  • Thread starter Thread starter Alexander Camargo
  • Start date Start date
  • Tags Tags
    Nodes Simulation
Click For Summary

Discussion Overview

The discussion revolves around the behavior of MCNP6 when run in MPI mode across multiple nodes, specifically addressing the generation of multiple runtpe files and outputs. Participants explore the implications of using different commands and configurations in a parallel computing environment.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant notes that increasing the number of nodes results in multiple runtpe files and outputs, questioning if this is normal behavior for MCNP in MPI mode.
  • Another participant suggests that the observed behavior is typical for MCNP running in MPI mode, but emphasizes the importance of understanding the variations in outputs.
  • A participant expresses concern about the necessity of using both srun and mpirun in the command, suggesting that srun may replace mpirun.
  • One participant explains that srun is a cluster system scheduler used to configure nodes and CPUs, while noting that the MCNP manual specifies using mpirun for multiple CPUs.
  • Another participant speculates that the command structure might lead to separate instances of MCNP running on each node, which could explain the multiple outputs.
  • A participant unfamiliar with MPI suggests that having multiple output files seems unhelpful and questions the configuration being used.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of using both srun and mpirun, and whether the behavior of generating multiple outputs is expected or indicative of a configuration issue. The discussion remains unresolved regarding the optimal command structure for running MCNP6 in MPI mode.

Contextual Notes

There are uncertainties regarding the specific configurations required for optimal performance in a slurm system, and the implications of using both srun and mpirun together are not fully clarified.

Alexander Camargo
Messages
37
Reaction score
10
When I increase the number of nodes in the simulation (e.g., -N 3), the number of runtpe files and outputs generated equals the number of nodes; in this case, three runtpe files and three outputs appear. Each output has a different simulation time, and sometimes even different results. Is this normal when running MCNP in MPI mode? The command I'm using is:

srun -N 3 mpirun -np 48 mcnp6.mpich i=input
 
Engineering news on Phys.org
what you’re experiencing is normal behavior for MCNP running in MPI mode, but understanding the reasons behind the variations can help you manage and interpret the outputs more effectively
 
pete94857 said:
what you’re experiencing is normal behavior for MCNP running in MPI mode, but understanding the reasons behind the variations can help you manage and interpret the outputs more effectively
Hi Pete94857.

Thank you for the help. I've seen some MPI script examples similar to mine, but they didn't generate this many runtpe files. I thought I might be doing something wrong or missing a command.
 
  • Like
Likes   Reactions: pete94857
@pete94857, careful with that and have a read of the rules.
[Mentor Note: The post by Pete that Alex is referring to has been deleted]

@Alexander Camargo, are you sure you need srun AND mpirun in the command? I don't know if it will make a difference but I think srun may just replace mpirun. What is srun, is it slurm and if so what is slurm?
 
Last edited by a moderator:
  • Like
Likes   Reactions: berkeman
Alex A said:
@pete94857, careful with that and have a read of the rules.

@Alexander Camargo, are you sure you need srun AND mpirun in the command? I don't know if it will make a difference but I think srun may just replace mpirun. What is srun, is it slurm and if so what is slurm?
The srun is the cluster system scheduler, used to configure the number of nodes and CPUs to be used. The MCNP manual states that the command to use multiple CPUs is 'mpirun -np X', where X is the number of CPUs, followed by mcnp6.mpi (MCNP6 compiled for MPI) and input/output file parameters. I have 3 nodes, each with 16 CPUs.

It's working; I can utilize nodes and CPUs. However, it always creates a separate simulation for each node used. If I use only 1 node, it runs faster than using 3 (since processing is divided when using 3), generating 3 runtpe and 3 output files.

My question is: is this normal behavior for MCNP6 MPI version or do I need to configure something better?
 
I've never tried to make MPI work before so this is a bit of a guess. If you are getting multiple output files, that seems unhelpful. OMP generates multiple threads in a shared memory system, MPI runs a separate copy of the whole program and problem in each node.

I have read that srun replaces the mpirun command in a slurm system so I wonder if by feeding srun with an MPI split, but still running mpirun without MPI (srun -N 3 mpirun -np 48) into mcnp that also isn't being told to use MPI, creates 3 separate MCNP instances that don't know about the others.

I don't really know what a slurm system is or that you are using one. I'm drawing from this document. The example command for OMP+MPI is,
Code:
srun –n X mcnp6.mpi i=athena1_hex.txt tasks 36
That is for one MPI manager and X-1 MPI worker nodes with 36 threads per worker node. X must be 3 or more.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
19K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
17
Views
5K
Replies
1
Views
4K