|
# Introduction
|
|
# Introduction
|
|
`td` codes require machines equipped with GPUs. The standard scenario assumes that the number of parallel MPI processes is equal number of GPUs. It is the user responsibility to provide correct prescription that uniquely assigns GPU devices to MPI processes. This step depends on the archituctture of target machine. To set up correctly prfile of target machine you need to modify `predefines.h`. To printout on screen applied mapping of MPI processes to GPUs use:
|
|
`td` codes require machines equipped with GPUs. The standard scenario assumes that the number of parallel MPI processes equals the number of GPUs. The user must provide the correct prescription that uniquely assigns GPU devices to MPI processes. This step depends on the architecture of the target machine. To set up the correct profile of the target machine, you need to modify `machine.h`. To printout on screen applied mapping of MPI processes to GPUs use:
|
|
```c
|
|
```c
|
|
/**
|
|
/**
|
|
* Activate this flag in order to print to stdout
|
|
* Activate this flag in order to print to stdout
|
... | @@ -9,7 +9,7 @@ |
... | @@ -9,7 +9,7 @@ |
|
```
|
|
```
|
|
|
|
|
|
# Machine with uniformly distributed GPU cards of the same type
|
|
# Machine with uniformly distributed GPU cards of the same type
|
|
It it the most common case. In such case it is sufficient to use default settings, by commenting out:
|
|
It is the most common case. In such case, it is sufficient to use default settings by commenting out:
|
|
```c
|
|
```c
|
|
/**
|
|
/**
|
|
* Activate this flag if target machine has non-standard distribution of GPUs.
|
|
* Activate this flag if target machine has non-standard distribution of GPUs.
|
... | @@ -20,17 +20,17 @@ It it the most common case. In such case it is sufficient to use default setting |
... | @@ -20,17 +20,17 @@ It it the most common case. In such case it is sufficient to use default setting |
|
* */
|
|
* */
|
|
// #define CUSTOM_GPU_DISTRIBUTION
|
|
// #define CUSTOM_GPU_DISTRIBUTION
|
|
```
|
|
```
|
|
and in input file setting number of GPUs that each node is eqquipped with:
|
|
and in the input file setting number of GPUs that each node is equipped with:
|
|
```bash
|
|
```bash
|
|
gpuspernode 1 # number of GPUs per node (resource set), default=1
|
|
gpuspernode 1 # number of GPUs per node (resource set), default=1
|
|
```
|
|
```
|
|
You need to execute the code with number of MPI processes equal number of GPUs. For example, if each node is eqquipped with one GPU and you plan to run the code on 512 nodes you should call it as (schematic notation):
|
|
You need to execute the code with the number of MPI processes equal number of GPUs. For example, if each node is equipped with one GPU and you plan to run the code on 512 nodes, you should call it as (schematic notation):
|
|
```bash
|
|
```bash
|
|
mpirun -n 512 --ntasks-per-node=1 ./td-wslda-3d input.txt
|
|
mpirun -n 512 --ntasks-per-node=1 ./td-wslda-3d input.txt
|
|
```
|
|
```
|
|
|
|
|
|
# Machine with non-uniform distribution of GPUs
|
|
# Machine with non-uniform distribution of GPUs
|
|
In such case you need to define GPUs distribution. As example consider machine that has 7 nodes and cards are diistributes as follow (content of file `nodes.txt`):
|
|
In such a case, you need to define GPUs distribution. For example, consider machine that has 7 nodes, and cards are distributed as follow (the content of file `nodes.txt`):
|
|
```bash
|
|
```bash
|
|
node2061.grid4cern.if.pw.edu.pl slots=8
|
|
node2061.grid4cern.if.pw.edu.pl slots=8
|
|
node2062.grid4cern.if.pw.edu.pl slots=8
|
|
node2062.grid4cern.if.pw.edu.pl slots=8
|
... | @@ -40,7 +40,7 @@ node2065.grid4cern.if.pw.edu.pl slots=4 |
... | @@ -40,7 +40,7 @@ node2065.grid4cern.if.pw.edu.pl slots=4 |
|
node2066.grid4cern.if.pw.edu.pl slots=4
|
|
node2066.grid4cern.if.pw.edu.pl slots=4
|
|
node2067.grid4cern.if.pw.edu.pl slots=8
|
|
node2067.grid4cern.if.pw.edu.pl slots=8
|
|
```
|
|
```
|
|
GPU distribution is defined as follow:
|
|
GPU distribution is defined as follows:
|
|
```c
|
|
```c
|
|
/**
|
|
/**
|
|
* Activate this flag if target machine has non-standard distribution of GPUs.
|
|
* Activate this flag if target machine has non-standard distribution of GPUs.
|
... | | ... | |