The birthright nodes have 2 GPUS each. We will use one of them to do a Vecor addition in this challenge.
The birthright nodes have 2 GPUS each. We will use one of them to do a vector addition in this challenge.
## VecAdd.c
VecAdd.c adds two vectors A and B to produce C, where Ci = Ai + Bi. This version of code was brought to you Lustre Birthright scratch space during the Globus challenge.
...
...
@@ -113,7 +113,14 @@ Standard SBATCH directives:
#SBATCH --gres=gpu:2
```
We will also use NVprof, NVIDIA's built-in profiler. It will show you that your code is running on the GPU and also give you performance information about the code.
To use nvprof issue:
```
mpirun nvprof ./vecAdd.o
You must use --gres=gpu:2 to tell the job to use the node's GPUs.
### Challenge 2 Submit a GPU Job with SLRUM
Below is a batch script to run the VecAdd.o that you compiled on the GPU. Fill in the blanks using your knowledge of the SLURM batch directives