Code_Saturne

What is Code_Saturne?

Code_Saturne is general-purpose Computational Fluid Dynamics (CFD) software of Électricité de France (EDF), one of the world’s largest producers of electricity. Code_Saturne solves the Navier-Stokes equations for 2D, 2D-axisymmetric and 3D flows, steady or unsteady, laminar and turbulent, incompressible or weakly dilatable, isothermal or not, with scalars transport if required.

Obtaining Code_Saturne

Code_Saturne is an open-source code, freely available for CFD practitioners and other scientists. Download the latest version of the software at the official Code_Saturne Web page, http://code-saturne.org/cms/. There, you can also follow the Forum with interesting questions about installation problems, general usage, and examples.

Building Code_Saturne for Blue Gene/Q

On machines with different front-end (or login nodes) and back-end node (or compute nodes) architectures, such as Blue Gene/Q, cross-compiling is necessary. To install and run Code_Saturne, two builds are required:

  • A “front-end” build, based on the front-end node’s architecture. This is the build whose code_saturne command, GUI, and documentation will be used, and with which meshes may be imported (i.e., whose preprocessor will be used). This build is not intended for calculations, though it could be used for mesh quality criteria checks. This build will thus usually not need MPI.
  • A “back-end” build, cross-compiled to run on the compute nodes. This build doesn’t need to include the GUI, documentation, or the preprocessor.

An example of front-end and back-end builds with XL compilers is presented below. Specify the installation prefix with the variable INSTALLPATH=`pwd`, for example. You will find some optional third-party libraries required by Code_Saturne depending on your simulation at <Software & Libraries URL: user-guides/software-and-libraries>. Note: not all are installed on the BG/Q systems (for example, libxml2, cgns, med, libccmio, scotch). Remember to built them in a separate directory (CS_OPT) if you need to use them.

Example of front-end build:

../code_saturne-3.0.0/configure \
--prefix=$INSTALLPATH/arch/frontend \
--with-cgns=$CS_OPT/cgns-3.1/arch/frontend \
--with-scotch=$CS_OPT/scotch-5.1.11/arch/frontend \
CC=xlc CFLAGS="-O3 -qstrict" \
CXX=xlcxx CXXFLAGS="-O3 -qstrict" \
FC=xlf95 FCFLAGS="-O3 -qstrict" \
PYTHON=/usr/bin/python2.6 \
make
make install

Example of back-end build:

../code_saturne-3.0.0/configure \
--prefix=$INSTALLPATH/arch/bgq \
--with-zlib=/soft/libraries/alcf/current/xl/ZLIB \
--with-hdf5-lib=/soft/libraries/hdf5/1.8.10/cnk-xl/current/lib \
--with-hdf5-include=/soft/libraries/hdf5/1.8.10/cnk-xl/current/include \
--with-metis=/soft/libraries/alcf/current/xl/PARMETIS \
--with-blas=/soft/libraries/essl/current --with-blas-type=ESSL \
--with-cgns=$CS_OPT/cgns-3.1/arch/bgq \
--with-scotch=$CS_OPT/scotch-5.1.11/arch/bgq \
--with-libxml2=$CS_OPT/libxml2-2.7.8/bgq \
--disable-sockets --disable-dlloader --disable-nls \
--disable-frontend --enable-long-gnum \
--build=ppc64-redhat-linux --host=powerpc64-bgq-linux \
--enable-openmp \
--enable-shared=no \
PYTHON=/usr/bin/python2.6 \
CC=mpixlc_r CFLAGS="-qarch=qp -O3 -qstrict" \
CXX=mpixlcxx_r CXXFLAGS="-qarch=qp -O3 -qstrict" \
FC=bgxlf95_r FCFLAGS="-qarch=qp -O3 -qstrict" \
HDF5_LIBS="-L/soft/libraries//hdf5/1.8.10/cnk-xl/current/lib -hdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -lm" \
make
make install