2017-07-13 61 views
0

Windows上でrstanと一緒に使用すると、次のスタンコードが正常に動作します。次のようにしかし、Linux(CentOSの6)を使用してクラスタ上で実行しているとき、それはの〜500行が含まれて非常に長いエラーをスローし、私は、推測Rcppコードと最後のチャンクは次のとおりです。スタンドコードはWindowsでは動作しますが、Linuxでは動作しません

Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! In file included from /scratch/user/siamak/R_libs/StanHeaders/include/stan/math/rev/mat.hpp(15), from /scratch/user/siamak/R_libs/StanHeaders/include/stan/math.hpp(4), from /scratch/user/siamak/R_libs/StanHeaders/include/src/stan/model/model_header.hpp(4), from file6ff02c925624.cpp(8): /general/software/x86_64/tamusc/R_tamu/R_LIBS/3.3.2-iomkl-2017A-Python-2.7.12-default-mt/RcppEigen/include/Eigen/src/Cholesky/LLT.h(57): error: class "Eigen::Ref>" has no member "Options" Options = MatrixType::Options, ^ detected during instantiation of class "Eigen::LLT<_MatrixType, _UpLo> [with _MatrixType=Eigen::Ref>, _UpLo=1]" at line 247 of "/scratch/user/siamak/R_libs/StanHeaders/include/stan/math/rev/mat/fun/cholesky_decompose.hpp" In file included fro In addition: Warning message: running command '/sw/eb/software/R/3.3.2-iomkl-2017A-Python-2.7.12-default-mt/lib64/R/bin/R CMD SHLIB file6ff02c925624.cpp 2> file6ff02c925624.cpp.err.txt' had status 1

どれ意見?

data{ 
int<lower=0> n;   //number of points 
int<lower=1> d;   //dimension 
int<lower=1> G;   //number of groups 
int<lower=0> M; 
int<lower=1> Jg[M]; 
int<lower=1> Start[G]; 
int<lower=1> End[G]; 
int<lower=1,upper=G> Ig[n]; 
matrix[d,n] X; 
cov_matrix[d] Lambda; 
real<lower=d-1> nu; 
cov_matrix[d] B; 
vector[d] m; 
} 

parameters{ 
vector[d] mu;   //mean 
cov_matrix[d] Sigma; //covariance 
} 


model{ 
//prior 
Sigma ~ inv_wishart(nu,Lambda); 
mu ~ multi_normal(m,B); 
//likelihood 
for (i in 1:n){ 
    X[Jg[Start[Ig[i]]:End[Ig[i]]],i] ~ 
multi_normal(mu[Jg[Start[Ig[i]]:End[Ig[i]]]], 
    Sigma[Jg[Start[Ig[i]]:End[Ig[i]]],Jg[Start[Ig[i]]:End[Ig[i]]]]); 
    } 
} 
+0

コンパイラは何ですか?そしてどのバージョン? –

+0

コンパイラはgcc6ですが、それは問題の原因です。私はソースからrstanとRcppを再インストールし、解決しました。ありがとうございました! – Siamak

答えて

0

問題はgcc6コンパイラでした。ソースからrstanとRcppパッケージを再インストールして問題を解決しました!

関連する問題