deleted and redownloaded openMC using the quick install guide through conda. Code compiles fine but aborts when plotting. Here is the file. matt_test.py (4.0 KB)
this is the error i receive:
Traceback (most recent call last):
File “/Users/christianandresclaro/code/matt_test”, line 99, in
plot = hex_universe.plot(pixels=(600, 600), color_by=‘material’, colors={fuel_kernel: ‘black’, coolant: ‘yellow’})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/christianandresclaro/miniconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/universe.py”, line 446, in plot
model.plot_geometry(False, cwd=tmpdir, openmc_exec=openmc_exec)
File “/Users/christianandresclaro/miniconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/model/model.py”, line 828, in plot_geometry
openmc.plot_geometry(output=output, openmc_exec=openmc_exec)
File “/Users/christianandresclaro/miniconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py”, line 154, in plot_geometry
_run(args, output, cwd)
File “/Users/christianandresclaro/miniconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py”, line 125, in _run
raise RuntimeError(error_msg)
RuntimeError: OpenMC aborted unexpectedly.
when i run the openmc command in the terminal i get this:
| The OpenMC Monte Carlo Code
Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
License | License Agreement — OpenMC Documentation
Version | 0.14.0
Date/Time | 2024-01-24 15:02:27
OpenMP Threads | 16
Reading settings XML file…
Reading materials XML file…
Reading geometry XML file…
Preparing distributed cell instances…
Reading plot XML file…
so i was able to get through with a source install but im running into a new issue:
Traceback (most recent call last):
File “/Users/christianandresclaro/code/matt_test”, line 100, in
hex_universe.plot(pixels=(600, 600), color_by=‘material’, colors={fuel_kernel: ‘black’, coolant: ‘yellow’})
File “/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/universe.py”, line 446, in plot
model.plot_geometry(False, cwd=tmpdir, openmc_exec=openmc_exec)
File “/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/model/model.py”, line 823, in plot_geometry
if self.is_initialized:
File “/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/model/model.py”, line 160, in is_initialized
import openmc.lib
File “/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/lib/init.py”, line 32, in
_dll = CDLL(_filename)
File “/Users/christianandresclaro/miniconda3/lib/python3.10/ctypes/init.py”, line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/lib/libopenmc.dylib, 0x0006): tried: ‘/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/lib/libopenmc.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/lib/libopenmc.dylib’ (no such file), ‘/Users/christianandresclaro/miniconda3/lib/python3.10/site-packages/openmc/lib/libopenmc.dylib’ (no such file)
I went through a source install. For some reason it just wasn’t storing the file in the correct directory. I searched for the file on my computer and just moved it to the directory that it wanted. Solved the issue.