Outils pour utilisateurs

Outils du site


sunfluidh:makefile_configuration

How to configure the makefile

Fortran compilers

The code sunfluidh is programmed in fortran 95 and 2003. A makefile (named makefile) is present in the directory 'TRUNK/DATA/MAKEFILE_DIR' in order to help you to compile the code. Two compilers are available :

  • the intel compiler (ifort)
  • the GNU compiler (gfortran)

Common information on fortran compiler's options can be found here.

Makefile setup

You have to set up the makefile in accordance with the computing environment and the simulation type. In the file 'makefile', two sets of parameters are proposed in two sections named:

  • Compiler options
  • Labels for the code configuration

Using proposed set of options make easier the compilation stage but the user feels free to define his own options, particularly about the compiler options.

Compiler options

These parameters define the compiler and compilation options used.

  • COMPILER_TYPE=IFORT or GNU : compiler choice between ifort and gfortran. Default value is GNU
  • LEVEL_OPT= DEBUG, OPT_O2, OPT_O3 : select the level of compilation, debug level, medium optimization level or high optimization level. Default value is OPT_O3
  • SKYLAKE_OPT=YES or NO : enable (or not) some additional optimization options for skylake Intel architecture (Intel CPU). Options are : -axAVX,SSE4.2 -xCORE-AVX512 -qopt-zmm-usage=high. Default value is NO.
  • REPORT_OPT=NO : Create a report about compiler's vectorization (optons= -qopt-report=3 -qopt-report-phase=vec). For Intel CPU only. Default value is NO
  • AMD_OPT=YES or NO : enable (or not) some additional optimization options for AMD architecture (Intel CPU). Options are : -mavx2. Default value is NO
  • ADD_USER_OPT= …. . The user can add its own compiler's options
  • HOSTLIBS=LOCAL, AUTO or GRAPPE : define how to access to external libraries used by the code (i.e lapack) in regard to the host environment (the computer). At present, three cases are predefined :
    • LOCAL (the default value) : the access path to external libraries is implicitly defined in the Operating System of the host. The usual fortran option “-l” is used.
    • MODULE : the access path to external libraries is enabled by means of the “module” command (see the documentation about “module”). No specific action in the makefile is required.
    • 'hostname' (i.e. GRAPPE) : the access path must be explicitly stated in the makefile. This procedure is made for the cluster Grappe at present.

Labels for the code configuration

In order to configure the code in the suitable form (2D, 3D, parallelisation mode,…), labels are used to set the variable “CODE_CONFIG” defined inside the makefile.
So, this variable must just be set as CODE_CONFIG= LABEL1 LABEL2 …

The common labels to use are :

  • -DDIM3D : for 3D geometrical configuration
  • -DDIM2D : for 2D geometrical configuration
  • -DMPI : for MPI parallelisation with domain docomposition approach
  • -DOPENMP : Multithreading parallelisation using OpenMP
  • -DSHARED_DISK : files are stored on disks shared by all processors (this default option must always be enable if possible)
  • -DNOLIBS : Special flag to disable any compilation entailing the external libraries

Some other labels are available and can be used in specific cases

  • -DHYPRE : link the HYPRE scientific Library
  • -DHDF5 : specific output files of the code formatted with hdf5 format (for Radiation DOM only)
  • -DGET_MPI_GRAPHICAL_CONFIG : only to build the file that describes the MPI subdomain distribution according to a MPI graphical topology

The default configuration proposed in the makefile is : CODE_CONFIG= -DSHARED_DISK -DDIM2D

Click here to come back to the previous page

sunfluidh/makefile_configuration.txt · Dernière modification: 2021/04/30 18:47 de yann