Installing Vlasiator - fmihpc/vlasiator Wiki

Installing Vlasiator is easy and straightforward!

These steps should be taken:

Here are some general steps. More machine-specific details may be detailed on one of the following pages:

1. Install libraries

Vlasiator needs a number of libraries:

And also a number of optional but useful libraries

Additionally the vlsv2silo tool also needs (if you want to convert VLSV to silo, which is usally not needed):

On debian-based system (such as ubuntu and cubbli), some of the dependencies are provided as packages, installable via apt-get install libeigen3-dev libboost-dev libboost-program-options-dev libsilo-dev libopenmpi-dev

use of the boost-latest ppa ( ppa is reccomended on ubuntu.

See detailed library installation instructions at the end of this page.

2. Make new makefile

The main makefile is in the vlasiator main folder. There should be no need to modify that. All settings are in a separate machine specific file that is in the MAKE folder, where compiler names, compiler flags and library locations are set. In the MAKE folder there are several examples from various machines. The file name is Makefile.machine_name, where machine_name is whatever you want to call your machine. It is best to start from a makefile that is similar to the machine you are compiling on. The Makefile.home corresponds to a Linux computer with all libraries in ${HOME}/lib and ${HOME}/include.

3. Compile!

After one has created the makefile, one should set an environment variable with the name of your machine, matching the name used for the MAKE/Makefile.machine_name file. For example, to use the home makefile one can set it like this:

export VLASIATOR_ARCH=home

To make the environment variable one can put it into the initialization files for your shell, e.g. .profile.

The one can simply

make clean
make -j 12

to make vlasiator, or

make clean 
make -j 12 tools

to make the tools.

Detailed installation instructions for Libraries


DCCRG is a pure header library so one needs to fetch it and make sure it is included (see Makefile.your-arch).

git clone [email protected]:fmihpc/dccrg.git

If the ssh clone fails, use the https protocol.

DCCRG needs a few libraries, the instructions for installing them are on this page. Further instructions can also be found in dccrg wiki:

Currently Vlasiator uses not the master branch of DCCRG, instead the "Vlasiator-version":

git checkout vlasiator-version


Boost ( provides Vlasiator (and DCCRG) with some datastructures that are not in the pre C++11 standard. We also use the program options module for reading cfg parameters (with some wrapper functions).

Debian-based systems

On debian-based system (such as ubuntu and cubbli) boost is installable via apt-get install libboost-dev libboost-program-options-dev Use of the boost-latest ppa ( ppa is reccomended on ubuntu.

Cray XC platform

One can use the Trillinos module:

module load cray-trilinos

And add to Makefile.your-arch:

INC_BOOST = -L$(CRAY_TRILINOS_PREFIX_DIR)/lib -lboost_program_options

Other platforms

On other platforms you can follow the instructions on DCCRG's wiki.( Boost is mostly a header library, so we only need to compile the program options module.


tar xf boost_1_72_0.tar.bz2
cd boost_1_72_0
./ --with-libraries=program_options
echo "using mpi ;" >> ./tools/build/src/user-config.jam
./b2 --prefix=<path> install
cd ..
rm -r boost_1_72_0

Note that it detects gcc (too) efficiently at least on Mahti, so you might need to add --with-toolset=intel-linux to the bootstrap command.


Download from

This library is used for load balancing.

Cray XC

As for boost, we can use the cray-trillinos module.

module load cray-trilinos

Define in Makefile.your-arch:



On taito (CSC), use the curie instructions but do change the installation folder to $USERAPPL. Sample installation with gcc (change the version numbers to relevant ones):

module swap intel gcc
mkdir zoltan-build  
cd zoltan-build
sed -i -e '[email protected] long ssize_t;@//typedef long ssize_t;@' ../Zoltan_v3.8/src/driver/dr_compress_const.h
export CC=mpicc  
export CXX=mpicxx  
export FC=mpif90  
export CFLAGS="-std=c99"  
export CXXFLAGS="-std=c++0x"
../Zoltan_v3.8/configure --prefix=$USERAPPL/libraries/RELEVANT_PATH --enable-mpi --with-mpi-compilers --with-gnumake --with-id-type=ullong
make -j 8
make install

Note (Puhti and later): the sed and exports might not be needed. Make sure to unset the flags or it might mess up the compilation of other libraries down the list.


You can follow the installation instructions on DCCRG's wiki.(


Download Vectorclass library from: Watch out: version 2 of this library uses advanced metaprogramming tricks that do not seem to sit well with compilers in common HPC environments. For the time being, it is recommended to use version 1 from here:

We use this to vectorize Vlasov propagation with SSE2/AVX. It is a header library so the header files only need to be placed in a include folder.

Additionally, vector3d.h needs to be copied from a now separate repo:

git clone [email protected]:vectorclass/add-on.git
cp add-on/vector3d/vector3d.h <PATH TO VECTORCLASS>

into the directory where the remaining vector class headers are lying.


Clone the latest version from:

Used for runtime performance tracking.

In the src folder there is a simple Makefile. Edit that to support you machine and make.- The library will then be in the phiprof include and lib folders.


Download from

This is the file format/io library.

Installation instructions:

VLSV plugin for VisIt

If you want/have to build yourself:

Note: As of Nov. 2020 it will complain about a VTK API function. You can checkout the version from until this is merged, or you can comment out the offending lines when building.


Download from

This is the mesh library for cartesian domain decomposition of the fieldsolver. It is a header-only library, and the only thing required for vlasiator is that the fsgrid.hpp file is available in its include path.


Download from

Papi is optional, and only needed if CXXFLAGS += -DPAPI_MEM is defined in the makefile. It can provide information on the actual memory usage of Vlasiator. Most of the time papi is pre-installed on supercomputers and clusters and can often be loaded with module load papi.

If not, it can most of the time be compiled with the typical method:

tar xf papi-5.4.3.tar.gz
cd papi-5.4.3/src
./configure --prefix=${HOME}/libraries/papi
make install


Download from

jemalloc is an optional replacement for the normal malloc/free routines. It is optimized for minimizing memory fragmentation, and it can be of tremendous importance and is strongly recommended, see #25

Current testing indicates that jemalloc should be compiled with support for transparent huge pages disabled. To perform this, add the flag --disable-thp during configuration.

To compile one would typically do something like this (replace prefix path with the correct one, and update version if there is a newer one)

wget -O jemalloc-4.0.4.tar.bz2
tar xf jemalloc-4.0.4.tar.bz2
cd jemalloc-4.0.4
./configure --prefix=${HOME}/libraries/jemalloc --with-jemalloc-prefix=je_
make install


Download from One does not need to compile anything, it is enough to copy the Eigen sub-folder. Replace in the following instructions the version and paths:

tar -xvf eigen-3.2.8.tar.bz2
cp -r eigen-3.2.8/Eigen $HOME/libraries/eigen

NOTE: Eigen 3.3.8 has an "'eigen_assert_exception' is not a member of 'Eigen'" bug during compilation. Do not use this specific version.


Fileformat. Used by vlsv2silo to convert vslv files into Silo files that can be opened directly with VisIt visualization tool without extra plugins. The tool is a legacy tool, and in most cases there is no need to install silo.

On debian-based system (such as ubuntu and cubbli) it is installable via apt-get install libsilo-dev

On other platforms it can be downloaded from:

If compiled on a Cray, or other more special machines then one first needs to define compilers:

export CXX=CC
export CC=cc 

Then configure and make:

./configure --disable-fortran --disable-silex --disable-browser --without-Qt-lib --without-x --prefix ${HOME}
make -j 12
make install