Source Code

The DAMASK core is written in Fortran 2018 with a few enhancements in C. The pre- and post-processing tools are written in Python 3. A Unix-style operation system is a prerequisite for installation from source. DAMASK has been installed on different GNU/Linux distributions and on MacOS. Compilation on Windows is possible via the Windows Subsystem for Linux (WSL).


Compilation from source is only recommended for experienced users and developers.

Download, check, and unpack the source code:

sha256sum -c damask-3.0.0-alpha5.tar.xz.sha256
tar -xf damask-3.0.0-alpha5.tar.xz

Get an overview of the prerequisites available on your system:

cd damask-3.0.0-alpha5
cat system_report.txt

Grid and Mesh Solver

A recent version of the GNU Compiler Collection, the Intel Parallel Studio XE, or the Intel oneAPI_ toolkit is needed to build the grid solver and/or mesh solver from source.


The ifx Fortran driver from the Intel oneAPI toolkit does not yet support constructs from Fortran 2018 used in DAMASK.

The solvers included with DAMASK are build with CMake and rely on PETSc. A PETSc installation with support for MPI and the following external packages is needed:

If all prerequisites are installed, compiliation and installation follows the standard CMake procedure:

cmake -S damask-3.0.0-alpha5 -B build-grid -DDAMASK_SOLVER=grid
cmake --build build-grid --target install
cmake -S damask-3.0.0-alpha5 -B build-mesh -DDAMASK_SOLVER=mesh
cmake --build build-mesh --target install

Pre- and Post-Processing Tools

Compiliation and installation follows the standard pip procedure:

cd damask-3.0.0-alpha5/python
pip install .

MSC Marc

Install MSC Marc including Marc Mentat and the recommended version of Intel Parallel Studio XE. Then build HDF5 with the Intel compilers using autotools (not CMake):

export FCFLAGS='-fPIC -integer-size 64 -real-size 64 -qopenmp'
export CFLAGS='-fPIC -qopenmp'
CFLAGS=$CFLAGS FCFLAGS=$FCFLAGS FC=ifort CC=icc ./configure \
--disable-parallel --enable-fortran --enable-build-mode=production

A successful installation creates a wrapper called h5fc. This wrapper is used by MSC Marc to compile DAMASK. Check whether it is indeed using ifort with:

h5fc -show

Finally, apply the DAMASK modifications to the MSC Marc installation:

export PYTHONPATH=${PWD}/damask-3.0.0-alpha5/python/damask:${PYTHONPATH}