Skip to content

hewitt/CppNoddy

Repository files navigation

Build a Docker container (real arithmetic) with PETSc/SLEPc

This will generate a docker container for CppNoddy, including PETSc/SLEPc compiled with Intel’s MKL LAPACK implementation.The build will take some time and the container will be quite large because of PETSc+SLEPc+MKL (approx. 3GB).

docker build --rm --build-arg HOST_UID=$(id -u) -f Dockerfile_RealPetscSlepcMKL -t real-mkl https://github.com/hewitt/CppNoddy.git#:docker

For the *”complex”* arithmetic version of PETSc, replace “Dockerfile_RealPetscSlepcMKL” with “Dockerfile_ComplexPetscSlepcMKL” and change the tag to “-t complex-mkl”.

Run the Docker container and self-test codes

This mounts the current directory ($PWD) as /CODE in the container. Any output generated within the container should be directed to /DATA, which in this case points to a user directory ~/data outside the container.

docker container run -ti --log-driver none --rm -u $(id -u):$(id -g) -v $PWD:/CODE -v ~/data:/DATA -w /CODE real-mkl:latest

cd /home/noddy/CppNoddy/build
ninja test

Build a smaller Docker container with only native Ubuntu LAPACK/BLAS support.

This should be much quicker, but because it is the netlib version of the LAPACK library. The container will also be substantially smaller.

docker build --rm --build-arg HOST_UID=$(id -u) -f Dockerfile_Lapack -t lapack https://github.com/hewitt/CppNoddy.git#:docker

Run the Docker container and self-test codes

This mounts the current directory ($PWD) as /CODE in the container. Any output generated within the container should be directed to /DATA, which in this case points to a user directory ~/data outside the container.

docker container run -ti --log-driver none --rm -u $(id -u):$(id -g) -v $PWD:/CODE -v ~/data:/DATA -w /CODE lapack:latest

cd /home/noddy/CppNoddy/build
ninja test

Build locally for real arithmetic with PETSc/SLEPc

You will need accessible lapack(64)/blas(64) libs. If slepc=petsc=true you will also need a separately installed PETSc/SLEPc instance.

meson build --prefix=/home/username/local
meson configure -Dslepc=true -Dpetscd=true build

cd build
ninja reconfigure
ninja
ninja test
ninja install

for complex PETSc, use “-Dpetscz=true”.

About

Object-oriented numerical library for applied mathematics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages