svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot open shared object file

Mark-Anderton opened this issue · comments

Because I need to use a non-commercial license I need to use Corefoam Cubit 2022.6. Fully knowing that there isn't a DAGMC plugin for this version yet I've tried running 2022.6 with the 2021.11 plugin and run into the following error:

dlopen ERROR /opt/Coreform-Cubit-2022.6/bin/./plugins/libsavlinn_plugin.so : libMOAB.so.5 : cannot open shared object file : No such file or directory

Is this error likely the result of the fact that I'm trying to use the 2021.11 plugin with Cubit 2022.6 or something else? If its something else, how could I go about fixing it?

@Mark-Anderton try running it from the terminal, prepend a blank LD_LIBRARY_PATH i.e. LD_LIBRARY_PATH="" /opt/coreform/bin/coreform_cubit

@makeclean thank you very much for your quick reply! Unfortunately, that's not made any difference, I'm still getting the same error.

ok, could you list the contents of the svalinn plugin directory? showing the various .so or .dylib files?

I believe the problem might come from a change in the Cubit root folder:
it is now: Coreform-Cubit-2022.6

when we build the plugin for linux, the path to various lib are hardcoded into the libs... using patchelf

We need to build a new version of the plugin for Cubit-2022.6

a temporary fix might be to run :

cd /opt/Coreform-Cubit-2022.6/bin/plugins/
patchelf --set-rpath /opt/Coreform-Cubit-2022.6/bin/plugins/svalinn libMOAB.so
patchelf --set-rpath /opt/Coreform-Cubit-2022.6/bin/plugins/svalinn libdagmc.so
patchelf --set-rpath /opt/Coreform-Cubit-2022.6/bin/plugins/svalinn libmakeWatertight.so
patchelf --set-rpath /opt/Coreform-Cubit-2022.6/bin/plugins/svalinn libpyne_dagmc.so
patchelf --set-rpath /opt/Coreform-Cubit-2022.6/bin/plugins/svalinn libuwuw.so

then run as
LD_LIBRARY_PATH="" /opt/coreform/bin/coreform_cubit

Thank you both for your input,

I have tried building the plugin from source and have tried running it with the suggestions made by @bam241. Unfortunately, this made no difference.

@makeclean as per your request, please see the contense of the svalinn plugin directory listed below:

mark.anderton@NEUTRON-2:/opt/Coreform-Cubit-2022.6/bin/plugins/svalinn$ ls libcfplugincmd.so libmakeWatertight.so libpyne_dagmc.so libdagmc.so libmaterial_commands.so libsvalinn_plugin.so libhdf5.so libmcnp2cad.so libuwuw.so libiGeom.so libMOAB.so libworkspacecmd.so

In the mean time, is there a docker container that I could use that has coreform cubit and the DAGMC plugin setup?

Thanks all!

I decided to start again and setup a new VM running ubuntu 20.04 and try and install the 2021.11 plugin on Coreform Cubit 2022.6. I also decided to run the commands listed by @bam241 for all of the files in the plugins/svalinn directory and the libsvalinn_plugin.so file in the plugins directory. Running this with the command LD_LIBRARY_PATH="" /opt/Coreform-Cubit-2022.6/bin/coreform_cubit I was able to get past the error I started this thread about. However, Cubit crashes before its able to finish loading. Running the command sudo strace -o debug_cubit.txt /opt/Coreform-Cubit-2022.6/bin/coreform_cubit I get the following output at the end of the strace file I generated:

write(1, "-- DAGMC export command availabl"..., 35) = 35 write(1, "\n", 1) = 1 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} --- write(1, "...Interrupt Detected. CUBIT Exi"..., 40) = 40 write(1, "\n", 1) = 1 rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f251ec66090}, NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [SEGV], 8) = 0 getpid() = 2486 gettid() = 2486 tgkill(2486, 2486, SIGSEGV) = 0 rt_sigprocmask(SIG_SETMASK, [SEGV], NULL, 8) = 0 rt_sigreturn({mask=[]}) = 8 --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=2486, si_uid=0} --- +++ killed by SIGSEGV (core dumped) +++

While this is hard for me to make sense of, what I understand is that the DAGMC plugin has been loaded correctly but it fails with a SIGSEGV signal and a SEGV_MAPER filed id. I haven't been able to figure out what might be causing these problems do you have any ideas?

I've been trying to build the DAGMC plugin from source when following the instructions on this page I get the error [ 70%] Built target pyne_dagmc-shared make: *** [Makefile:130: all] Error 2. The file I've attached shows the entire console output from the make command when trying to build DAGMC. Do you know how I could solve this problem?

DAGMC_build_log.txt

@Mark-Anderton we are working on building the plugin for cubit 2022.6.
if you want to try it you can download it from:
https://github.com/svalinn/Cubit-plugin/actions/runs/2714269727
(choose the one corresponding to your setup)

those have been built correctly but have not been tested, so they might not work :)