This code has been tested under Ubuntu 22.04 or higher. Other Linux distributions will probably work. However, we do not recommend using Windows or MacOS. If you do not have Linux installed on your computer, please use WSL, Virtual Machine, Docker or similar.
On Ubuntu, start with the installation of all required build essentials:
apt install build-essential gcc g++ pkg-config
- Under Ubuntu you can simply run
apt install libopenmpi-devto install OpenMPI.
- Please install PETSc on your system.
- We recommend to use
apt install petsc-devto install.
- Run
apt install cmaketo install CMake on your system.
A prebuilt Docker image is available in Dockerhub.
To use the prebuilt image, we do recommended that you first clone NS-EOF, then navigate into the NS-EOF checkout
and run the Docker container interactively by mapping the NS-EOF directory into the container (here, we use work as our mapping point):
docker run -it -v ${PWD}:/work --rm --privileged tumi5/ns-eof /bin/bashNavigate into the work directory and continue with the steps below.
As build system configurator we use CMake. To compile the code execute the following commands in this directory:
- Create a build directory:
mkdir build. You can also choose any other name for your build directory. - Switch to this directory:
cd build - Run CMake:
cmake ..(for an overview of all available options, useccmake ..) - For a
Debugbuild, runcmake .. -DCMAKE_BUILD_TYPE=Debug - Run Make:
make(ormake -jto compile with multiple cores). - Run Tests: Some basic unit tests have been implemented (
make test). Feel free to add your own test cases inside theTestsfolder.
- Run the code in serial via
./NS-EOF-Runner path/to/your/configuration- Example:
./NS-EOF-Runner ../ExampleCases/Cavity2D.xml
- Example:
- Run the code in parallel via
mpirun -np nproc ./NS-EOF-Runner path/to/your/configuration- Example:
mpirun -np 4 ./NS-EOF-Runner ../ExampleCases/Cavity2DParallel.xml
- Example:
You can add new source files by just creating them somewhere within the Source folder. CMake automatically detects these files and adds them to the build.
Make sure to use make clean before you use make. Sometimes there are build artifacts from previous build processes that spoil your current compilation process. make clean takes care of deleting everything that should not be there and allows the compiler to start from scratch.
Sometimes it is also helpful to delete the build folder and create a new one, following the steps from the compilation section above.
Instead of using make, run VERBOSE=1 make. You can also run make -n to invoke a dry run where you see what the Makefile would do in case of compilation.
Instead of using make test, run ctest --verbose.
Just ignore these warnings. If you run the code in serial, PETSc does not require the two parameters for parallel runs and vice versa.
This repository contains the team version of the NS-EOF parallel solver, developed as part of the High-Performance Computing course at TUM.
- Implemented optimized velocity buffer communication (
cagatay_velocity_buffersbranch). - Assisted in performance testing and parallel HDF5 output handling.
- Participated in MPI domain decomposition and solver validation.