Skip to content

Testing installation

Alexey Matveichev edited this page Dec 1, 2021 · 7 revisions

Simple way

The one proposed in Source pack installation guide on http://openfoam.org. Just use cavity tutorial to check if icoFoam solver is running (note, run is just alias for cd $FOAM_RUN).

$ mkdir -p "$FOAM_RUN"
$ run
$ cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .
$ cd cavity
$ foamRunTutorials

as from time to time the patch errors only appear while running in parallel, one can run the case in parallel (assuming you've stayed in the cavity folder):

$ cat > system/decomposeParDict
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      decomposeParDict;
}

numberOfSubdomains 4;

method          scotch;
^D
$ decomposePar
$ mpiexec -np 4 icoFoam -parallel

Right way

Surely icoFoam solver can run fine. Even in parallel case. But there can be still problems with the installation. So actually the right way is to check your own cases (for example, this way my colleague discovered a problem with clang compiled limitedLimitedCubic scheme).

Alltest in tutorials folder

In the $FOAM_TUTORIALS folder there is a file Alltest. It creates a copy of tutorials folder, changes controlDicts to run just for one step and then executes tutorials. This is also a way to test the installation. Certain tutorials will fail due to absent gnuplot, or cause they expect other cases to run longer than for one time step.