Code Saturne

From Alcf
Jump to: navigation, search

Contents

What is Code_Saturne?

Code Saturne is the EDF's general purpose Computational Fluid Dynamics (CFD) software. EDF stands for √Člectricit√© de France, one of the world's largest producers of electricity.

Obtaining Code_Saturne

Code_Saturne is an open source code, freely available for the CFD practitioners and other scientists too. You can download the latest version from the Code_Saturne Official Forum Web Page and you can also follow the Forum with interesting questions about installation problems, general usage, examples, etc.

Building Code_Saturne for Blue Gene/P

The version currently available on Intrepid is the last official stable release '2.0.1'. A set of 5 main packages need to be built to obtain Code_Saturne executables for the front-end and the back-end (see below frontend and bgp, respectively). ECS and NCS are the basic libraries and BFT, FVM and MEI are compulsory auxiliary libraries.

Specify the installation prefix with the variable INSTALLPATH=`pwd`, for example. Do not forget to built previously a set of optional libraries (CS_OPT) that you may need depending on your case, ex: swig, libxml2, cgns, med, libccmio, etc. Some of them can be found in the repository /home/mgarcia/saturne/opt if needed.

BFT - Base Functions & Types Libraries -

  bgp
  ---
  $ ../../bft-1.1.4/configure \
    --prefix=$INSTALLPATH/arch/bgp \
    --without-zlib \
    CC=mpixlc \
    CFLAGS="-qarch=450d -qtune=450 -O3" \
    --build=ppc64 \
    --host=ppc \
    --disable-malloc-hooks
 
  frontend
  --------
  $ ../../bft-1.1.4/configure \
    --prefix=$INSTALLPATH/arch/frontend \
    CC_ADD=-m64 \
    LD_ADD=-m64
 
  frontend_python
  ---------------
  $ ../../bft-1.1.3/configure \
    --prefix=$INSTALLPATH/arch/frontend_python


FVM - Finite Volume Mesh Library -

  bgp
  ---
  $ ../../fvm-0.15.2/configure \
    --prefix=$INSTALLPATH/arch/bgp \
    --with-bft=$INSTALLPATH/arch/bgp \
    --with-hdf5=/soft/apps/current/hdf5-1.8.5-patch1 \
    --without-med \
    --without-cgns \
    CC=mpixlc \
    CFLAGS="-qarch=450d -qtune=450 -O3" \
    --build=ppc64 \
    --host=ppc \
    LD_ADD=-R/soft/apps/ibmcmp/lib/bg/bglib \
    LIBS="/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/lib/libstdc++.a -L/soft/apps/current/zlib-1.2.5/lib -lz"
 
frontend
--------
  $ ../../fvm-0.15.2/configure \
    --prefix=$INSTALLPATH/arch/frontend \
    --with-bft=$INSTALLPATH/arch/frontend \
    --with-med=$CS_OPT/med-2.3.6/arch/Linux_ppc64 \
    --with-hdf5=$CS_OPT/hdf5-1.6.10/arch/Linux_ppc64 \
    --with-cgns=$CS_OPT/cgnslib_2.5/arch/Linux_ppc64 \
    CC_ADD=-m64 \
    LD_ADD=-m64 \
    LIBS="-L$CS_OPT/zlib-1.2.5-64bit/lib -lz -lm"


MEI - Mathematical Expressions Interpreter Library -

  bgp
  ---
  $ ../../mei-1.0.2/configure \
    --prefix=$INSTALLPATH/arch/bgp \
    --with-bft=$INSTALLPATH/arch/bgp \
    --disable-python-bindings \
    CC=mpixlc \
    CFLAGS="-qarch=450d -qtune=450 -O3" \
    --build=ppc64 \
    --host=ppc
 
  frontend_python
  ---------------
  $ ../../mei-1.0.2/configure \
    --prefix=$INSTALLPATH/arch/frontend_python \
    --with-bft=$INSTALLPATH/arch/frontend_python \
    --with-swig-exec=$CS_OPT/swig-1.3.40/arch/Linux_ppc64/bin \
    --with-python-exec=/soft/apps/fen/python-2.6.5/bin


ECS - Code_Saturne Preprocessor -

  frontend
  --------
  $ ../../ecs-2.0.1/configure \
    --prefix=$INSTALLPATH/arch/frontend \
    --with-bft=$INSTALLPATH/arch/frontend \
    --with-hdf5=$CS_OPT/hdf5-1.6.10/arch/Linux_ppc64 \
    --with-med=$CS_OPT/med-2.3.6/arch/Linux_ppc64 \
    --with-cgns=$CS_OPT/cgnslib_2.5/arch/Linux_ppc64 \
    --with-metis=/soft/apps/fen/metis-4.0 \
    --with-adf-lib=$CS_OPT/libccmio-2.6.1/lib/linux64_2.6-pwr4-glibc_2.3.3/release-shared \
    --with-ccm-include=$CS_OPT/libccmio-2.6.1 \
    --with-ccm-lib=$CS_OPT/libccmio-2.6.1/lib/linux64_2.6-pwr4-glibc_2.3.3/release-shared \
    CC_ADD=-m64 \
    LD_ADD=-m64 \
    LIBS="-L$CS_OPT/zlib-1.2.5-64bit/lib -lz -lm" \
    LDFLAGS="-L$CS_OPT/hdf5-1.6.10/arch/Linux_ppc64/lib"


NCS - Code_Saturne Kernel and Graphical User Interface -

  bgp
  ---
  $ ../../ncs-2.0.1/configure \
    --prefix=$INSTALLPATH/arch/bgp \
    --with-bft=$INSTALLPATH/arch/bgp \
    --with-fvm=$INSTALLPATH/arch/bgp \
    --with-mei=$INSTALLPATH/arch/bgp \
    --with-prepro=$INSTALLPATH/arch/frontend \
    --with-libxml2-lib=$CS_OPT/libxml2-2.6.32/arch/bgp/lib \
    --with-libxml2-include=$CS_OPT/libxml2-2.6.32/arch/bgp/include/libxml2 \
    --with-blas=/soft/apps/ESSL-4.4 \
    --with-python-exec=/soft/apps/fen/python-2.6.5/bin \
    --with-pyqt4-exec=/soft/apps/fen/python-2.6.5/bin \
    --disable-sockets \
    --disable-dlloader \
    --disable-nls \
    --disable-french \
    CC=mpixlc_r \
    FC=bgxlf90_r \
    CFLAGS="-O3" \
    FCFLAGS="-O3" \
    --build=ppc64 \
    --host=ppc \
    LIBS=/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/lib/libstdc++.a
 
  frontend
  --------
  $ ../../ncs-2.0.1/configure \
     --prefix=$INSTALLPATH/arch/frontend \
     --with-bft=$INSTALLPATH/arch/frontend \
     --with-fvm=$INSTALLPATH/arch/frontend \
     --without-mei \
     --with-prepro=$INSTALLPATH/arch/frontend \
     --with-python-exec=/soft/apps/fen/python-2.6.5/bin \
     --disable-sockets \
     --disable-dlloader \
     --disable-nls \
     --disable-french \
     CFLAGS=-m64 \
     FCFLAGS=-m64 \
     LDFLAGS=-m64 \
     --disable-static \
     --with-pyqt4-exec=/soft/apps/fen/python-2.6.5/bin


Do not forget to do:

  $ make
  $ make install
  $ make distclean

after each configure line (front-end and back-end) of each package.


Using HPCToolkit with Code_Saturne

HPCToolkit is a performance tool. You can find a brief description on how to use it in the following page: Rice HPCToolkit. Follow these steps to use it with Code_Saturne:

  • Compile the individual source files as usual, adding the flag for debugging symbols if not already used. for example:
    CFLAGS="-O3 -g" \
  • Link using the hpclink command before the name of the compiler normally used to link the program. With Code_Saturne, you only need to replace the 'make' command to build the NCS package for the backend like this:
  $ make CCLD="hpclink mpixlc_r"
Personal tools