# Problem on the openmc.run() ,cross sections file

**URL:** <https://openmc.discourse.group/t/problem-on-the-openmc-run-cross-sections-file/5252>\
**Category:** User Support\
**Created:** [February 18, 2025, 12:34pm UTC](https://openmc.discourse.group/t/problem-on-the-openmc-run-cross-sections-file/5252 "2025-02-18T12:34:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ouma11](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@ouma11](https://openmc.discourse.group/u/ouma11)\
**Post date:** [February 18, 2025, 12:34pm UTC](https://openmc.discourse.group/t/problem-on-the-openmc-run-cross-sections-file/5252/1 "2025-02-18T12:34:13Z")

</div>

hi ,I’m a new in openMC,i have a problem on the openmc.run?  
%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
############### %%%%%%%%%%%%%%%%%%%%%%%%  
################## %%%%%%%%%%%%%%%%%%%%%%%  
################### %%%%%%%%%%%%%%%%%%%%%%%  
#################### %%%%%%%%%%%%%%%%%%%%%%  
##################### %%%%%%%%%%%%%%%%%%%%%  
###################### %%%%%%%%%%%%%%%%%%%%  
####################### %%%%%%%%%%%%%%%%%%  
####################### %%%%%%%%%%%%%%%%%  
###################### %%%%%%%%%%%%%%%%%  
#################### %%%%%%%%%%%%%%%%%  
################# %%%%%%%%%%%%%%%%%  
############### %%%%%%%%%%%%%%%%  
############ %%%%%%%%%%%%%%%  
######## %%%%%%%%%%%%%%  
%%%%%%%%%%%

```
             | The OpenMC Monte Carlo Code
   Copyright | 2011-2024 MIT, UChicago Argonne LLC, and contributors
     License | https://docs.openmc.org/en/latest/license.html
     Version | 0.15.0
    Git SHA1 | 84fb85977f46e162fea8f5a20ea653a3ec62ac24
   Date/Time | 2025-02-17 22:37:48

```

MPI Processes | 1  
OpenMP Threads | 4

## Reading settings XML file… ERROR: No cross\_sections.xml file was specified in materials.xml or in the OPENMC\_CROSS\_SECTIONS environment variable. OpenMC needs such a file to identify where to find data libraries. Please consult the user’s guide at [https://docs.openmc.org/](https://docs.openmc.org/) for information on how to set up data libraries.

MPI\_ABORT was invoked on rank 0 in communicator MPI\_COMM\_WORLD  
Proc: [[4301,0],0]  
Errorcode: -1

## NOTE: invoking MPI\_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them.

* * *

RuntimeError Traceback (most recent call last)  
Cell In[105], line 1  
----\> 1 openmc.run()

File ~/miniforge3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py:314, in run(particles, threads, geometry\_debug, restart\_file, tracks, output, cwd, openmc\_exec, mpi\_args, event\_based, path\_input)  
261 “”“Run an OpenMC simulation.  
262  
263 Parameters  
(…)  
305  
306 “””  
308 args = \_process\_CLI\_arguments(  
309 volume=False, geometry\_debug=geometry\_debug, particles=particles,  
310 restart\_file=restart\_file, threads=threads, tracks=tracks,  
311 event\_based=event\_based, openmc\_exec=openmc\_exec, mpi\_args=mpi\_args,  
312 path\_input=path\_input)  
 → 314 \_run(args, output, cwd)

File ~/miniforge3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py:125, in \_run(args, output, cwd)  
122 error\_msg = ‘OpenMC aborted unexpectedly.’  
123 error\_msg = ’ '.join(error\_msg.split())  
 → 125 raise RuntimeError(error\_msg)

RuntimeError: No cross\_sections.xml file was specified in materials.xml or in the OPENMC\_CROSS\_SECTIONS environment variable. OpenMC needs such a file to identify where to find data libraries. Please consult the user’s guide at [https://docs.openmc.org/](https://docs.openmc.org/) for information on how to set up data libraries. -------------------------------------------------------------------------- MPI\_ABORT was invoked on rank 0 in communicator MPI\_COMM\_WORLD Proc: [[4301,0],0] Errorcode: -1 NOTE: invoking MPI\_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. --------------------------------------------------------------------------

---

<div class="post-metadata">

**Author:** ![jluqueg](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jluqueg](https://openmc.discourse.group/u/jluqueg)\
**Post date:** [February 19, 2025, 5:07am UTC](https://openmc.discourse.group/t/problem-on-the-openmc-run-cross-sections-file/5252/2 "2025-02-19T05:07:41Z")

</div>

Hi there. It seems that you have not set up your cross sections yet. Follow the instructions in the documentation:  
[https://docs.openmc.org/en/v0.12.1/usersguide/cross\_sections.html](https://docs.openmc.org/en/v0.12.1/usersguide/cross_sections.html)  
The easiest way to go about it is to use the pre-generated HDF5 libraries from [Data Libraries | OpenMC](https://openmc.org/data-libraries/) and then assign an environment variable to the cross\_sections.xml file inside the library.
