Hello everyone,


I'm trying to run a model written in stan through the R package rstan​, but I'm getting a compilation error. This happens with all models I've tried, so it is not an error in the model itself. Also, I'm able to run models on the head node with no problems. When I send it through slurm, it fails with this message in the output:


/mnt/lustre/software/linuxbrew/colsa/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [file1deeb59393118.so] Error 1

ERROR(s) during compilation: source code errors or compiler configuration errors!


and then:

Error in compileCode(f, code, language = language, verbose = verbose) : 
  Compilation ERROR, function(s)/method(s) not created! In file included from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/BH/include/boost/config.hpp:39:0,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/BH/include/boost/math/tools/config.hpp:13,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/StanHeaders/include/stan/math/rev/core.hpp:12,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from /mnt/lustre/software/linuxbrew/colsa/lib/R/3.4/site-library/StanHeaders/include/stan/math.hpp:4,
                 from /mnt/lustre/software/lin
Calls: stan ... stan_model -> cxxfunctionplus -> cxxfunction -> compileCode


My guess is that either I need to update the path in the .sh script or something similar. Does ​​anyone have any ideas? I'm new to working on a cluster, so it might be something very basic...

I attached the full output as well -- the lines pasted above are 40-44 and 520-529. Thanks for any help,



Tim

------------------------------------------
Tim Szewczyk ('sev-check'), PhD
Postdoctoral Research Associate
University of New Hampshire
Department of Natural Resources & the Environment