I manage a HPC cluster and when we installed R we chose to use the Intel compiler and Math Kernel Library. For the most part, this has worked well, but I occasionally run into issues building some packages which is probably not surprising.
I’m attempting to install rstan_2.18.2.tar.gz against R-3.5.3 which I built using Intel 17.0.6. rstan first complained about CXX14 not being set, so I figured out how to set that to the Intel C++ compiler:
[root@login02 R_Packages]# cat ~/.R/Makevars
CXXFLAGS += -wd308
CXXFLAGS += -wd809
temporary for Rstan
CXX14=icpc
I’ve tried various iterations of other flags, and I’ve also tried reinstalling Rcpp with the same flags (something I came across while searching these forums), but the error remains pretty consistent. It starts to build the package:
[root@login02 R_Packages]# R CMD INSTALL rstan_2.18.2.tar.gz
…
icpc -I"/export/R-3.5.3-intel/lib64/R/include" -DNDEBUG -I"…/inst/include" -I""/export/R-3.5.3-intel/lib64/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"
" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/export/R-3.5.3-intel/lib64/R/library/Rcpp/include" -I"/export/R-3.5.3-intel/lib64/R/library/RcppEigen/include" -I"/export/R-3.5.3-intel/lib64/R/library/BH/include" -I"/export/R-3.5.3-intel/lib64/R/library/StanHeaders/include" -I/usr/local/include -c chains.cpp -o chains.o
I see several warnings/error messages of the form:
/export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/ast/sigs/function_signatures_def.hpp(101): note: this candidate was rejected because mismatch in count of arguments
void function_signatures::add(const std::string& name,
^
/export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/ast/sigs/function_signatures_def.hpp(93): note: this candidate was rejected because mismatch in count of arguments
void function_signatures::add(const std::string& name,
^
/export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/ast/sigs/function_signatures_def.hpp(87): note: this candidate was rejected because mismatch in count of arguments
void function_signatures::add(const std::string& name,
and it finally errors out with:
In file included from /export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/ast/sigs/function_signatures_def.hpp(486),
from /export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/ast_def.cpp(119),
from lang__ast_def.cpp(18):
/export/R-3.5.3-intel/lib64/R/library/StanHeaders/include/src/stan/lang/function_signatures.h(406): error #303: explicit type is missing (“int” assumed)
for (const auto& t : all_vector_types) {
^
compilation aborted for lang__ast_def.cpp (code 4)
Any suggestions on things to try would be greatly appreciated.
Cheers,
Malcolm