svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit
BSD 3-Clause "New" or "Revised" License
17 stars 14 forks source link

Cannot open shared object file #134

Open Mark-Anderton opened 2 years ago

Mark-Anderton commented 2 years ago

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?

makeclean commented 2 years ago

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

Mark-Anderton commented 2 years ago

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

makeclean commented 2 years ago

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

bam241 commented 2 years ago

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

bam241 commented 2 years ago

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

Mark-Anderton commented 2 years ago

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!

makeclean commented 2 years ago

Maybe your system is being super picky, make a symbolic link between libMOAB.so and libMOAB.so.5

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Mark-Anderton @.> Sent: Monday, July 18, 2022 2:20:14 PM To: svalinn/Cubit-plugin @.> Cc: Davis, Andrew @.>; Mention @.> Subject: Re: [svalinn/Cubit-plugin] Cannot open shared object file (Issue #134)

Thank you both for your input,

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

@makecleanhttps://github.com/makeclean as per your request, please see the contense of the svalinn plugin directory listed below:

@.***:/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!

— Reply to this email directly, view it on GitHubhttps://github.com/svalinn/Cubit-plugin/issues/134#issuecomment-1187408604, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AASTUSSAGGYTEHTTZFJM563VUVKY5ANCNFSM53O4MV6A. You are receiving this because you were mentioned.Message ID: @.***>

Mark-Anderton commented 2 years ago

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?

Mark-Anderton commented 2 years ago

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

bam241 commented 2 years ago

@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 :)