sunfluidh:makefile_configuration
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
sunfluidh:makefile_configuration [2021/04/28 17:14] – yann | sunfluidh:makefile_configuration [2021/04/30 18:47] (Version actuelle) – [Compiler options] yann | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
===== How to configure the makefile ===== | ===== How to configure the makefile ===== | ||
+ | [[sunfluidh: | ||
+ | ----- | ||
==== Fortran compilers ==== | ==== Fortran compilers ==== | ||
The code sunfluidh is programmed in fortran 95 and 2003. | The code sunfluidh is programmed in fortran 95 and 2003. | ||
A makefile (named makefile) is present in the directory ' | A makefile (named makefile) is present in the directory ' | ||
- | * the inlet compiler (ifort) | + | * the intel compiler (ifort) |
* the GNU compiler (gfortran) | * the GNU compiler (gfortran) | ||
Common information on fortran compiler' | Common information on fortran compiler' | ||
- | ===== Makefile setup ===== | + | ==== Makefile setup ==== |
You have to set up the makefile in accordance with the computing environment and the simulation type. In the file ' | You have to set up the makefile in accordance with the computing environment and the simulation type. In the file ' | ||
* Compiler options | * Compiler options | ||
* Labels for the code configuration | * 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 | ==== Compiler options | ||
Ligne 24: | Ligne 28: | ||
* AMD_OPT=YES or NO : enable (or not) some additional optimization options for AMD architecture (Intel CPU). Options are : -mavx2. 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' | * ADD_USER_OPT= .... . The user can add its own compiler' | ||
- | | + | |
* LOCAL (the default value) : the access path to external libraries is implicitly defined in the Operating System of the host. The usual fortran option " | * LOCAL (the default value) : the access path to external libraries is implicitly defined in the Operating System of the host. The usual fortran option " | ||
- | | + | |
- | * ' | + | * ' |
- | ==== Code configuration | + | ==== 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 " | + | In order to configure the code in the suitable form (2D, 3D, parallelisation mode,...), labels are used to set the variable " |
So, this variable must just be set as CODE_CONFIG= LABEL1 LABEL2 ... | So, this variable must just be set as CODE_CONFIG= LABEL1 LABEL2 ... | ||
+ | |||
The common labels to use are : | The common labels to use are : | ||
* -DDIM3D | * -DDIM3D | ||
Ligne 48: | Ligne 53: | ||
The default configuration proposed in the makefile is : CODE_CONFIG= -DSHARED_DISK -DDIM2D | The default configuration proposed in the makefile is : CODE_CONFIG= -DSHARED_DISK -DDIM2D | ||
- | |||
- | |||
- | |||
- | The code works with some specific blocks of instructions selected during the compilation in respect with the simulation setup (2D or 3D, parallel computation, | ||
- | |||
- | | ||
- | | ||
- | |||
- | The available labels in the code sunfluidh are : | ||
- | * DIM2D or DIM3D associated to the 2D or 3D configuration. One of these labels must be necessary present for the compilation. | ||
- | * MPI : MPI parallelisation (based on the domain decomposition approach). The compilation must be performed with the mpi wrapper instead of the usual compiler command (for instance mpiifort in place of ifort, mpif90 in place of pgif95, mpifort in place of gfortran, ...). Please contact the system administrator if you have any doubt. | ||
- | * OPENMP : The OpenMP parallelization of the code is performed during the compilation. Don't forget to set also the usual OpenMP option for the fortran compiler : -fopenmp with gfortran, -openmp with ifort, -mp with pgf95, -qsmp=omp with xlf95. | ||
- | * SHARED_DISK : This label is used in order to handle some backup/ | ||
- | * HYPRE : HYPRE Library (with MPI) | ||
- | |||
- | These labels must be placed in the variable CODE_CONFIG (see examples in the makefile).\\ | ||
- | |||
- | Set the different variables related to the paths in order to access to the suitable libraries. The path variables depend on our system environment. Sometimes they can be leave empty (library not used, access path already defined by the system) | ||
- | |||
- | * For LAPACK : PATH_LAPACK= ... | ||
- | * For SCALAPACK : PATH_SCALAPACK= ... | ||
- | * For HYPRE : PATH_HYPRE= ... ; INCLUDE_HYPRE=... | ||
- | * etc ... | ||
- | |||
- | You can define new access path variables if needed (use of other libraries not explicitly mentioned here) and add them in the variables LDFLAGS_LIB (for the compile process) and/or LDFLAGS_EXE (for the link-edit process). | ||
+ | [[sunfluidh: |
sunfluidh/makefile_configuration.1619622844.txt.gz · Dernière modification : 2021/04/28 17:14 de yann