Frequently Asked Questions
By default, all FAQ entries are shown on this page. However, they can be filtered by clicking the labels below. Once one or more labels are active, only the FAQ entries that match the active labels are shown.
How can I fix a self-signed SSL certificate failure during nuclear data download?
The Nuclear Data Downloader provided with the MCNP6.3 installer can fail to download files as a result of self-signed certificate verification failure. If this happens, the output looks like:
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED ] certificate verify failed: self-signed certificate in certificate chain (_ssl.c: 1000)>
On macOS, Python relies on its own certificate files, which may not be installed by default (here is a Stack Overflow discussion about it). Open a Finder window and browse to Applications, then the Python folder, and you should see both ReadMe.rtf
and Install Certificates.command
. Open the ReadMe to verify it has a section called "Certificate verification" that advises you to run (double click on) the Install Certificates.command
file. If so, please do that. The data downloader should now work as expected.
If the above does not apply to your situation, please contact us with your system details. In the meantime, a possible workaround to prevent this error is to modify data/nd_manager/src/nd_manager/utility.py
just after the context
variable is created. That is, after Line 29, insert these two lines:
context.check_hostname = False context.verify_mode = ssl.CERT_NONE
Thanks to Zain Karriem for independently suggesting and confirming the workaround and to Jörn Meissner for testing it. Thanks to Alex Graham for allowing us to find a more direct fix by installing the certificates.
What are some text editor options for MS Windows?
VS Code: Powerful but easy to use editor that has MCNP syntax highlighting. Highly recommended.
Notepad++: Powerful but easy to use editor that has MCNP syntax highlighting plugins such as this one and this one. Recommended.
Sublime Text: Powerful but easy to use editor that has MCNP syntax highlighting. Recommended.
Vim: Very powerful but hard-to-use editor that has a variety of MCNP syntax highlighters including this one and this one. Recommended to those who know it or wish to learn it.
Emacs: Powerful but somewhat hard-to-use editor that has a variety of MCNP syntax highlighters including this one. Recommended to those who know it or wish to learn it.
Wordpad: Installed on MS Windows by default. Be sure you are editing and saving files as "plain text." Recommended if you cannot install something better.
Notepad: Installed on MS Windows by default. Less reliable with respect to whitespace management than Wordpad on older versions of Windows. Generally not recommended.
Why is the nuclear data downloader failing to load a DLL for the _ssl
module?
Sometimes users on Windows using Anaconda will see an error like ImportError: DLL load failed while importing _ssl
coming from the Anaconda ssl
module when trying to download the nuclear data. To fix this, one can either run the downloader again from the Anaconda Prompt (a command prompt with extra environment variables set, installed along with Anaconda), or one can manually update the user or system PATH
environment variable before running the downloader. The steps to do the latter follow.
The goal is to add the Anaconda Library\bin
directory to the PATH
environment variable. The error message should contain the path to the Anaconda installation directory. For example if the installed Anaconda is in a user's home directory, then Anaconda might be located at C:\Users\YourUsername\Anaconda3
. The fix is to add to the PATH
variable by running this command: set PATH=%PATH%;C:\Users\YourUsername\Anaconda3\Library\bin
. After that, run the downloader again and Anaconda should be able to find the DLL and continue successfully.
Can I register for a "Full" MCNP class?
No. An MCNP class marked "Full" means that both the class and its waitlist are full and registration is no longer possible.
Even online classes cannot accommodate students beyond their stated capacity. The maximum enrollment for each class is based on the number of instructors available and maintains an appropriate student-to-instructor ratio to ensure an effective learning environment.
Because of the need to limit the size of MCNP classes, all prospective students are encouraged to register for classes as early as possible.
Can you send me a certificate of participation for the MCNP User Symposium?
Please send an email to Sarah Haag, sarahh@lanl.gov to request a certificate.
Can I register for an MCNP class without an MCNP license (e.g., while I'm waiting for it)?
No. Having an MCNP license is required to register for, and attend, all MCNP classes. This is why providing the date the license was issued is required during registration.
Only having requested a license does not guarantee that the license will be issued by the time of the class, so it is unfair to reserve classroom slots for students who are incompletely equipped to attend when other students who already have licenses may be able to use those attendence slots.
Can I use the MCNP CLOUD service to participate in an MCNP class?
Yes, the MCNP CLOUD license is considered valid for attending an MCNP class and you can use this service for the class; however, no standard LANL-offered class is specifically designed for MCNP CLOUD users. As a result, following along with exercises may be difficult because of the additional queueing time involved in MCNP CLOUD calculations and lack of interactive plotter capability.
Furthermore, for MCNP classes held on-site at LANL, although the speed and reliability of WIFI access is usually good, a stable connection to the MCNP CLOUD cannot be guaranteed.
Because the MCNP CLOUD service is provided by Oak Ridge National Laboratory, all feedback regarding this service should be sent to the RSICC email.
Why do I keep running out of space on Linux with the nuclear data downloader?
The Nuclear Data Downloader provided with the MCNP6.3 installer uses either a RAM-resident tmpfs
file system or the /tmp
directory on Linux to store extracted nuclear data as it works. If tmpfs
or the /tmp
directory is undersized relative to the data being downloaded, out-of-space errors like what follows are observed.
Traceback (most recent call last): File './nd_manager', line 22, in main.main(current_path) File '.../nd_manager/src/nd_manager/main.py', line 233, ... File '.../nd_manager/src/nd_manager/installing.py', line 105, ... File '.../nd_manager/src/nd_manager/installing.py', line 44, ... File '.../tarfile.py', line 2267, ... File '.../tarfile.py', line 2333, ... File '.../tarfile.py', line 2331, ... File '.../tarfile.py', line 2411, ... File '.../tarfile.py', line 2464, ... File '.../tarfile.py', line 263, ... OSError: [Errno 28] No space left on device
A workaround to prevent this is to redefine the temporary location used by the Nuclear Data Downloader before using the Nuclear Data Downloader. An example of doing this in the Bash and Zsh shells is with the command export TMPDIR=""
and then running the Nuclear Data Downloader as normal.
Thanks to Grant Goodyear and Steve Burnham for identifying this issue and potential workarounds.
How should I reference the MCNP code in reports and papers?
The release notes and/or the manuals are often the best way(s) to refer to/cite the MCNP code.
Can you send me a copy of the MCNP code?
No. See this webpage for how to get the code.
Can the MCNP code run on GPUs (graphics cards, video processors, etc.)?
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.
What does xlib: unable to connect to server display
mean?
Start by reading "How do I install an X11 server on Microsoft Windows?". If you have installed an X11 server, make sure it is running and then see the question on "How do I modify the MCNP Windows environment batch file for X11 plotting?".
How do I install an X11 server on Microsoft Windows?
The first thing required for the MCNP6.2 plotter to work on Windows is an X11 Server. The MCNP team generally recommends Xming, and although other alternatives exist, the instructions in this section are specific to Xming.
After downloading Xming, simply run the installer executable. We recommend choosing the install location as somewhere you have full write access to without requiring administrative privileges. A location like C:\Users\YourUsername
or C:\temp\Xming
is a good choice. The minimum installation of Xming that works with the MCNP code is shown in the following seven screenshots: 1, 2, 3, 4, 5, 6, 7.
Alternatively, if the install location is not C:\Program Files
and the other options are left defaulted, then during installation, multiple error messages (6) will pop up. You can click 'ignore' on each of these errors and the software should successfully install. Of course, the Xming software may also be installed without any changes to the options (including the install location) if the user has administrator privileges.
To confirm the successful installation of Xming, after the installer finishes, a small orange and black 'X' symbol should appear in the system tray (the area of the taskbar next to the clock; sometimes collapsed into a '^' symbol). If you do not see this symbol, search for 'Xming' in the Windows search area, or navigate to the Xming folder in your start menu and choose 'Xming'.
How do I modify the MCNP Windows environment batch file for X11 plotting?
After getting an X11 server, the MCNP DISPLAY
environment variable must be set appropriately. By default, the MCNP installer writes the mcnp_env_620.bat
file to C:\Users\YourUsername\mcnp_env_620.bat
. Locate this file and edit it by right-clicking on it and choosing to edit. It may also be opened directly from your favorite raw-text editor like Notepad/Notepad++, VIM, etc. Locate the line that reads: if "%DISPLAY%" == "" set DISPLAY=0:0
. For Xming, change the aforementioned line to: if "%DISPLAY%" == "" set DISPLAY=localhost:0
. You must ensure that there are
With an X11 server installed, and the mcnp_env_620.bat
file setting the DISPLAY
variable appropriately, the geometry and tally plotter should work properly when the MCNP Command Prompt is restarted. If it doesn't work, try restarting the computer and ensure the X11 server is running. Then launch the MCNP Command Prompt and try the plotter again. If this still doesn't work, please email mcnp_help@lanl.gov with the steps you've taken to get the plotter working.
How do I get the X11 MCNP Plotter to Work on macOS?
Users on macOS should install the XQuartz software. After installing and rebooting, the geometry and tally plotters should work. If they do not work, please email mcnp_help@lanl.gov with the steps you've taken to get the plotter working.
How do I get the X11 MCNP Plotter to Work on Linux?
Linux users should have X11 servers installed by default. If you cannot get the plotter to work, ensure your system has the appropriate packages installed. These vary between systems, and the MCNP team cannot make a general recommendation for Linux.
Can you help me use the MCNP Cloud service?
The Internet-based "cloud" installation of the MCNP code is provided by Oak Ridge National Laboratory. Because of this, all questions regarding this service should be sent to the RSICC email.
How do I build MCNP5, MCNP6.1, or MCNP6.2 on Linux?
The MCNP6 build system uses the GNU version of make
, 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 multiple make
instances does not work, since some of the tests must be run in a certain order.
- To run the tests sequentially:
make test
- To run the tests threaded:
make test NTRD=8
-j 8
flag for make
, and do not set it via the MAKEFLAGS
environment variable.Why isn't MCNP6.2 working on macOS 10.15 or later?
Beginning with macOS 10.15 (Catalina), the default user shell has been changed from Bash to Z shell. The MCNP code expects to be installed in a Bash shell and thus sets up Bash dotfiles with the necessary environment variables. The current shell can be queried with the following command: echo $SHELL
. If the terminal reports "/bin/zsh", continue reading. If the terminal reports "/bin/bash", first try starting a new termial session. If that still doesn't work, send an email to mcnp_help@lanl.gov.
A user has several options to get the MCNP code working on macOS with Z shell:
- The simplest option is to execute the following command:
echo "source ~/.bashrc" >> ~/.zshrc && source ~/.zshrc
. This command will read in the entirety of the primary Bash dotfile file to the Z shell dotfile. A user should be aware of any unexpected lines that may be present in the Bash dotfile that are not relevant to the MCNP code configuration. Undoing changes to the Z shell dotfile is as simple as opening the file in a text editor (e.g.,vim ~/.zshrc
oropen ~/.zshrc
) and removing the "source ~/.bashrc" line. - The other option is to open both the Bash and Z shell dotfiles (~/.bashrc and ~/.zshrc respectively) side by side in a text editor. In the Bash dotfile, find the line "#### path for mcnp620". Copy the lines starting here through "ulimit -S -s hard" from the Bash dotfile and paste them at the end of the Z shell dotfile.
If you have followed these steps and are still encountering issues, send an email to mcnp_help@lanl.gov.
Where is the mcnp_env.bat
file on Microsoft Windows?
The 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: echo %HOMEDRIVE%/%HOMEPATH%
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.
How can I run MCNP6 from a Windows .bat
script without using the MCNP Command Window?
You need to use a text editor to create a file, called myjob.bat
below, 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 the myjob.bat
file that 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.
How can I fix the error "This application was unable to start correctly (0xc000007b)
"?
A typical situation / way of posing this question is "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:
- Earlier versions of Windows 7 did NOT include this DLL file:
msvcr100.dll
A 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). - If you don't want to do that (or aren't allowed), then here is a workaround:
- In the folder
MCNP_CODE\MCNP6\bin\windows
there are files namedx64_msvcr100.dll
andx86_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. - Copy that file to the folder
MCNP_CODE\bin
and then rename it (in the new folder) asmsvcr100.dll
- Then, also copy that new file to the folder
MCNP_CODE\MCNP6\bin
- In the folder
Caution
This msvcr100.dll
file will be used by anything that needs it, if you run from the MCNP command window, since it puts MCNP_CODE\bin
first on its execution search path. If you someday bring your Windows 7 up to date, then you will want to delete the file MCNP_CODE\bin\msvcr100.dll
You may want to discuss either of the above fixes with your computer system admininistrator.
Why is the installation for MCNP6.2 failing at Step 4 and I don't get the square blue desktop icon?
It may be that your IT/IT Security team has disabled running Visual Basic script (.vbs
) files. Please work with them to ensure you can execute a .vbs
file. If you can, it may instead be that the file is not associated properly with the Windows-based Script Host. This StackOverflow post or similar may provide a way to overcome this. A normal Windows MCNP6.2 installation should behave as shown here.
How does parallel processing work in (recent versions of) the MCNP code?
This discussion pertains 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:
- Threading: OpenMP threading on a single multicore computer (eg, laptop, office computer) or on a single node of a server or cluster (eg, 1 node in a cluster, with 1 or more processors or cores sharing memory)
- MPI: Message-passing between nodes on a cluster using some external MPI environment and libraries.
What is thread parallelism in the MCNP code?
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.
For example, 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.
What is (MPI) task parallelism in the MCNP code?
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 command cd ~/MyMCNP/MCNP_CODE/MCNP6 && make CONFIG='intel plot omp openmpi' install
.
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 mcnp6.mpi i=myinp.txt
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...
How can I combine thread and task parallelism?
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 by mpirun -np 8 -bynode mcnp6.mpi i=myinp.txt tasks 16