1
0

Update README.md

This commit is contained in:
Niklas Birk 2024-07-27 15:44:21 +02:00
parent 5ae6d2540d
commit 5af19ae3af

View File

@ -1,6 +1,32 @@
# Project for PWR
Project in python for module "Praktikum Wissenschaftliches Rechnen" in "Applied Mathematics" at *TU Bergakademie Freiberg*.
# Task
Implement MPI parallel Matrix and Vector classes in Python and apply them to a numerical problem / algorithm.
Implement MPI parallel Matrix and Vector classes in Python and apply them to a numerical problem / algorithm.
1. Diagonalmatrix times vector
2. Matrix from exercise 1 times vector
3. Conjugated Gradient
# Structure of mains
## Timings in Shell
If you want to measure time with `time` and the whole program, then use the `main_[name].py` files.
Within the files you can set the size `n` of the matrix and vector.
See pbs script [pwr_project.script](./pbs_scripts/pwr_project.script) for automatic use on the cluster.
Following pythin scripts are the entry point for the tasks:
- [Diagonalmatrix times Vector](./src/main_diag_vec.py): [main_diag_vec.py](./src/main_diag_vec.py)
- [Matrix from exercise 1 times Vector](./src/main_matrix_vec.py): [main_matrix_vec.py](./src/main_matrix_vec.py)
- [CG](./src/main_cg.py): [main_cg.py](./src/main_cg.py)
## Specific timings
If you want to measure only the times a operation needs (without initializing),
then use the `main_[name]_timeit.py` files.
The matrix/vector size `n` must be provided via command line,
e.g. `python3 main_cg.py 100` for the CG with a matrix size of `100`.
See pbs script [pwr_project_timeit.script](./pbs_scripts/pwr_project_timeit.script) for automatic use on the cluster.
Following pythin scripts are the entry point for the tasks:
- [Diagonalmatrix times Vector](./src/main_diag_vec_timeit.py): [main_diag_vec.py](./src/main_diag_vec_timeit.py)
- [Matrix from exercise 1 times Vector](./src/main_matrix_vec_timeit.py): [main_matrix_vec.py](./src/main_matrix_vec_timeit.py)
- [CG](./src/main_cg_timeit.py): [main_cg.py](./src/main_cg_timeit.py)
## Weak scaling
For the weak scaling measurements use pbs script [pwr_project_timeit_weak.script](./pbs_scripts/pwr_project_timeit_weak.script).