A compilation of all assignments from CP431 - Parallel Programming course, written in C / Python / Cython using MPI on the Teach Cluster.
- Determines the largest gap between a pair of consecutive prime numbers, up to 1, 000, 000, 000, 000 (one trillion).
To post a job to the scheduler, use
mpicc
to compile your code to a file called "main".
mpicc main_no_gmp.c -o main -lgmp -lmpi
Then, simply run the shell script (TIME -> HH:MM:SS)
sbatch start_job.sh <TIME>
- Implements a parallel merging algorithm to merge two sorted arrays of numbers.
Compilation
mpicc -o <FILE> <file.c>
Run MPI
mpirun <FILE>
Run NUM copies of the program on set nodes
mpicc test.c -o test
mpirun -np <NUM> ./test
Use hardware threads as independent CPUs
mpirun -np <NUM> --use-hwthread-cpus ./test