diff --git a/src/Makevars.in b/src/Makevars.in index b5d7a33..db1bad2 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -3,8 +3,9 @@ ## CXX_STD = CXX11 ## For standard -PKG_CXXFLAGS = -I../inst/include/ @OPENMP_FLAG@ -PKG_LIBS = @OPENMP_FLAG@ +PKG_CPPFLAGS = -I../inst/include/ +PKG_CXXFLAGS = @OPENMP_FLAG@ +PKG_LIBS = @OPENMP_FLAG@ ## For MKL - make sure you are using icc compiler in ~.R/Makevars # Using GCC -- PREFERRED for MKL diff --git a/src/PibbleCollapsed_Uncollapse_sigmaKnown.cpp b/src/PibbleCollapsed_Uncollapse_sigmaKnown.cpp index b4550eb..c583501 100644 --- a/src/PibbleCollapsed_Uncollapse_sigmaKnown.cpp +++ b/src/PibbleCollapsed_Uncollapse_sigmaKnown.cpp @@ -120,10 +120,9 @@ List uncollapsePibble_sigmaKnown(const Eigen::Map eta, // note #endif #pragma omp parallel shared(D, N, Q, LambdaDraw0) { - #ifdef FIDO_USE_PARALLEL - boost::random::mt19937 rng(omp_get_thread_num()+seed); - #else boost::random::mt19937 rng(seed); + #ifdef FIDO_USE_PARALLEL + rng.discard(omp_get_thread_num()*iter); #endif // storage for computation MatrixXd LambdaN(D-1, Q);