Installation of Code Saturne

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 , for all other versions:

Several optional libraries can be linked with the code for a more complete experience of Code_Saturne. These are:

Graphical Interface(GUI):

This option is not necessary for VILJE. It should be installed for local computers to use GUI.

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 )
  • 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
  • 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

The only compulsory pre-requisites needed are compilers for C/C++/Fortran (like GNU or Intel compilers) and a Python interpreter.

Parallel computing

  • 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.

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.

${SOURCE}/configure --prefix=${TARGET}/target_scotch_cgns_med_hdf5 \
--with-hdf5=/home/user/code_saturne/salome_7.2.0/hdf5-1.8.10 \
CC=gcc CXX=g++ FC=gfortran 2>&1 | tee log_config.txt

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.

module load
intelcomp/13.0.1 mpt/2.06
${SOURCE}/configure --prefix=${TARGET}/intel_mpt/ptscotch/mk_hd_cg_io_omp/target_v3.0.1 \
--with-mpi \
--with-zlib \
--disable-gui \
--enable-mpi-io \
--enable-long-gnum \
--enable-openmp \
CC=icc CXX=icpc FC=ifort 2>&1 | tee log_config.log

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)

module load mpt/2.06 
module load
make CC=icc CXX=icpc FC=ifort 2>&1 | tee log_make

module load mpt/2.06 
module load
make install CC=icc CXX=icpc FC=ifort 2>&1 | tee 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

Scroll to Top