Build cmdstan2.26 with mpi

Hi,

How to build cmdstan2.26 with mpi enabled?
Is it enough in make/local
STAN_MPI=true
CXX=mpicxx
TBB_CXX_TYPE=gcc
all I need more switches?

Thanks for any advice.

Indeed, that should be it. Also see our guide here to double check: 14 Parallelization | CmdStan User’s Guide

Thank you.
Now I have problems when making boost library. Can you please advise?

cd stan/lib/stan_math/lib/boost_1.72.0; ./bootstrap.sh
Building Boost.Build engine with toolset gcc… tools/build/src/engine/b2
Detecting Python version… ‘python’ may refer to either python2 or python3. Please choose either /usr/bin/python2 or /usr/bin/python3. Python2 is in end of life and should no longer be used. For information on porting from python2 to python3, please see Porting Python 2 Code to Python 3 — Python 3.9.2 documentation
Detecting Python root… ‘python’ may refer to either python2 or python3. Please choose either /usr/bin/python2 or /usr/bin/python3. Python2 is in end of life and should no longer be used. For information on porting from python2 to python3, please see Porting Python 2 Code to Python 3 — Python 3.9.2 documentation
Unicode/ICU support for Boost.Regex?.. /usr
Backing up existing Boost.Build configuration in project-config.jam.1
Generating Boost.Build configuration in project-config.jam for gcc…

Bootstrapping is done. To build, run:

./b2

To generate header files, run:

./b2 headers

To adjust configuration, edit ‘project-config.jam’.
Further information:

cd stan/lib/stan_math/lib/boost_1.72.0; ./b2 --user-config=user-config.jam --layout=system --with-mpi --with-serialization -j1 variant=release link=shared threading=multi runtime-link=shared hardcode-dll-paths=true dll-path="/jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/stage/lib" cxxstd=11
project-config.jam:26: Unescaped special character in argument Porting Python 2 Code to Python 3 — Python 3.9.2 documentation
/jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/build/toolset.jam:44: in toolset.using
*** argument error

  • rule python.init ( version ? : cmd-or-prefix ? : includes * : libraries ? : condition * : extension-suffix ? )
  • called with: ( ‘python’ may refer to either python2 or python3. Please choose either /usr/bin/python2 or /usr/bin/python3. Python2 is in end of life and should no longer be used. For information on porting from python2 to python3, please see Porting Python 2 Code to Python 3 — Python 3.9.2 documentation : ‘python’ may refer to either python2 or python3. Please choose
    either /usr/bin/python2 or /usr/bin/python3. Python2 is in
    end of life and should no longer be used.

For information on porting from python2 to python3, please see
Porting Python 2 Code to Python 3 — Python 3.9.2 documentation : : : : : : )

  • extra argument may
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/tools/python.jam:104:see definition of rule ‘python.init’ being called
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/build/project.jam:1104: in using
    project-config.jam:31: in modules.load
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/build-system.jam:255: in load-config
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/build-system.jam:486: in load-configuration-files
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/build-system.jam:607: in load
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/kernel/modules.jam:295: in import
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/tools/build/src/kernel/bootstrap.jam:139: in boost-build
    /jet/home/llmock/cmdstan-2.26.1/stan/lib/stan_math/lib/boost_1.72.0/boost-build.jam:17: in module scope

I wonder if it is possible to use boost library which is already installed instead of making it. Is there a switch?