NGC | Catalog
Welcome Guest


For pull tags and more information, please view on a desktop device.
Logo for LBPM


LBPM is an open source software framework designed to model flow processes based on digital rock physics


Open Porous Media Initiative

Latest Tag



July 1, 2022

Compressed Size

566.13 MB

Multinode Support


Multi-Arch Support


2020.10 (Latest) Scan Results

Linux / arm64

Linux / amd64


LBPM (Lattice Boltzmann Methods for Porous Media) is an open source software framework designed to model flow processes based on digital rock physics, and is freely available through the Open Porous Media project. Digital rock physics refers to a growing class of methods that leverage microscopic data sources to obtain insight into the physical behavior of fluids in rock and other porous materials. LBPM simulation protocols are based on two-fluid lattice Boltzmann methods, focusing in particular on wetting phenomena. To learn more about LBPM and the computational methods it uses checkout "An Adaptive Volumetric Flux Boundary Condition for Lattice Boltzmann Methods".

System requirements

Before running the NGC LBPM container please ensure your system meets the following requirements.

  • One of the following container runtimes
  • One of the following NVIDIA GPU(s)
    • Pascal(sm60)
    • Volta (sm70)
    • Ampere (sm80)


  • CPU with AVX instruction support
  • One of the following CUDA driver versions
    • >= r460
    • r450 (>=.80.02)
    • r440 (>=.33.01)
    • r418 (>=.40.04)


  • Marvell ThunderX2 CPU
  • CUDA driver version >= r460


The following examples simulate water-flooding using the NGC LBPM container. In an experimental setting, water is pumped into a sample at a particular flow rate to displace oil from the pore space. The examples will use a flux boundary condition to mimic this same basic approach. LBPM Tutorial, Step 8. Simulating Water Flooding (Part I).

To run this simulation we must download three files:

  • input.db: Information regarding the intended domain structure and domain decomposition provided to LBPM
  • mask_water_flooded_water_and_oil.raw.morphdrain.raw: A digital rock image stored as a raw binary file
  • A helper script that sets common command line arguments and should be placed within the benchmark data directory

Although the lbpm_* command line utilities may be called directly within the NGC LBPM container this example will utilize a convenience script, The environment variable BENCHMARK_DIR will be used throughout the example to refer to the directory containing the three files listed above.

chmod +x

Running with nvidia-docker

docker run --rm --gpus all -v $BENCHMARK_DIR:/benchmark -w /benchmark

Note: Docker < v1.40

Docker versions below 1.40 must enable GPU support with --runtime nvidia.

docker run --rm --runtime nvidia -v $BENCHMARK_DIR:/benchmark -w /benchmark

Running with Singularity

singularity run --nv -B $BENCHMARK_DIR:/benchmark --pwd /benchmark docker:// ./

Note: Singularity < v3.5

There is currently an issue in Singularity versions below v3.5 causing the LD_LIBRARY_PATH to be incorrectly set within the container environment. As a workaround The LD_LIBRARY_PATH must be unset before invoking Singularity:

LD_LIBRARY_PATH="" singularity run --nv -B $PWD:/benchmark --pwd /benchmark docker:// ./

Running multi-node with Slurm and Singularity

Clusters running the Slurm resource manager and Singularity container runtime may launch parallel LBPM experiments directly through srun. The NGC LBPM container supports pmi2, which is available within most Slurm installations, as well as pmix3. A typical parallel experiment would take the following form.

srun --mpi=pmi2 [srun_flags] singularity run --nv [singularity_flags] [lbpm_executable] [lbpm_input.db]

An example Slrum batch script that may be modified for your specific cluster setup may be viewed here.


By pulling and using the container, you accept the terms and conditions of the LBPM License

Suggested Reading

The LBPM repository

Full LBPM tutorial

Performance Testing with LBPM

An Adaptive Volumetric Flux Boundary Condition for Lattice Boltzmann Methods