svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DAGMC build cmake command failure

NikosNikolopoulos opened this issue · comments

Good evening,

I am trying to install the CUBIT-plugin in my Windows PC using WSL2 - Ubuntu 20.04 LTS. I reached until the DAGMC Build section after executing the cmake command I get this error:

CMake Error at cmake/DAGMC_macros.cmake:222 (add_library): Cannot find source file: /home/nikos/plugin-build/DAGMC/DAGMC/src/pyne/pyne.cpp.

I have thoroughly followed the instructions in the previous sections, any ideas on how to proceed?

Best,
Nikos.

Hello,
We have some ongoing change on the DAGMC repo we haven't updated the documentation for it yet...
Pyne has moved into a git submodules, and cmake should take care of this for you, but we now have python as a dependencies for building dagmc...
To help debuging your dagmc build I would need to get a look at your full cmake output...

if you are looking for prebuilt Svalinn plugin for Cubit, you can take a look at the release page: https://github.com/svalinn/Cubit-plugin/releases that contains binaries for the plugin for ubuntu 18.04 20.04 and Mac OS for Cubit 17.1, 2021.3-2021.5....

we also have a beta version of the plugin for native windows installation (direct installation on windows) available here: https://uwmadison.box.com/s/rvjexbdbktby03ibfkgfar3cwzl68vk6

Hello,

okay the full output I get after executing the cmake command is:

-- Submodule update

-- CMAKE_BUILD_TYPE: Release


-- MOAB_CMAKE_CONFIG: /home/nikos/plugin-build/moab/lib/cmake/MOAB/MOABConfig.cmake
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5_INCLUDE_DIRS: /usr/include/hdf5/serial
-- HDF5_LIBRARIES_SHARED: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
-- HDF5_LIBRARIES_STATIC:
-- MOAB_INCLUDE_DIRS: /home/nikos/plugin-build/moab/include;/usr/lib/x86_64-linux-gnu/hdf5/serial/include;/usr/lib/x86_64-linux-gnu/hdf5/serial;/usr/include/eigen3
-- MOAB_LIBRARY_DIRS: /home/nikos/plugin-build/moab/lib
-- MOAB_LIBRARIES_SHARED: /home/nikos/plugin-build/moab/lib/libMOAB.so
-- MOAB_LIBRARIES_STATIC:
-- Found MOAB
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE

-- Building shared executables
-- INSTALL_RPATH_DIRS: /home/nikos/plugin-build/DAGMC/lib
-- CMAKE_C_FLAGS:
-- CMAKE_CXX_FLAGS: -D_GLIBCXX_USE_CXX11_ABI=0
-- CMAKE_Fortran_FLAGS:
-- CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_Fortran_FLAGS_RELEASE:
-- CMAKE_C_IMPLICIT_LINK_LIBRARIES:
-- CMAKE_CXX_IMPLICIT_LINK_LIBRARIES: stdc++
-- CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES:
-- CMAKE_EXE_LINKER_FLAGS:
-- Building gtest

-- Building library: dagmc
-- LINK LIBS: /home/nikos/plugin-build/moab/lib/libMOAB.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
-- Building executable: pt_vol_test
-- Building executable: ray_fire_test
-- Building executable: test_geom
-- Building unit tests: dagmc_unit_tests
-- Building unit tests: dagmc_pointinvol_test
-- Building unit tests: dagmc_rayfire_test
-- Building unit tests: dagmc_simple_test

/home/nikos/plugin-build/DAGMC/DAGMC/src/pyne/amalgamate_pyne.sh: line 12: python: command not found
-- PyNE AMALGAMATION FAILED: 127
-- Building library: pyne_dagmc
-- LINK LIBS: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/home/nikos/plugin-build/moab/lib/libMOAB.so

-- Building library: uwuw
-- LINK LIBS: dagmc-shared;pyne_dagmc-shared
-- Building executable: uwuw_preproc
-- Building unit tests: uwuw_unit_tests
-- Building unit tests: uwuw_unit_tests_tally
-- Building unit tests: uwuw_unit_tests_preprocessor

-- Building library: makeWatertight
-- LINK LIBS: dagmc-shared
-- Building executable: make_watertight
-- Building executable: check_watertight
-- Building unit tests: make_watertight_cylinder_tests
-- Building unit tests: make_watertight_cone_tests
-- Building unit tests: make_watertight_no_curve_sphere_tests
-- Building unit tests: make_watertight_sphere_n_box_test

-- Building executable: overlap_check
-- Building unit tests: overlap_check_test

-- DAGMC cmake config file: /home/nikos/plugin-build/DAGMC/lib/cmake/DAGMCConfig.cmake
-- DAGMC cmake version file: /home/nikos/plugin-build/DAGMC/lib/cmake/DAGMCConfigVersion.cmake

-- Configuring done
CMake Error at cmake/DAGMC_macros.cmake:222 (add_library):
  Cannot find source file:

    /home/nikos/plugin-build/DAGMC/DAGMC/src/pyne/pyne.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  src/pyne/CMakeLists.txt:30 (dagmc_install_library)


CMake Error at cmake/DAGMC_macros.cmake:222 (add_library):
  No SOURCES given to target: pyne_dagmc-shared
Call Stack (most recent call first):
  src/pyne/CMakeLists.txt:30 (dagmc_install_library)


CMake Generate step failed.  Build files cannot be regenerated correctly.

In parallel I will proceed downloading the prebuild Svalinn Cubit-plugin you provided.

Note that I would like to import CAD files to cubit in order to produce .h5m files and then follow instructions in order to import the converted CAD geometry to FLUKA. In my understanding it is not sufficient to download Cubit from the official Coreform-cubit website because I failed to export a .h5m file following this links tutorial:

https://svalinn.github.io/DAGMC/usersguide/codes/fludag.html.

Last but not least, I have succesfully installed FluDAG so as far as I understand the only piece missing is the Cubit-plugin in order to perform the aforementioned conversions.

Best,
Nikos.

/home/nikos/plugin-build/DAGMC/DAGMC/src/pyne/amalgamate_pyne.sh: line 12: python: command not found
-- PyNE AMALGAMATION FAILED: 127

this is the root of your problem building the plugin: you need a python interpreter.

Nevertheless, I am not sure if building the plugin from source is the right solution. If you are using the pre-compiled version building is not necessary...

This is correct that you need to install the plugin in addition to the Coreform-Cubit, recent instruction can be found here:
https://github.com/svalinn/DAGMC/blob/develop/doc/install/plugin.rst

Thank you for pointing out the reason behind the build fail. So that means that I will have to install a precompiled cubit-plugin.

Just to clarify, I have installed the latest version of cubit (Coreform-Cubit-2021.5-Lin64.deb) from the official website (https://coreform.com/products/downloads/) and I have extracted the precompiled plugin package that corresponds to my Cubit installation version (available plugin options can be found here: https://uwmadison.app.box.com/s/rvjexbdbktby03ibfkgfar3cwzl68vk6) to the Coreform-Cubit installation directory.

How can I check that everything works? Also, I guess I can discard the ${HOME}/plugin-build directory now that the cubit dependency built was not completed, right?

Thanks,
Nikos.

Yes and no,

Yes for the install of Cubit and getting it form Coreform website.

But the plugin you'll need can be found here: https://github.com/svalinn/Cubit-plugin/releases

yes you an discard the plugin-build and the Cubit-plugin repo that you downloaded before...

the plugin you install need to match the version and platform you installed cubit for.

if you install the Cubit on native windows system you'll need to get the plugin from: https://uwmadison.box.com/s/rvjexbdbktby03ibfkgfar3cwzl68vk6

in you install cubit Coreform-Cubit-2021.5-Lin64.deb in you WSL environment (basically linux) you will need to install a linux plugin you'll get from: https://github.com/svalinn/Cubit-plugin/releases

Thank you for your patience. After successfully installing Coreform-Cubit-2021.5-Lin64.deb and the corresponding linux plugin from the link you provided, I tried to run coreform_cubit and got the errors below:

Error loading component:
libcoreformcae.ccg

Error loading component:
libcubitcomp.ccl

Error loading component:
libcubitcompgui.ccg

Error loading component:
libflexcomp.ccl

Error loading component:
libflexgui.ccg

do those errors have to do with the plugin installation?

this looks like idependant of our plugin, have you try to run Cubit before installing the plugin ?

You are right those errors existed prior to the plugin installation, which is strange because I just followed these 4 commands listed in the official coreform-cubit website:

Download the .deb file.

#extract the collapsing-contents of the .deb file
ar vx Coreform-Cubit-202x.x-Lin64.deb

#install the data files (the files will go into /opt)
sudo tar -zx --directory=/ -f data.tar.gz

#extract the control files
tar zxvf control.tar.gz

#setup the license manager and desktop shortcuts
sudo ./postinst

for the installation and no errors occurred...

Furthermore even after the plugin installation the expected message:

Loaded Svalinn plugin. -- DAGMC export command available. -- iGeom_test command available. -- MCNP import command available. Journaled Command: undo on

does not appear. Should I proceed installing an older version of cubit along with its precompiled plugins for linux?

I am unfamiliar with those instructions but usually .deb linux package are installed using dpkg -i or apt-get install -y (often preceded with sudo)

Installation instruction on linux. ( it is hidden in the Linux-specific issues section)

How to install Coreform Cubit using Linux commands.
Answer: You can install Coreform Cubit using the following teminal commands:
For Debian based Linux OS:
sudo dpkg -i ./Cubit-15.2.2-Lin64.deb
For Red Hat based Linux OS:
sudo rpm -ivh ./Cubit-15.2.2-Lin64.rpm

(Ubuntu is a Debian based Linux OS....)

Thank you @bam241 for the tip, Coreform-Cubit-2021.5 has been installed successfully and operates properly (no errors pop up when the coreform_cubit command is executed). I used this command:

tar zxvf svalinn-plugin_ubuntu-20.04_cubit_2021.5.tgz -C /opt/Coreform-Cubit-2021.5

to extract the precompiled cubit plugin to the cubit installation directory. I am attaching a screenshot of the command window after executing coreform_cubit, the expected message doesn't appear...

Is another wat to check if everything is in place?

With appreciation,
Nikos.
Screenshot

Update: Managed to extract properly the precompiled plugins. I will create a different topic if I anything unexpected occurs with DAGMC in the next steps, thanks!
Screenshot