MCNP6.2, Either or both of:
No. See How to Get the Code.
No. MCNP6 can run in parallel using the different cpu-cores in any computer (threading), or using different nodes in a cluster (MPI), or both. See the discussion of parallel processing in this FAQ page.
While Monte Carlo codes can certainly be adapted to vector-style parallelism using GPUs, many structural and algorithmic changes are required. The effort required to adapt a very large, mature Monte Carlo code such as MCNP to GPUs is huge, and there are no current plans to do so.
An Internet-based "Cloud" installation the MCNP code is provided by Oak Ridge National Laboratory. All questions regarding this service should be sent to the RSICC email.
The MCNP6 build system uses the GNU version of
so you need to be careful about any environment variables that
affect building and testing.
The MCNP developers always compile the code with multiple threads:
make build GNUJ=8
which would be equivalent to setting the environment variable MAKEFLAGS as:
export MAKEFLAGS=' -j 8 ' && make build
For running REGRESSION tests or other tests, parallel execution using
make instances does not work, since some of the
tests must be run in a certain order.
make test NTRD=8
-j 8flag for
make, and do not set it via the
If you use the Terminal application on Macs, note that it reads only the
.bash_profile from your home directory when it starts, and it does NOT read
The MCNP6 install scripts put the settings for the environment variables
DATAPATH into your
.bashrc file, but NOT into your
To fix this, do the following:
cd && cat .bashrc >> .bash_profile
Exit from the Terminal app, and then restart it. Type
env to see if the
DATAPATH settings include the MCNP locations.
If you use the X11 app and an xterm window, the
.bashrc file is read
when the app starts. You can check the environment variables by typing
Also be aware that at some places (e.g., at LANL), the sysadmins put special
.bash_profile files into your home directory, or possibly
even alter the system defaults, to enforce certain security policies. If that is
true at your location, then you may need to check the files or talk to the sysadmins
about what to do.
To fully utilize the MCNP plotting, testing, and build procedures, users should make sure that basic unix utility commands and X11 plot support are available. On older versions of Mac OS X, X11 support was provided via an SDK and the necessary unix commands (eg, make) were available by default.
Apple changed very much for OS X 10.8 (Mountain Lion). Before installing MCNP on Mountain Lion, these steps are necessary, and only take minutes:
This is for people who build MCNP6 from the source code on Macs. Others can disregard.
I recently upgraded a MacBook Pro from OS X 10.8 to OS X 10.9 (Mavericks), and ran into trouble building MCNP6 from source coding. Apple has continued to change a number of things, without providing any useful guidance. Here is what I had to do to be able to build MCNP6:
xcode-select --install(Need sudo privileges to do it this way)
stdlibusage: Edit the file
MCNP6/Source/Darwin.gcf, Search for
CCFLAGS, Append this to the end of the
cd MCNP6 && make realclean && make build GNUJ=4 && make test NTRD=4
mcnp_env.bat file is created when you install MCNP6. It is
placed into the home folder of the user who performed the installation. If you
can't find it, do this from a command window:
If someone else installed MCNP6 for you (e.g., a system administrator or
computer support person), you should ask them to copy the
mcnp_env.bat file from their folder
%HOMEDRIVE%%HOMEPATH% to yours.
You need to use a text editor to create a file, called
that includes commands to set the proper Windows environment variables for
MCNP6 and Windows, and then runs MCNP6.
For example, assuming that
C:\my_mcnp\ is where you installed MCNP, put the
following in the
myjob.bat file. Then you can run the job by double-clicking
myjob.bat file, which contains:
@ PATH C:\my_mcnp\MCNP_CODE\bin;%PATH% @ set DATAPATH=C:\my_mcnp\MCNP_DATA @ set DISPLAY=localhost:0 start/wait mcnp6 i=myinp.txt tasks 4 pause
The start/wait and pause are optional. The start/wait allows the batch file to pick up where it left off if you interrupt a run, then return to it (after checking status or plotting). The pause keeps the window open after MCNP6 completes, so that you can see any messages. (Thanks to Mark Hogue for the suggestions.)
xlib: unable to connect to server display"
During the MCNP6 installation process for Windows computers, a file called
mcnp_env.bat is created in your
%HOME% folder. This
file is invoked when the MCNP command window is started (i.e., by
double-clicking on the MCNP command window desktop shortcut). It sets several
environment variables that are used by Windows and MCNP:
By default, the
mcnp_env.bat file sets the
%DISPLAY% variable to "
:0.0", which works for most X11
servers. However, Xming needs a different setting: "
This is easy to fix. Use Notepad or Wordpad to open the file mcnp_env.bat in
%HOME% folder and
@ set DISPLAY=:0.0" to "
@ set DISPLAY=localhost:0". Note: Do NOT include any trailing blanks.
After that, MCNP plotting with Xming should work correctly.
This application was unable to start correctly (0xc000007b)"?
Typical situation: I've tried multiple installs of the MCNP6 package from RSICC on two machines with Windows 7 and one in XP. In all cases with Windows 7 the installation looks good, but it will not run. I get this error when trying to run the test problems: The fact that I succeeded on the XP machine suggests that this is not user error. Any suggestions?
We have seen this problem a number of times -- it's due to Windows, not MCNP. Here are 2 possible solutions:
msvcr100.dllA later WIndows upgrade did include that DLL file. So, one possible solution to your problem is: upgrade your Windows 7 to the latest version (i.e., apply patches or updates).
MCNP_CODE\MCNP6\bin\windowsthere are files named
x86_msvcr100.dll. If you have a 64-bit Windows OS (probably), then choose the x64_ version; if a 32-bit Windows OS, then choose the x86_ version.
MCNP_CODE\binand then rename it (in the new folder) as
CAUTION: This msvcr100.dll file will be used by anything that needs it, if
you run from the MCNP command window, since it puts
first on its execution search path. If you someday bring your Windows 7 up to
date, then you will want to delete the file
You may want to discuss either of the above fixes with your computer sysadmin.
This section refers to the July 2013 release of MCNP6.1 from RSICC and newer versions of the MCNP code.
MCNP6 supports 2 types of parallel processing that can be used separately or together:
All recent computers use multi-core processors. By default, MCNP6 will only
use one of the processor cores (to avoid consuming all of the system resources).
If you want to use more than one CPU core, just add
tasks n to the
MCNP execution line command, where "n" is the number of CPU cores that you want
MCNP6 to use.
mcnp6 i=myinp.txt tasks 4 would direct MCNP6 to use
4 cpu-cores when following histories. The value "n" should be chosen considering
your specific processor: For my laptop, with an Intel i7 with 2 cpu-cores and 2
hyperthreads per core, one might use "tasks 4".
The default version of MCNP6 from the installation includes the aforementioned threading capability. It is not necessary to copy other versions, rename executables, etc. Just run the code with the appropriate "tasks n" supplied.
If you want to run MCNP6 using multiple nodes on a cluster, then you must first install an MPI package on your cluster.
For Windows clusters, the precompiled MCNP6 executable is based on the
MPICH2 package obtained from Argonne
National Laboratory. That was found to be reasonably easy to install in
precompiled binaries. The MCNP6 executable for 64-bit Windows is found at
MCNP_CODE\MCNP6\bin\windows\mcnp6_windows_x86_64_omp_mp and should
be copied (and renamed) to
MCNP_CODE\bin\mcnp6_mpi.exe. You can
then run an MPI job as
mpirun -np 8 mcnp6_mpi i=myinp.txt.
For macOS and Linux, you will need to install a version of MPI. The MCNP
development team uses OpenMPI from The
OpenMPI website. Then, you must compile the MCNP6 executable yourself, so
that the proper linkage to MPI libraries is made. For example, one might use the
cd ~/MyMCNP/MCNP_CODE/MCNP6 && make CONFIG='intel plot omp
When MCNP6 is built for MPI, an executable called mcnp6.mpi is created in
the MCNP_CODE/MCNP6/bin directory. You should also copy this to the
MCNP_CODE/bin directory. Then an MPI job can be run as
mpirun -np 8
If MPI is installed, and
an mcnp6.mpi executable was built, then threading and MPI can both be used. For
an 8-node cluster with 16 cpu-cores per node, you could run with 128 cpu-cores
mpirun -np 8 -bynode mcnp6.mpi i=myinp.txt tasks 16
Unfortunately, most clusters are configured differently, with job queuing systems such as Moab or LSF, different "module" packages, different versions of MPI, etc. Installing MPI & having the cluster software configured consistently is not for beginners. You may need to consult with your cluster administrator, or enlist the aid of some talented young student...