Outils pour utilisateurs

Outils du site


sunfluidh:makefile_configuration

Ceci est une ancienne révision du document !


How to configure the makefile

The code sunfluidh is programmed in fortran 95 and 2003. A makefile (named makefile) is present in the directory 'TRUNK/DATA' in order to help you. Some examples are present with different compilers :

  • xlf95 (the IBM compiler used on the computer TURING at IDRIS)
  • pgf95 (the PGI compiler)
  • ifort (inlet compiler)
  • gfortran (the GNU compiler)

Common information on fortran compiler's options can be found here.
The code works with some specific blocks of instructions that must be selected during the compilation in respect with the configuration of the simulation (2D or 3D, parallel calculation, etc …). This is performed with the principle of conditional compilation : these instructions are selected and compiled by means of the option “-cpp” (with ifort and gfortran) or “-Mpreprocess” (with pgi) or “-WF,” (with xlf) and a specific label connected to the configuration wanted. For example

   ifort  ... -cpp -DLABEL1 -DLABEL2  ...
   gfortran  ... -cpp -DLABEL1 -DLABEL2   ...
   pgif95 ... -Mpreprocess -DLABEL1 -DLABEL2  ...
   xlf95  ... -WF,-DLABEL1 , -DLABEL2  ...
   

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/restart files of the code in the particular context of parallel computing on distributed systems. By default this label must be present (even if the computation is not parallel or parallel on shared systems). If all the hard disks of the computing system can be seen by every cores, this label must also be present. Otherwise, when each group of hard disk is only plugged into a group of cores (each core sees only a group of hard disk), this label must be removed. Please contact the code's developer (Yann Fraigneau) if you have any doubt on this part.
  • NOLIBS : use this label if you want to compile the code without calling external libraries such as lapack, blas. (Note that you won't be able to use some solver such as Partial diagonalisation). If the label NOLIBS is absent then you must indicate in the makefile the links to external libraries (blas, lapack…).
Traductions de cette page:
  • fr
sunfluidh/makefile_configuration.1544014250.txt.gz · Dernière modification : 2018/12/05 13:50 de witko

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki