git clone git@github.com:numpex/apps-petsc.git
The apps need the PETSc package.
Download it:
git clone -b release https://gitlab.com/petsc/petsc.git
The test of the mini-app app-hpddm-dfn is based on v3.23.6 so switch to this version to be sure that the test results match the references:
cd petsc
git checkout v3.23.6
Assuming that you have C/C++/Fortran compilers, MPI and CMake installed, configure with:
./configure --download-fblaslapack --download-slepc --download-hpddm --download-scalapack --download-mumps
To install basic compilers, MPI and CMake:
sudo apt install build-essential
sudo apt install libopenmpi-dev
sudo apt install cmake
By default, PETSc is compiled in debug mode. To compile it in optimized mode
and improve its performance, add --with-debugging=0 to the configure.
Compile with the command indicated at the end of the configure step, of kind:
make PETSC_DIR=/path/to/petsc PETSC_ARCH=arch-linux-c-debug all
Check with the command indicated at the end of the make step, of kind:
make PETSC_DIR=/path/to/petsc PETSC_ARCH=arch-linux-c-debug check
Exit PETSc directory:
cd ..
Set the PETSC_DIR and PETSC_ARCH variables in ~/.bashrc:
export PETSC_DIR=/path/to/petsc
export PETSC_ARCH=<arch install directory> (e.g. arch-linux-c-debug)
source ~/.bashrc
Go to the source directory of the PETSc apps repository:
cd apps-petsc/src
Compile app-hpddm-dfn:
make app-hpddm-dfn
You can format the source files through clang-format (.clang-format of PETSc v3.23.6):
make clang-format
Go to the root directory:
cd ..
Source the environment variables and launch the test:
source env.sh
run_test
To run a specific test directory:
run_test <test directory path>
To update the references:
run_test <test directory path> ref