Error: Failed to create the shared library On Slurm Cluster

8 views
Skip to first unread message

Cherie Yu

unread,
Jul 10, 2024, 8:16:18 AM (12 days ago) Jul 10
to nimble-users
Hello,

So I am trying to compile a nimble model on Slurm Cluster. I have two examples: My original code and a test simple code.

Error Message from original code: 
> #6. Compile Nimble Model
> compiled_model = compileNimble(model1, showCompilerOutput = TRUE)
Compiling
  [Note] This may take a minute.
  [Note] On some systems there may be some compiler warnings that can be safely ignored.
Error: Failed to create the shared library.
g++ -std=gnu++11 -I"/trinity/shared/apps/local/R/4.0.2/lib64/R/include" -DNDEBUG -DR_NO_REMAP   -DEIGEN_MPL2_ONLY=1 -I"/nfs/work/agap_id-bin/img/R/4.0.2/lib/nimble/include" -Wno-misleading-indentation -Wno-ignored-attributes -Wno-deprecated-declarations  -I/usr/local/include   -fpic  -g -O2  -c dynamicRegistrations_07_09_14_41_20.cpp -o dynamicRegistrations_07_09_14_41_20.o
g++ -std=gnu++11 -shared -L/usr/local/lib64 -o dynamicRegistrations_07_09_14_41_20.so dynamicRegistrations_07_09_14_41_20.o -L/nfs/work/agap_id-bin/img/R/4.0.2/lib/nimble/CppCode -lnimble -Wl,-rpath /nfs/work/agap_id-bin/img/R/4.0.2/lib/nimble/CppCode -L/trinity/shared/apps/local/R/4.0.2/lib64/R/lib -lRlapack -L/trinity/shared/apps/local/R/4.0.2/lib64/R/lib -lRblas
/usr/bin/ld: cannot find -lnimble
collect2: error: ld returned 1 exit status
make: *** [dynamicRegistrations_07_09_14_41_20.so] Error 1
Execution halted

Simple Testing Code:
library("nimble");

foo <- nimbleFunction( run = function(x = double(1)) {return(sum(x)); returnType(double())})
cfoo <- compileNimble(foo)
cfoo(1:11)
printErrors()
####
Compiling
  [Note] This may take a minute.
  [Note] Use 'showCompilerOutput = TRUE' to see C++ compilation details.
Error: Failed to create the shared library. Run 'printErrors()' to see the compilation errors.
Execution halted

From these two examples, I see that I have an issue during the compiling stage of my model. I am using nimble version 1.2.0. I was wondering whether the problem was linked to the updating of the new nimble version on my Uni Cluster system? Of course, it does work on my own Ubuntu system.

Thank you,
Cherie

Chris Paciorek

unread,
Jul 10, 2024, 8:22:20 AM (12 days ago) Jul 10
to Cherie Yu, nimble-users
Hi Cherie,

If you look at the files in `/nfs/work/agap_id-bin/img/R/4.0.2/lib/nimble/CppCode`, do you see the file `libnimble.so`. It should be there but I suspect it is not. If it is not, that suggests something went wrong when nimble was installed. Can you try to install it again and look for errors during the installation process, and show us any you see?  Unfortunately, if nimble is installed from source (i.e., by compiling code) as is likely the case on your shared server, the process will show a lot of warning messages and output related to the Eigen package, so you'll need to look carefully for error messages amidst the various Eigen warning messages. If you save all the output/log/error info in a file, that may help in seeing errors and in passing them along to us.

I'll also note that R 4.0.2 is very old, so you might ask your system administrators if they can install an updated R (this would likely benefit all the users of the system) and then you could try to install nimble under the updated R.

-Chris

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/e19e2fad-033d-4ccc-80fd-93ca24db35aen%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages