Hello,
I have been attempting to install cmdstan on a linux cluster using the recommended process (from here).
conda create -n stan -c conda-forge cmdstan
While installing, I got the following errors, I’m not sure if these are an issue or not necessarily:
SafetyError: The package for cmdstan located at /home1/djhalp/.conda/pkgs/cmdstan-2.33.1-hc24a2e5_0
appears to be corrupted. The path 'bin/cmdstan/makefile'
has an incorrect size.
reported size: 12256 bytes
actual size: 12332 bytes
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/linux-64::libstdcxx-ng-13.2.0-hc0a3c3a_7, defaults/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1
path: 'share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/linux-64::libgomp-13.2.0-h77fa898_7, defaults/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1
path: 'share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION.gomp_copy'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1, conda-forge/linux-64::libgcc-ng-13.2.0-h77fa898_7
path: 'share/info/libgomp.info'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1, conda-forge/linux-64::libgcc-ng-13.2.0-h77fa898_7
path: 'share/info/libquadmath.info'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1, conda-forge/linux-64::libgcc-ng-13.2.0-h77fa898_7
path: 'share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION'
I then tried to run the example Bernoulli model using the following code:
conda activate stan
cd $CONDA_PREFIX/bin/cmdstan
make examples/bernoulli/bernoulli
This resulted in the following error:
/home1/djhalp/.conda/envs/stan/bin/x86_64-conda-linux-gnu-c++ -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home1/djhalp/.conda/envs/stan/include -std=c++1y -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -I /home1/djhalp/.conda/envs/stan/include/ -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I /home1/djhalp/.conda/envs/stan/include/tbb -I /home1/djhalp/.conda/envs/stan/include -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home1/djhalp/.conda/envs/stan/include -DBOOST_DISABLE_ASSERTS -DTBB_INTERFACE_NEW -DTBB_INTERFACE_NEW -c -MT src/cmdstan/main.o -MM -E -MG -MP -MF src/cmdstan/main.d src/cmdstan/main.cpp
--- Translating Stan model to C++ code ---
bin/stanc --o=examples/bernoulli/bernoulli.hpp examples/bernoulli/bernoulli.stan
--- Compiling, linking C++ code ---
/home1/djhalp/.conda/envs/stan/bin/x86_64-conda-linux-gnu-c++ -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home1/djhalp/.conda/envs/stan/include -std=c++1y -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -I /home1/djhalp/.conda/envs/stan/include/ -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I /home1/djhalp/.conda/envs/stan/include/tbb -I /home1/djhalp/.conda/envs/stan/include -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home1/djhalp/.conda/envs/stan/include -DBOOST_DISABLE_ASSERTS -DTBB_INTERFACE_NEW -DTBB_INTERFACE_NEW -c -x c++ -o examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.hpp
In file included from stan/lib/stan_math/stan/math/prim/functor/reduce_sum.hpp:,
from stan/lib/stan_math/stan/math/prim/functor.hpp:30,
from stan/lib/stan_math/stan/math/rev/fun.hpp:200,
from stan/lib/stan_math/stan/math/rev.hpp:10,
from stan/lib/stan_math/stan/math.hpp:19,
from stan/src/stan/model/model_header.hpp:4,
from examples/bernoulli/bernoulli.hpp:2:
/opt/intel/composerxe-2011.4.191/tbb/include/tbb/parallel_reduce.h:46:9: error:'aligned_space' does not name a type
46 | aligned_space<Body,1> zombie_space;
| ^~~~~~~~~~~~~
/opt/intel/composerxe-2011.4.191/tbb/include/tbb/parallel_reduce.h: In member function 'tbb::task* tbb::internal::finish_reduce<Body>::execute()':
/opt/intel/composerxe-2011.4.191/tbb/include/tbb/parallel_reduce.h:56:27: error: 'zombie_space' was not declared in this scope
56 | Body* s = zombie_space.begin();
| ^~~~~~~~~~~~
In file included from stan/lib/stan_math/stan/math/prim/functor.hpp:30,
from stan/lib/stan_math/stan/math/rev/fun.hpp:200,
from stan/lib/stan_math/stan/math/rev.hpp:10,
from stan/lib/stan_math/stan/math.hpp:19,
from stan/src/stan/model/model_header.hpp:4,
from examples/bernoulli/bernoulli.hpp:2:
stan/lib/stan_math/stan/math/prim/functor/reduce_sum.hpp: In member function 'ReturnType stan::math::internal::reduce_sum_impl<ReduceFunction, typename std::enable_if<std::is_arithmetic<typename std::decay<_Tp2>::type>::value, void>::type, ReturnType, Vec, Args ...>::operator()(Vec&&, bool, int, std::ostream*, Args&& ...) const':
stan/lib/stan_math/stan/math/prim/functor/reduce_sum.hpp:160:12: error: 'parallel_deterministic_reduce' is not a member of 'tbb'
160 | tbb::parallel_deterministic_reduce(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from stan/lib/stan_math/stan/math/rev/functor.hpp:30,
from stan/lib/stan_math/stan/math/rev.hpp:11,
from stan/lib/stan_math/stan/math.hpp:19,
from stan/src/stan/model/model_header.hpp:4,
from examples/bernoulli/bernoulli.hpp:2:
stan/lib/stan_math/stan/math/rev/functor/reduce_sum.hpp: In lambda function:
stan/lib/stan_math/stan/math/rev/functor/reduce_sum.hpp:263:14: error: 'parallel_deterministic_reduce' is not a member of 'tbb'
263 | tbb::parallel_deterministic_reduce(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [make/program:58: examples/bernoulli/bernoulli] Error 1
As far as I can tell, it seems to be trying to use an older, incorrect version of tbb
that is in /opt/intel/
on our cluster (which I unfortunately don’t have the power to change). However, conda did install a newer version of tbb
into ~/.conda/envs/stan/include/tbb
. I don’t totally understand why it is not finding this because the header definitely includes the line -I /home1/djhalp/.conda/envs/stan/include/tbb
. Has anyone had similar issues or have any suggestions for how to fix this? And are the initial errors regarding a corrupted makefile anything to be concerned about? Thanks so much in advance for any help you can provide!
- Operating System: CentOS Linux 7
- CmdStan Version: 2.33.1
- Compiler/Toolkit:
g++ (GCC) 7.3.0
GNU Make 4.3
Built for x86_64-conda-linux-gnu