Skip to content

High-Performance Computing: Fluid Mechanics with Python / University of Freiburg / SS2022

Notifications You must be signed in to change notification settings

petwu/hpc-with-python

Repository files navigation

HPC with Python

This repository is for the course High-Performance Computing: Fluid Mechanics with Python at the University of Freiburg in the summer semester 2022.

Contents

Report

The final report can be found here: report/report.pdf

Animation: Lid-Driven Cavity

m6_x300_y300_v0.03_Re1000.webm

The versioned video is located under report/media/m6_x300_y300_v0.03_Re1000.webm.

Setup

Install dependencies from PyPi using pip:

pip3 install -r requirements.txt

In order to run the parallelized code, you need some MPI implementation like OpenMPI.

Scaling Tests with Lid-Driven Cavity

A parametrizable implementation of the lid-driven cavity experiment can be run with the lid_driven_cavity.py script. Run

python3 lid_driven_cavity.py --help

for a list of possible arguments.

Use mpiexec in order to run it in parallel, e.g.:

mpiexec -n 16 python3 lid_driven_cavity.py -x 300 -y 300 -w 1.7 -n 100000

Milestones

Implementation of the milestones is located in src/milestones. Use milestone.py in order to run a specific milestone. See

python3 milestone.py --help

for usage information.

Report

The final report is located at report/main.pdf.

Building the report:

cd report
make report

This requires some LaTeX distribution (e.g. TeX Live) to be installed that includes lualatex and latexmk.

Reproducibility

All plots with results from experiments in the report can be reproduced:

cd report
make plots

The results of the scaling tests are versioned here: report/scaling/scaling.tar.gz.
In order to reproduce them, see report/scaling/README.md.

Tests

Run all unit tests in the test/ directory using the following command:

python3 -m unittest

The following naming conventions need to be applied in order for the test discovery to work:

  • the directory must be named test*
  • every (sub)directory need to be a package, i.e. they need a __init__.py file
  • all filenames need to match test*.py and must be valid identifiers, e.g. test_foo.py but not test-foo.py
  • all classes must extend unittest.TestCase
  • all test case method names must match test*

About

High-Performance Computing: Fluid Mechanics with Python / University of Freiburg / SS2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published