@@ -8,6 +8,8 @@ A step-by-step guide is provided and with each exercise you will find one or mor
...
@@ -8,6 +8,8 @@ A step-by-step guide is provided and with each exercise you will find one or mor
For all the exercises, we are going to use Tegner. **Even though you may have a laptop with a CUDA-supported GPU, we encourage you to use this during the labs.** For the purposes of this laboratory, we will use the "Thin Nodes" of Tegner.
For all the exercises, we are going to use Tegner. **Even though you may have a laptop with a CUDA-supported GPU, we encourage you to use this during the labs.** For the purposes of this laboratory, we will use the "Thin Nodes" of Tegner.
To connect Tegner, first connect to the Dardel login node and obtain a Kerberos token by running ``kinit``. Thereafter, connect to Tegner using ``ssh tegner`` from the Dardel login node.
In this first block A of the laboratory, we are going to introduce you to the world of GPU programming using CUDA. We will begin explaining how to how to compile and run a given program. Thereafter, we will ask you to create your first CUDA program using a CPU implementation of a SAXPY function as reference.
In this first block A of the laboratory, we are going to introduce you to the world of GPU programming using CUDA. We will begin explaining how to how to compile and run a given program. Thereafter, we will ask you to create your first CUDA program using a CPU implementation of a SAXPY function as reference.
## Exercise A1: Experimental Setup
## Exercise A1: Experimental Setup
...
@@ -49,8 +51,8 @@ The previous command asks ``nvcc`` to compile ``lab01_ex1.cu`` and to generate a
...
@@ -49,8 +51,8 @@ The previous command asks ``nvcc`` to compile ``lab01_ex1.cu`` and to generate a
Now, let us allocate one node on Tegner to run our program. We need to ask ``salloc`` for the type of nodes that we want, which will be the "Thin Nodes" of Tegner (i.e., ``-C Haswell``) :
Now, let us allocate one node on Tegner to run our program. We need to ask ``salloc`` for the type of nodes that we want, which will be the "Thin Nodes" of Tegner (i.e., ``-C Haswell``) :
Here, we are asking for 5 minutes of computation time on one single node of the "Thin Nodes" of Tegner. In addition, we are specifying that we want to get access to the GPU resource of the node with the ``--gres=gpu:K420:1`` option.
Here, we are asking for 5 minutes of computation time on one single node of the "Thin Nodes" of Tegner. In addition, we are specifying that we want to get access to the GPU resource of the node with the ``--gres=gpu:K420:1`` option.