4.3. Spectral solver


This manual describes the installation on a Unix system. For running a simulation after the installation, please refer to the spectral solver usage page.


  • Fortran compiler supporting Fortran 2008 standard
  • PETSc including FFTW
  • DAMASK/CONFIG reflecting your system settings
  • system variables set (done by calling >source DAMASK/DAMASK_env.(sh/csh/zsh) or >source DAMASK/env/DAMASK.(sh/csh/zsh) for the current development version
    IMPORTANT note: as you have not yet compiled the spectral solver at this point, the warnings about "Spectral Solver Not found!" and "Post Processing Not found!" are normal; follow below instructions, which will fix this behavior!)

Installation scripts

The following scripts install all relevant prerequisites


Build from source and install

> make spectral [switch=value] [switch=value] [...]

General compiler switches

You can control your compilation with the following switches (default in bold):


The meaning of the OPTIMIZATION switches are as following:

  • OFF: -O0

Choose AGGRESSIVE only if you do not encounter any problems such as inconsistent solver results. As far as we know, DEFENSIVE is always safe and already improves performance significantly compared to OFF. Compilation with OPTIMIZATION = OFF is only recommended when compile time is a premium.

Advanced make options

The advanced make options allow to specify in combination with the general compiler switches the complete compile command. The following commands are defined in the Makefile:

  • BUILDCMD_PRE = arbitrary prefix
  • BUILDCMD_POST = arbitrary suffix

If the compiling options are changed, remove all previously compiled objects with
> cd DAMASK/code/
> make clean

Pre-configured docker image

A pre-configured docker image is available at the docker hub. For quick testing of the DAMASK spectral solver, use

> docker pull kedokudo/damaskdocker:damask
to pull this image to your local machine.

Once the image is downloaded to the local machine, start a container with this image by
> docker run -it kedokudo/damaskdocker:damask /bin/bash

Then navigate to the example folder to test out the basic functionality of the spectral solver with
> cd examples/SpectralMethod/Polycrystal
> DAMASK_spectral -l tensionX.load -g 20grains16x16x16.geom

If you would like to use the pre-configured docker image to run some simulation, you can mount your local directory to the container during the launch time by
> docker run -v {YOUR_LOCAL_DIR}:/tmp -it kedokudo/damaskdocker:damask /bin/bash
then you can navigate to the /tmp directory and start your simulation
> cd /tmp

This topic: Installation > BVPsolvers > SpectralSolver
Topic revision: 04 Mar 2020, MartinDiehl
This site is powered by FoswikiCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection