OpenMP

Note that passing grades for this assignment will not appear on Canvas.

For a description of the assignment task see the HPC website.

Programming language

Do not diverge from the choice of programming language. You have to use C for the program code and GNU Make for the makefiles. Based on past years' experience, C++ is not an option.

Submission format

You submit your code as a tar.gz-file in the format detailed below. Make sure before submitting that the file that you submit passes the check script provided on gantenbein (as opposed to your own or any other computer). In particular, your code must compile and run on gantenbein.

Makefile

You have to include a makefile, whose standard target builds all required executables. For example, if you have to provide executables main1 and main2, then the following must work

make
./main1
./main2

The makefile must also provide a clean target that shall remove all files resulting from compilation, but no more than that. For example, if you provide two files, main.c and makefile, and running the executable main yields another file called outputfile, then

make
./main
make clean

should preserve main.c, makefile, and outputfile, but delete main.o (if present) and main.

Submission archive

Your solution to must be packaged as a tar.gz-archive and uploaded to Canvas. Make sure to check the directory structure in the tar-file and adhere to the requirements of the check script. For example, the following commands produce different tar-files:

tar czf submit.tar.gz code/main.c code/makefile
tar czf submit.tar.gz main.c makefile

Canvas quirks

One submission per group suffices, since Canvas will attach uploads to all members of a group. However, if a group member forgot to join the group on Canvas before the upload, the uploaded solution will not be attached to them. In this case (prior to the deadline) re-upload the solution after they joined the Canvas group.

Example Program

You can find an example program at

/home/hpc2024/cell_distances/cell_distances -t10

A reference implementation in Julia is available at

/home/hpc2024/cell_distances/cell_distances.jl

You can find test data in the folder

/home/hpc2024/cell_distances/test_data

Further test data can be created by the script

/home/hpc2024/cell_distances/create_cell_file.py

Check script

You can check your submission with the script

/home/hpc2024/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/hpc2024/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 check script redirects stdout to a file, so that additional runtime costs for writing to disc can apply.

Correctness

The check script compares the counts produced by the program against several reference solutions, which reflect legitmate interpreations of the required rounding rules.

Performance

For each column in the next table, there is a file describing an initial configuration available in

/home/hpc2024/cell_distances/test_data

TBA

Threads

Note that passing grades for this assignment will not appear on Canvas.

For a description of the assignment task see the HPC website.

Programming language

Do not diverge from the choice of programming language. You have to use C for the program code and GNU Make for the makefiles. Based on past years' experience, C++ is not an option.

Submission format

You submit your code as a tar.gz-file in the format detailed below. Make sure before submitting that the file that you submit passes the check script provided on gantenbein (as opposed to your own or any other computer). In particular, your code must compile and run on gantenbein.

Makefile

You have to include a makefile, whose standard target builds all required executables. For example, if you have to provide executables main1 and main2, then the following must work

make
./main1
./main2

The makefile must also provide a clean target that shall remove all files resulting from compilation, but no more than that. For example, if you provide two files, main.c and makefile, and running the executable main yields another file called outputfile, then

make
./main
make clean

should preserve main.c, makefile, and outputfile, but delete main.o (if present) and main.

Submission archive

Your solution to must be packaged as a tar.gz-archive and uploaded to Canvas. Make sure to check the directory structure in the tar-file and adhere to the requirements of the check script. For example, the following commands produce different tar-files:

tar czf submit.tar.gz code/main.c code/makefile
tar czf submit.tar.gz main.c makefile

Canvas quirks

One submission per group suffices, since Canvas will attach uploads to all members of a group. However, if a group member forgot to join the group on Canvas before the upload, the uploaded solution will not be attached to them. In this case (prior to the deadline) re-upload the solution after they joined the Canvas group.

Example Program

You can find an example program at

/home/hpc2024/newton_iteration/newton -t2 -l1000 5

A reference implementation in Julia is available at

/home/hpc2024/newton_iteration/newton.jl

You can find more images created with this program in the folder

/home/hpc2024/newton_iteration/

Check script

You can check your submission with the script

/home/hpc2024/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.

Correctness

Note that it is best to check the png-files generated by the check 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.

Performance

The program will be tested with the following arguments. It must be at least as fast as given in the corresponding tables.

TBA

OpenCL

This assignment is not formally part of the course, and provided to the challenge-seeking students for historical reasons.

For a description of the assignment task see the HPC website.

Example Program

You find an example program at

/home/hpc2024/diffusion_opencl/diffusion -n20 -d0.02

A reference implementation in Julia is available at

/home/hpc2024/diffusion_opencl/diffusion.jl

You can find further test data in the folder

/home/hpc2024/diffusion_opencl/test_data

Further test data can be created by the script

/home/hpc2024/diffusion_opencl/create_init_file.py

Check script

You can check your solution with the script

/home/hpc2024/diffusion_opencl/check_submission.jl PATH_TO_SUMISSION.tar.gz

Correctness

The check script compares the computed results against reference values with generous margins applied. These margins reflect the fact that numerical operations can be highly sensitive to order of execution which is not the focus topic of the present assignment.

Performance

The following values are merely provided to convey an idea of which solutions successfully incorporate the idea taught in the course.

For each column in the next table, there is a file describing an initial configuration available in

/home/hpc2024/diffusion_opencl/test_data

TBA

MPI

This assignment is not formally part of the course, and provided to the challenge-seeking students for historical reasons.

For a description of the assignment task see the HPC website.

Example Program

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/hpc2024/diffusion_mpi/diffusion -n20 -d0.02

Test script

You can check your submission with the script

/home/hpc2024/diffusion_mpi/check_submission.jl PATH_TO_SUMISSION.tar.gz

Correctness

The check script compares the computed results against reference values with generous margins applied. These margins reflect the fact that numerical operations can be highly sensitive to order of execution which is not the focus topic of the present assignment.

Performance

The following values are merely provided to convey an idea of which solutions successfully incorporate the idea taught in the course.

For each column in the next table, there is a file describing an initial configuration available in

/home/hpc2024/diffusion_opencl/test_data

TBA