BwUniCluster2.0/Software/R/Rstan: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
Line 2: Line 2:


Consider starting an interactive job for compiling. Copy and paste the following to your shell.
Consider starting an interactive job for compiling. Copy and paste the following to your shell.

Note: Rstan depends on the V8 R package.


<pre>
<pre>
Line 11: Line 13:
mkdir -p ~/.R
mkdir -p ~/.R


# to Makevars
# Write the following environment variables to Makevars
echo "CXX14=icpc" >>~/.R/Makevars
echo "CXX14=icpc" >> ~/.R/Makevars
echo "CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp" >> ~/.R/Makevars
echo "CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp" >> ~/.R/Makevars

# Set up environment for V8
export DOWNLOAD_STATIC_LIBV8=1

# Install V8 and Rstan packages from within R session
R -q




</pre>
</pre>

Additional information can be found at: https://github.com/stan-dev/rstan/wiki/Configuring-C-Toolchain-for-Linux

Revision as of 15:18, 21 April 2021

Installation instructions

Consider starting an interactive job for compiling. Copy and paste the following to your shell.

Note: Rstan depends on the V8 R package.


# Load the R software module, e.g.
module load math/R/3.6.3

# Prepare .R directory (if it does not already exists)
mkdir -p ~/.R

# Write the following environment variables to Makevars
echo "CXX14=icpc" >> ~/.R/Makevars
echo "CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp" >> ~/.R/Makevars

# Set up environment for V8
export DOWNLOAD_STATIC_LIBV8=1

# Install V8 and Rstan packages from within R session
R -q


Additional information can be found at: https://github.com/stan-dev/rstan/wiki/Configuring-C-Toolchain-for-Linux