MCNPX On Windows

From New IAC Wiki
Jump to navigation Jump to search

Running MCNPX with MPI On Windows

You want to run one more processes than the number of cores you have. So on a quad-core system you would use -np 5 and a dual-core system would use -np 3.

On Windows 7 sometimes the DATAPATH environment isn't carried forward to the processes lauched from mpi, so the command lime must include -env DATAPATH C:\mcnpx\data.

All the arguments that follow mcnpx are sent to mcnpx like normal (ie n=, m=, o= etc.). The order of arguments to mpiexec do matter: -np must precede mcnpx.

Examples

  • dual-core without setting -env
mpiexec -np 3 mcnpx i=...
  • quad-core using -env (Windows 7 only?)
mpiexec -env DATAPATH C:\mcnpx\data -np 5 mcnpx i=...

mpiexec may prompt you for an mpi password, which was entered during setup (and is probably empty). It may also prompt you for an account name and password; the one you use to log in is fine.

Remember that it's not difficult to run on Brems if you need more power: Running With Slurm

Installing MCNPX with MPI On Windows

  • Copy MCNPX directory from a working machine
  • Install MPICH2
  • MPICH2 password should be set to something easy to remember (or empty)
  • My Computer->Properties->Advanced->Environment Variables->System Variables
    • Set DATAPATH=C:\MCNPX\DATA
    • Add ;C:\MCNPX\BIN;C:\Program Files\MPICH2\bin to the end path
      • In Windows 7 64-bit, use C:\Program Files (x86)\MPICH2\bin
  • Restrict firewall permissions to 127.0.0.1 on mpich