2. System configuration


Setting DAMASK options

Adjust the settings in DAMASK/CONFIG using any text editor, the default values should work on most systems.


parent_gray

Setting shell environment

Depending on your shell, execute one of the following commands to set the DAMASK environment.

  • in bash (default on most Linux systems):
     > source DAMASK/env/DAMASK.sh 

  • in the C-Shell:
      > source DAMASK/env/DAMASK.csh 

  • in the Z Shell:
     > source DAMASK/env/DAMASK.zsh 

Sourcing the file is necessary before compiling or running DAMASK, hence it is recommended to do it automatically when logging in. This can be done by adding the command source command to shell initialization files like .bashrc or .profile located in your home directory.

Result

The scripts reports system environment settings in part derived from DAMASK/CONFIG. Additionally, it
  • exports the variable $DAMASK_NUM_THREADS according to the settings in DAMASK/CONFIG
  • adds DAMASK/lib to $PYTHONPATH such that the damask module can be properly imported in Python
  • adds $DAMASK_BIN to $PATH if necessary and possible
  • sets the limits for stack, heap, virtual memory, and physical memory via ulimit


parent_gray

A few words on memory limits

Please note: If you don't change the stack size, you might experience a stack overflow for large models, especially when using openMP. Should your simulation die with a segmentation or memory fault at an early stage this is most likely the reason.

Increase the stack size using the ulimit command in the parent shell.
  • The easiest way would be to run
    > ulimit -s unlimited
    or
    > ulimit -s hard
    which sets the stack size to unlimited (Linux) or 64 MiB (OS X). If you want another stack limit, you basically have to try which size is necessary for your model.

  • Another option (for the spectral solver and Intel Fortran only) is to append
    -Wl,-stack_size,0x40000000
    to the COMPILE_OPTIONS in DAMASK/code/makefile with 0x40000000 being an exemplary stack size of 1 GiB.

Determining the optimal stack size is difficult, a good start to read about it is http://software.intel.com/en-us/forums/topic/501500

This topic: Installation > SystemConfiguration
Topic revision: 12 Dec 2018, 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