Skip to content

Testing with devices

Richard R. Drake edited this page Jun 8, 2022 · 1 revision

The word "device" generally means a computational accelerator of some sort. The most common example (by far) is the GPU.

Analogous to "np", tests can specify an "ndevice" parameter in test files, such as

#VVT: parameterize : ndevice = 0 2 4

or

#VVT: parameterize (platforms="ATS2") : np,ndevice = 44,0 1,4

By default, no devices are assumed on the platform, and so any test with ndevice>0 will be not be run.

For a workstation, tell vvtest there are devices available by giving the option --max-devices=<integer>. This is analogous to the -N option. Tell vvtest how many devices to run concurrently with the --devices=<integer> option (analogous to the -n option). If the --devices value is greater than the --max-devices value, then you are oversubscribing the devices (which should be fine depending on the work load).

For a batch system, such as ATS-2, the number of devices per compute node is specified in the config/platform_plugin.py file (along with the number of processors per node). When running vvtest --batch, the number of compute nodes allocated for each test is the max of those needed to satisfy the number of processors and the number of GPUs.