Hands-On: Warmup (starting a job)
PreparationYou should be able to log into the VSC-4 system (see the "pre-assignment" sent out by Dr. Blaas-Schenner).
The source code for the exercises can be copied from ~ghager. E.g., for copying the DIV code to your home directory, type:
$ cp -a ~ghager/DIV ~
Since we have a limited number of nodes reserved for the course, it is mandatory to start short batch jobs to run code on the cluster nodes. We have provided a template job script for your convenience:
$ cp ~ghager/job.sh ~
It loads the Intel compiler and LIKWID modules by default. The walltime limit for jobs submitted by the training accounts is set to 10 minutes so that everyone can get their share of the reserved nodes during the hands-on sessions. Please make sure your experiments run quickly (< 1 minute)!
You can submit the job script using the sbatch command:
$ sbatch job.sh
VSC-4 uses a modules system to provide software packages. You can compile code on the frontend and load any necessary runtime modules within a batch job.
As a first exercise, copy the code for a simple benchmarking harness:
$ cp -a ~ghager/SCAN ~ $ cd SCAN $ make clean $ make
Take a look at the makefile. By default, C and Fortran versions of the code are built, but you can change everything to your liking. The source code shows you how to write a microbenchmark that executes a given piece of code often enough so that the runtime is larger than some threshold.
Modify the generic job script and use it to submit a job to the cluster that runs the generated binary.