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