CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Configuring DAGMC 3.2.2
CMake Error at /home/williamjsmith15/dagmc_bld/DAGMC/DAGMC/CMakeFiles/Export/lib/cmake/dagmc/DAGMCTargets.cmake:111 (message):
The imported target "dagmc-shared" references the file
"/home/williamjsmith15/dagmc_bld/DAGMC/DAGMC/CMakeFiles/Export/lib/libdagmc.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/home/williamjsmith15/dagmc_bld/DAGMC/DAGMC/CMakeFiles/Export/lib/cmake/dagmc/DAGMCTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/home/williamjsmith15/dagmc_bld/DAGMC/DAGMC/DAGMCConfig.cmake:31 (include)
CMakeLists.txt:70 (find_package)
Any ideas at a solution? The libdagmc.so file is not in that location but I have followed the installation steps as per the DAGMC website.
Hi @willia.smith-14 and welcome to the community! Sorry to hear you’re having trouble building with DAGMC. Maybe @pshriwise (our local DAGMC expert) can chime in. In the meantime, if you don’t see the libdagmc.so file, what do you see in the /home/williamjsmith15/dagmc_bld/DAGMC/DAGMC/CMakeFiles/Export/lib/ directory?
Thanks for posting here. Hopefully we can get you up and running with a few tweaks to your CMake line. What would be helpful for me to see is the CMake command you used when building DAGMC if you wouldn’t mind sharing it.
Is this run in the build folder of the OpenMC install location? When running it there it just spits out:
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
cmake [options] -S <path-to-source> -B <path-to-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Run 'cmake --help' for more information.
-Doptimize=on: command not found
-DOPENMC_USE_DAGMC=ON: command not found
-DCMAKE_PREFIX_PATH=: command not found
-DHDF5_PREFER_PARALLEL=off: command not found
I’ve tried running it on a fresh install of OpenMC and running it after the cmake .. , make and make install as shown in the installing from source guide.
Ah, yeah the CMake command I provided above was missing the path to the source directory. I’ve updated it to include that based on the path used above.
I have been following this thread because Im stuck with the same problem. While trying to plot the geometry or run openmc I get the following error:
RuntimeError: DAGMC Universes are present but OpenMC was not configuredwith DAGMC
I have followed the instruction given in the answers above but I still run into the same error. Im new to openmc and dagmc so I don’t really know how to solve this error or from where I could find some solutions. I would greatly appreciate it, if someone could lead me in the right direction.
There are a couple of reasons you might be seeing this error. You’ll want to make sure you’ve built the OpenMC library and executable with DAGMC enabled (instructions here).
Also, if you built OpenMC once without DAGMC, installed the Python API, and then re-built OpenMC with DAGMC support, do make sure you install the Python API again so the updated OpenMC library gets included with the Python package. The plotter will rely on this library rather than the one placed in the installation location by CMake.
I hope this helps! Let us know if you have any additional questions.
For clarity, the command I provided above should be run in the OpenMC build directory rather than DAGMC. Also, that command is intended to be run on one line, but from your post and from @willia.smith-14’s above, I can see that it won’t work that way if copied into a terminal. Here’s an updated version of that command that will execute as one line if copied in.