Skip to content

lpc3d

This module tests the LPC3D software developed in the MultiXscale project (https://github.com/multixscale/LPC3D).

EESSI_LPC3D

Bases: RunOnlyRegressionTest, EESSI_Mixin

This test case simulates NMR spectra and diffusion of a liquid within a disorder porous carbon, based on a mesoscopic model.

LPC3D is an OpenMP parallelized code. As such, this test will only be instantiated on scales up to 1 full node. The runtime is in the order of seconds to minutes.

The input file contains a number of steps on the 9th line. This may be adjusted to adjust the total runtime of this test. However, the reference number for the sanity check then also needs to be adjusted.

assert_diffusion()

Assert that the diffusion coefficient at timestep 100 matches to within a certain margin. Note that if the number of iterations is changed in the lattice_gas.inpt file, the reference for the diffusion coefficient (ref_diffusion_coef) needs to be adjusted.

required_mem_per_node()

Defines the required memory per node to run this test

set_numba_num_threads()

On some systems, the NUMBA_DEFAULT_NUM_THREADS does not match the actual job allocation, but defaults to 1 instead. This is problematic since if Numba's set_num_threads is called with a value that is higher than NUMBA_NUM_THREADS (which initializes to NUMBA_DEFAULT_NUM_THREADS), you get a hard error. To avoid relying on correct detection of NUMBA_DEFAULT_NUM_THREADS, we set NUMBA_NUM_THREADS explicitely

time()

LPC3D reports total runtime as a performance number. Note that this times an aggregate of both serial and parallel sections of the code.

validate()

This is the sanity function for this test. Currently, it only checks that assert_diffusion is true, but this may be expanded with additional sanity checking if needed.

filter_singlenode_scales()

Filtering function that returns only single node scales.