Multiple Processor Targets. STMicroelectronics PGI
Reklama
Reklama
Chapter 7. Using an Accelerator
If you use the
–Minfo
flag, you get messages similar to the following: s1:
12, PGI Unified Binary version for -tp=barcelona-64 -ta=host
18, Generated an alternate loop for the inner loop
Generated vector sse code for inner loop
Generated 1 prefetch instructions for this loop s1:
12, PGI Unified Binary version for -tp=barcelona-64 -ta=nvidia
15, Generating copy(b(:,2:90))
Generating copyin(a(:,2:90))
16, Loop is parallelizable
18, Loop is parallelizable
Parallelization requires privatization of array t(2:90)
Accelerator kernel generated
16, !$acc do parallel
18, !$acc do parallel, vector(256)
Using register for t
The PGI Unified Binary message shows that two versions of the subprogram s1
were generated:
• one for no accelerator (
–ta=host
)
• one for the NVIDIA GPU (
–ta=nvidia
)
At run time, the program tries to load the NVIDIA CUDA dynamic libraries and test for the presence of a GPU. If the libraries are not available or no GPU is found, the program runs the host version.
You can also set an environment variable to tell the program to run on the NVIDIA GPU. To do this, set
ACC_DEVICE to the value
NVIDIA
or nvidia
. Any other value of the environment variable causes the program to use the host version.
Note
The only supported
–ta
targets for this release are nvidia
and host
.
Multiple Processor Targets
With 64-bit processors, you can use the
–tp
flag with multiple processor targets along with the
–ta
flag. You see the following behavior:
• If you specify one
–tp
value and one
–ta
value:
You see one version of each subprogram generated for that specific target processor and target accelerator.
• If you specify one
–tp
value and multiple
–ta
values:
The compiler generates two versions of subprograms that contain accelerator regions for the specified target processor and each target accelerator.
• If you specify multiple
–tp
values and one
–ta
value:
If 2 or more
–tp
values are given, the compiler generates up to that many versions of each subprogram, for each target processor, and each version also targets the selected accelerator.
• If you specify multiple
–tp
values and multiple
–ta
values:
99
Stáhnout
Reklama