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 :
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 :
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)
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).