Code_Saturne will be installed as a module on VILJE. However it is useful to experience on compiling the software at a local computer. Code_saturne can be compiled with different options/parameters as linear algebra libraries, partitioning methods, mesh importing formats, MPI/OpenMP by using several different external libraries. This document helps to develop and debug the code after a successful installation. The user may try these options in a local computer and prepare his/her case before uploading the supercomputer with a batch script.
Unfortunately there is no suitable Code_Saturne package for installation to Windows operating system. However for the ones who have no access a Linux machines can use virtual machines or bootable USB sticks for Linux. The methodology is similar to OpenFOAM installation. More information can be found here:
In this page, practical information will be documented for installation on Linux. Users can download the source code and third part libraries from the links and follow the instructions. The detailed installation guide can be found on the official website of EFD:
Downloading necessary files
The instructions at this page are based on the version 3.0.1 and the source files can be downloaded from here http://code-saturne.org/cms/download/3.0 , for all other versions: http://code-saturne.org/releases/
Several optional libraries can be linked with the code for a more complete experience of Code_Saturne. These are:
This option is not necessary for VILJE. It should be installed for local computers to use GUI.
- Libxml2 must be installed. (Can be downloaded here: http://xmlsoft.org/downloads.html)
- PyQt and Qt must be installed.(http://www.riverbankcomputing.co.uk/software/pyqt/intro)
Mesh format for pre- and post-processing
- CGNS, is library and generic file format for CFD data, It is useful for importing mesh files from ANSYS. The binary files for version ( can be downloaded from http://cgns.sourceforge.net/ )
- MED is library and file format for the tool SALOME which is an open-source software that provides a generic platform for Pre- and Post-Processing for numerical simulations. The binary files for version, can be downloaded from here http://www.salome-platform.org/
- HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of data types, and is designed for flexible and efficient I/O and for high volume and complex data. It can be downloaded from here http://www.hdfgroup.org/HDF5/
The only compulsory pre-requisites needed are compilers for C/C++/Fortran (like GNU or Intel compilers) and a Python interpreter.
- MPI, is necessary for parallel computations. OpenMPI, MPICH2, Intel MPI or MPT (from SGI) must be installed in the system. VILJE has MPT installed. For installation at a local computer, OpenMPI is recommended. The library should be compiled with same compiler which will be used for building Code_Saturne in order to avoid possible compilation errors.
- ParMETIS/METIS, is a set of programs for partitioning graphs, partitioning finite element/volume meshes. METIS is serial and ParMETIS is MPI based parallel version. (http://glaros.dtc.umn.edu/gkhome/views/metis)
- PT-Scotch/Scotch, is another partitioning library. PT-Scotch works in parallel. (http://www.labri.fr/perso/pelegrin/scotch/scotch_en.html)
The last versions of these libraries can be downloaded from their official website and built the binaries through the system compiler (it should be the same compiler that is used for building Code_Saturne). However the binary versions which is built for suitable Linux version can be downloaded from SALOME’s website (it requires a free registration):
After downloading and installing the SALOME, the binaries of libxml2, CGNS, MED, HDF5, METIS and Scotch will be created. Those libraries will be used to built the Code_Saturne which will be described later in more detail. SALOME can also be used for pre/post process tool for the code. A tutorial for SALOME can be found at:
The libraries and source file should be copied in a folder that is accessible as a user and be extracted from the source tar file. The following script is prepared as an example to configure the Code_Saturne. At this script the compiler is GNU compiler and can be modified based on the system’s compiler. For example, for Intel compiler as in VILJE, the configuration options should be CC=icc CXX=icpc FC=ifort .It is recommended to build the version in a folder with a name representing the configuration options. Several builts with different options help to try several type of configurations.
Another example for configuration script is prepared for VILJE. In this script Intel compiler and MPI is loaded as a module. The GUI is disabled without using ‘libxml2’ option. ‘--enable-mpi-io’ and ‘--enable-openmp’ options activate MPI-IO and OpenMP. --with-blas option activates the BLAS (Basic Linear Algebra Subprograms) libraries which a set of low-level kernel subroutines that perform common linear algebra operations. Intel MKL library is installed at VILJE. Building Code_Saturne with this option may affect the performance of the code. Partition method is selected as Scotch by --with-scotch option.
After running the script, the logs can be tracked the configuration output at the log_config.txt and config.log files which is the default output. After configuring the options, for to build the code, run the two scripts below respectively and follow the log files (log_make, log_makeInstall)
After a successful compilation, the environment setting should be set in .bashrc file as follows:
where the path is pointing the binary file of the Code_Saturne based on the target at configuration options. Now ‘code_saturne’ is ready as a command with following options