OpenMC 'aborts unexpectedly' when plotting

Hi all,

Sorry for the silly question, but I’m a bit confused on how to make a slice plot. I’m using Jupyter, and when I run my code with

!openmc --plot

the .png file is generated but it is empty due to the warning of

zsh:1: number expected

When I use openmc.plot_geometry() or openmc.plot_inline() I get an error that says

libpng warning: Application built with libpng-1.4.12 but running with 1.6.37

Any help is appreciated. Thanks!

Sorry to hear this is giving you trouble @madhofs. That’s really strange. If you list the resulting png file from the !openmc --plot command with ls -l, what do you see?

Hello @pshriwise, thanks for your response! So sorry for the delayed reply.

When I run !openmc --plot and then use ls -l in the directory, the line for the .png appears as

-rw-r--r-- 1 username staff 0 Dec 5 09:49 plot_5.png

Let me know if I can provide anything else for you. Thanks!

Thanks for the info @madhofs. It appears that the library found for the openmc executable at runtime isn’t the same as the one it was linked to when it was built. Do you see the same warning if you run openmc -p from the command line (in the same directory with your jupyter notebook)?

I have the same problem. When running the plot() function on my universe, it gives me RuntimeError: OpenMC aborted unexpectedly. If i run openmc -p from the same directory as my jupyter notebook, the following is written out

(openmc-env) <retracted> % openmc -p
                                %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2022 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.2
       Date/Time | 2023-01-23 12:50:14
   MPI Processes | 1
  OpenMP Threads | 8

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 Reading geometry XML file...
 Reading tallies XML file...
 Preparing distributed cell instances...
 Reading plot XML file...

 =======================>     PLOTTING SUMMARY     <========================

Plot ID: 2
Plot file: plot_2.png
Universe depth: -1
Plot Type: Slice
Origin: 5 2 3
Width:   50   50
Coloring: Cells
Basis: XZ
Pixels: 400 400

 Processing plot 2: plot_2.png...
libpng warning: Application built with libpng-1.4.12 but running with 1.6.39
zsh: segmentation fault  openmc -p

so the same error as for @madhofs. I installed OpenMC according to the normal procedure on the website, and I am using a conda environment.

@Kladdy See the related thread here: