Update exercises/exerciseB/README.md

This commit is contained in:
Aitor Morales-Gregorio 2025-09-25 17:49:09 +02:00
parent 7a4e67d886
commit 0ce634c05c

View file

@ -13,7 +13,8 @@ the number of steps in the domain. To do this, we calculate and print the
relative differences between the analytic result and the numerical result relative differences between the analytic result and the numerical result
for different values of the number of steps. for different values of the number of steps.
**TASKS**: **Exercise**:
0. Read `numerical_integration.py` and familiarize yourselves with the code. 0. Read `numerical_integration.py` and familiarize yourselves with the code.
1. Update the `main` function so that it calculates the numerical error without 1. Update the `main` function so that it calculates the numerical error without
any parallelization. You can use a `for` loop or `map`. any parallelization. You can use a `for` loop or `map`.
@ -22,6 +23,7 @@ for different values of the number of steps.
4. Compare the timing for the parallel version with the serial time. 4. Compare the timing for the parallel version with the serial time.
What speed-up did you get? What speed-up did you get?
**BONUS TASKS (very optional)**: **Optional**:
5. Implement a parallel version with threads (using `multiprocessing.pool.ThreadPool`). 5. Implement a parallel version with threads (using `multiprocessing.pool.ThreadPool`).
6. Time this version, and hypothetize about the result. 6. Time this version, and hypothetize about the result.