The first two assignments are peer assessed. They are an opportunity to learn about basics from and with each other. The later assignments are assessed based on runtime performance and require good command of the basic skills you practices in the first half of the course.
Please observe that it can be difficult to reach the required performance on a highly saturated training system, as it sometimes happens to be during the computer lab sessions.
This is subject to peer assessment. It is allowed and suggested to complete each task, and then consult with your peer assessment group for feedback before starting the next task.
You can find an example program at
/home/hpc2023/cell_distances/cell_distances -t10
A reference implementation in Julia is available at
/home/hpc2023/cell_distances/cell_distances.jl
You can find test data in the folder
/home/hpc2023/cell_distances/test_data
Further test data can be created by the script
/home/hpc2023/cell_distances/create_cell_file.py
You can check your submission with the script
/home/hpc2023/cell_distances/check_submission.jl PATH_TO_SUMISSION.tar.gz
For instance, if you have provided your submission in the file /home/hpcuser223/cell_distances.tar.gz
, then you run
/home/hpc2023/cell_distances/check_submission.jl /home/hpcuser223/cell_distances.tar.gz
Recall that your submission has to pass this script for you to pass this assignment. So test before submitting.
Notice that the test script
checks your output for correctness,
redirects stdout to a file, so that additional runtime costs for writing to disc can apply.
For each column in the next table, there is a file describing an initial configuration available in
/home/hpc2023/cell_distances/test_data
Number of points | 1e4 | 1e5 | 1e5 | 1e5 |
Number of threads | 1 | 5 | 10 | 20 |
Maximal runtime in seconds | 0.31 | 6.86 | 3.65 | 2.02 |
You can find an example program at
/home/hpc2023/newton_iteration/newton -t2 -l1000 5
A reference implementation in Julia is available at
/home/hpc2023/newton_iteration/newton.jl
You can find more images created with this program in the folder
/home/hpc2023/newton_iteration/
You can check your submission with the script
/home/hpc2023/newton_iteration/check_submission.jl PATH_TO_SUMISSION.tar.gz
Recall that your submission has to pass this script for you to pass this assignment. So test before submitting.
The script also generates two PNG-pictures in the folder pictures, which gives an indication of whether you program yields correct output.
The program will be tested with the following arguments. It must be at least as fast as given in the corresponding tables.
Note that it is best to check the png-files generated by the test script for correctness and not the ppm-files. You can also use the convert command to produce png-files from your ppm-files. There are numerous incorrect implementations of the ppm-format around. Most notably, on Mac some non-conformant ppm-files are displayed as if correct.
Degree of polynomial | 1 | 2 | 5 | 7 |
Maximal runtime in seconds | 0.15 | 0.18 | 0.42 | 0.69 |
Number of threads | 1 | 2 | 3 | 4 |
Maximal runtime in seconds | 0.42 | 0.27 | 0.20 | 0.18 |
Number of lines | 1000 | 2000 | 3000 |
Maximal runtime in seconds | 0.17 | 0.39 | 0.78 |
You find an example program at
/home/hpc2023/diffusion_opencl/diffusion -n20 -d0.02
A reference implementation in Julia is available at
/home/hpc2023/diffusion_opencl/diffusion.jl
You can find further test data in the folder
/home/hpc2023/diffusion_opencl/test_data
Further test data can be created by the script
/home/hpc2023/diffusion_opencl/create_init_file.py
You can check your submission with the script
/home/hpc2023/diffusion_opencl/check_submission.jl PATH_TO_SUMISSION.tar.gz
For each column in the next table, there is a file describing an initial configuration available in
/home/hpc2023/diffusion_opencl/test_data
Width * Height | 100 * 100 | 10000 * 10000 | 100000 * 100 |
Diffusion constant | 0.01 | 0.02 | 0.6 |
Number of iterations | 100000 | 1000 | 200 |
Time in seconds | 0.96 | 15.6 | 0.74 |
MPI on gantenbein is organized as a module. Before using it run
module load mpi
You find an example program at
mpirun -n 1 /home/hpc2023/diffusion_mpi/diffusion -n20 -d0.02
You can check your submission with the script
/home/hpc2023/diffusion_mpi/check_submission.jl PATH_TO_SUMISSION.tar.gz
For each column in the next table, there is a file describing an initial configuration available in
/home/hpc2023/diffusion_opencl/test_data
Width * Height | 100 * 100 | 100 * 100 | 10000 * 10000 | 10000 * 10000 | 10000 * 10000 | 100000 * 100 | 100000 * 100 |
Diffusion constant | 0.01 | 0.01 | 0.02 | 0.02 | 0.02 | 0.6 | 0.6 |
Number of iterations | 100000 | 100000 | 1000 | 1000 | 1000 | 200 | 200 |
Number of MPI processes | 1 | 10 | 2 | 5 | 10 | 1 | 5 |
Time in seconds | 4.61 | 5.34 | 93.0 | 43.0 | 25.8 | 7.60 | 4.87 |
Observe that the second case allows for a slower runtime with more CPU compared to the first one, checking the parallelization overhead in case of small arrays.