installing cross sections in ubuntu

862 views
Skip to first unread message

Lucas Beveridge

unread,
Nov 2, 2016, 3:58:13 AM11/2/16
to OpenMC Users Group
I've installed openMC using PPA in ubuntu per the instructions in the documentation, and it appears to be working. However, I can't run any input files because I get the error "No cross_sections.xml file was specified in settings.xml or in the CROSS_SECTIONS environment variable". Doesn't apt-get install the nndc cross-section data also?

If not, I assume I still need to execute the following (per the instructions in section 2.3 of the documentation)

cd openmc/data
python get_nndc_data.py

But I have no idea where the files/directories are installed.

Or am I missing something else altogether?

Paul Romano

unread,
Nov 2, 2016, 10:47:37 AM11/2/16
to Lucas Beveridge, OpenMC Users Group
Hi Lucas,

This was an oversight on our part -- the get_nndc_data.py script is not included in the PPA unfortunately (although this will be fixed for the next version). You can download a .zip or .tar.gz from here:


Once you extract the files, go to the data directory and run the get_nndc_data.py script and it should proceed normally. If you continue having issues, let us know.

Best regards,
Paul

--
You received this message because you are subscribed to the Google Groups "OpenMC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users+unsubscribe@googlegroups.com.
To post to this group, send email to openmc...@googlegroups.com.
Visit this group at https://groups.google.com/group/openmc-users.
For more options, visit https://groups.google.com/d/optout.

Lucas Beveridge

unread,
Nov 6, 2016, 1:37:25 AM11/6/16
to OpenMC Users Group, lucas.warpdr...@gmail.com
That seems to have worked, but after setting the environment variable CROSS_SECTIONS, I still get the 'no cross_sections.xml...' error. Instead, I have to set the OPENMC_CROSS_SECTIONS environment variable every time I open a terminal. Then I get the following error when trying to run a set of input files:

 Reading settings XML file...
 Reading cross sections XML file...
PARSE_ERR                 
81 runParser
           0
STOP 1

Am I still missing something?


On Wednesday, November 2, 2016 at 8:47:37 AM UTC-6, Paul Romano wrote:
Hi Lucas,

This was an oversight on our part -- the get_nndc_data.py script is not included in the PPA unfortunately (although this will be fixed for the next version). You can download a .zip or .tar.gz from here:


Once you extract the files, go to the data directory and run the get_nndc_data.py script and it should proceed normally. If you continue having issues, let us know.

Best regards,
Paul
On Wed, Nov 2, 2016 at 2:58 AM, Lucas Beveridge <lucas.warpdr...@gmail.com> wrote:
I've installed openMC using PPA in ubuntu per the instructions in the documentation, and it appears to be working. However, I can't run any input files because I get the error "No cross_sections.xml file was specified in settings.xml or in the CROSS_SECTIONS environment variable". Doesn't apt-get install the nndc cross-section data also?

If not, I assume I still need to execute the following (per the instructions in section 2.3 of the documentation)

cd openmc/data
python get_nndc_data.py

But I have no idea where the files/directories are installed.

Or am I missing something else altogether?

--
You received this message because you are subscribed to the Google Groups "OpenMC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users...@googlegroups.com.

Paul Romano

unread,
Nov 7, 2016, 2:44:17 PM11/7/16
to Lucas Beveridge, OpenMC Users Group
If you are using bash shell, you will need to set the environment variables in your .bash_profile, .profile, or .bashrc configuration file for them to apply to every session. Here's a primer on environment variables if you are not very familiar.

The error you are seeing results from having a malformed XML input file. Without seeing your input file, I couldn't tell you where your error is---only that you have one. Are you using the Python API to create XML input files or are you writing them directly?

Best,
Paul

To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users+unsubscribe@googlegroups.com.

Lucas Beveridge

unread,
Nov 8, 2016, 9:44:38 PM11/8/16
to OpenMC Users Group, lucas.warpdr...@gmail.com
I know the input files are good. My classmates have successfully run them. I also get the same error when I try to run any of the examples
included with openMC

Paul Romano

unread,
Nov 9, 2016, 7:20:20 AM11/9/16
to Lucas Beveridge, OpenMC Users Group
Lucas- would you mind sharing your cross_sections.xml file so we can help diagnose what may be going on?

Thanks,
Paul

To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users+unsubscribe@googlegroups.com.

Paul Romano

unread,
Nov 9, 2016, 7:26:10 AM11/9/16
to Lucas Beveridge, OpenMC Users Group
One potential mistake that would result in what you are seeing -- you need to set the OPENMC_CROSS_SECTIONS environment variable to the cross_sections.xml file itself, not just the directory, as in:

OPENMC_CROSS_SECTIONS=/home/user/openmc_data/cross_sections.xml

and not

OPENMC_CROSS_SECTIONS=/home/user/openmc_data/

On Wed, Nov 9, 2016 at 6:20 AM, Paul Romano <paul.k...@gmail.com> wrote:
Lucas- would you mind sharing your cross_sections.xml file so we can help diagnose what may be going on?

Thanks,
Paul

Lucas Beveridge

unread,
Nov 9, 2016, 6:10:54 PM11/9/16
to OpenMC Users Group, lucas.warpdr...@gmail.com
Adding cross_sections.xml to the environment variables worked! It ran! Thank you

Lucas Beveridge

unread,
Nov 16, 2016, 3:28:27 AM11/16/16
to OpenMC Users Group, lucas.warpdr...@gmail.com
new problem: Python does not see the openMC API. So, I can't write any python scripts to build input files, or use any of the Jupyter notebooks. Anaconda and Python all work perfectly fine

I'd really prefer not to write all my inputs manually as xml files.

Paul Romano

unread,
Nov 16, 2016, 7:40:54 AM11/16/16
to Lucas Beveridge, OpenMC Users Group
If you are using the PPA to install OpenMC, you would normally need to use the python interpreter installed from the Ubuntu repositories, not the conda-installed python. You can test this by running /usr/bin/python and then trying to 'import openmc'. You can try using the conda-installed python and adding /usr/lib/python2.7/dist-packages to your PYTHONPATH environment variable, but this may cause other issues.

On Wed, Nov 16, 2016 at 2:28 AM, Lucas Beveridge <lucas.warpdr...@gmail.com> wrote:
new problem: Python does not see the openMC API. So, I can't write any python scripts to build input files, or use any of the Jupyter notebooks. Anaconda and Python all work perfectly fine

I'd really prefer not to write all my inputs manually as xml files.

--

Lucas Beveridge

unread,
Nov 17, 2016, 3:28:48 AM11/17/16
to OpenMC Users Group, lucas.warpdr...@gmail.com
when trying to execute 'import openmc' I get an error saying there's no such module installed. I also tried setting PYTHONPATH to the conda installed python, and got even more errors

Ahmed K. Madani

unread,
Feb 22, 2017, 6:11:19 PM2/22/17
to OpenMC Users Group, lucas.warpdr...@gmail.com
i added cross_sections.xml in setting.xml file and it start running but it gave me an error 


it said ACE Library /opt/mcnp/data/endf70j does not exist 

how could i can solve this ?

Paul Romano

unread,
Feb 22, 2017, 6:32:41 PM2/22/17
to Ahmed K. Madani, OpenMC Users Group, lucas.warpdr...@gmail.com
In order to run your version of OpenMC, you need to have ACE cross section files. The cross_sections.xml tells OpenMC where to look for these ACE files, but they have to be present on your system. For more information, see here:

To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages