Quick Start with LBM_Saclay

1. LBM_Saclay’s environment & documentation

For training session: LBM_Saclay’s documentation

  1. Open a terminal, and execute the command below for LBM_Saclay’s environment:

    $ source /tmp_formation/LBM_Saclay/lbm-env.sh
    

The shell script lbm-env.sh copies in your home a .bashrc and .profile for necessary paths and connexions. The script also copies the source files of LBM_Saclay and the folder of test cases run_training_lbm inside your /home/train.

  1. Open the LBM_Saclay’s documentation

    $ lbm-doc.sh &
    

lbm-doc.sh is an alias of command google-chrome https://cea-lbm-saclay.github.io/LBM_Saclay_Documentation/index.html

  1. Either a. or b./c.

  1. For SMEMaG LBM training go to the red box of 3. Compilation

  2. For Sorbonne University students go to First simulations on ORCUS: example with GPU partition

  3. For INSTN “Two-phase” training go to First simulations on ORCUS: example with GPU partition

Shared directories for DM2S/STMF users

TITANIA/OBERON: two main LBM directories exist

  • /tmp_formation/LBM_Saclay: free access. You will find the folder run_training_lbm which contains several test cases to start running LBM_Saclay; two versions of paraview and several presentations of LBM and phase-field models.

  • /home/lbm-saclay: shared directory for R&D contributors of LBM_Saclay. Send an email to alain.cartalade at cea.fr or teo.boutin at cea.fr to get access.

ORCUS: one shared directory exists

  • /tmpformation/LBM_Saclay: free access. One version of LBM_Saclay (kernel NSAC_Comp) is compiled for several graphic cards available on ORCUS (V100, A100 and H100).

  • First simulations on ORCUS: you can go directly to First simulations on ORCUS: example with GPU partition and follow the instructions.

To be completed

2. Get the source files of LBM_Saclay

Get access to the git repository on codev-tuleap.cea.fr

Get access to the git repository

Download LBM_Saclay

Download LBM_Saclay

To download either the Training version or the Rech-Dev version, open a terminal (or Konsole) and copy-paste one of two commands below:

e.g. for LBM_Saclay_Rech-Dev version:

$ git clone --recursive https://codev-tuleap.cea.fr/plugins/git/lbmsaclay/LBM_Saclay_Rech-Dev.git

e.g. for LBM_Saclay_Training version

$ git clone --recursive https://codev-tuleap.cea.fr/plugins/git/lbmsaclay/LBM_Saclay_Training.git

For training session

Copy file LBM_Saclay_Rech-Dev.tar

$ cp /tmp_formation/LBM_Saclay/LBM_Saclay_Rech-Dev.tar .

untar your file

$ tar -xvf LBM_Saclay_Rech-Dev.tar

The tar archive does not contain the latest version of LBM_Saclay.

3. Compilation

You can run your first simulations on CPUs of your personal desktop. However, it is highly recommended to run LBM_Saclay on one (or better on several) graphic cards (GPUs). You will find the procedure for compiling on single-CPU, single-GPU, and multi-GPU.

Makefile on CPU of local computer

  • For openmp (omp) on CPU

Go to LBM_Saclay folder

$ cd LBM_Saclay_Rech-Dev

and execute the configure_build.sh script to create the makefile

$ ./compilation/local/omp/configure_build.sh

will return:

The following problems are currently implemented:
0  AC
1  Advection-Diffusion
2  Crystal_growth_Younsi
3  GPMixt
4  GPMixtNS
5  GPMixtTernary
6  GPMuTernary
7  MPwSLphC
8  NS
9  NS_3phases_1comp_phase_change
10 NSAC_Comp
11 NSAC_Comp_3phases
12 NSAC_Comp_3phases3D
13 NSAC_coupling
14 NSAC_Fakhari
15 NSAC_Surfactant
Choose which problems to include by indicating a list of space or comma separated numbers, eg '0 1' or '0,1'.
Write 'all' to include all problems.
Problem numbers:

Compilation

Write 10 for NSAC_Comp kernel

Problem numbers: 10

Go to the directory that is indicated by the green link, e.g., if number 10 has been set for GPU:

$ cd LBM_Saclay_Rech-Dev/build_omp/build_NSAC_Comp

Compile:

$ make -j 22

Makefile on GPU

  • For cuda on GPU H100 of ORCUS

./compilation/orcus/cuda_h100/configure_build.sh

For GPU A100 and V100, modify only cuda_h100 by cuda_a100 (A100) or cuda_v100 (V100)

  • For cuda on A6000 of MANWE

./compilation/manwe/cuda_a6000/configure_build.sh

Compilation errors

For compilation errors, it is useful to write the exits inside an output file e.g. compil.log:

$ make -j 22 2>&1 | tee compil.log

or alternatively compil2.log

$ make VERBOSE=1 2>&1 | tee compil2.log

4. Run your first test case on your local CPU

It is recommended to start with a test case of folder run_training_lbm (see list of test cases on Practice of two-phase flows with test cases of run_training_lbm) and execute on your local computer. For example:

For training session: local computer

Go to one test case of run_training_lbm, e.g. TestCase01_Poiseuille_Water:

$ cd ~/run_training_lbm/TestCase01_Poiseuille_Water

Run LBM_saclay with the input file name.ini

$ ~/LBM_Saclay_Rech-Dev/build_omp/build_NSAC_Comp/src/LBM_saclay TestCase01_Poiseuille_Water.ini

5. Post-processing with Paraview

For training session

For post-processing TestCase01_Poiseuille_Water, open paraview12

$ paraview12&

and follow the instructions in Run “Single phase test cases”

The .bashrc file contains an alias for paraview versions 5.11 and 5.12 in /tmp_formation/LBM_Saclay. In paraview, open the .vti files. For post-processing the .h5 (HDF5) files open the .xml file and clic on XDMF Reader.

For training session: post-processing with paraview

For post-processing .xmf and .h5 files for videos use paraview11

$ paraview11&

For comparison with analytical solutions, use paraview12

$ paraview12&

and follow tutorials presented in Practice of two-phase flows with test cases of run_training_lbm.

Section author: Alain Cartalade