can not compile the C++ code using OpenAcc and PGI 19.4 to launch on Titan V GPU from KNL

OpenACC and CUDA Fortran
Post Reply
@and
Posts: 31
Joined: Sep 22 2017

can not compile the C++ code using OpenAcc and PGI 19.4 to launch on Titan V GPU from KNL

Post by @and » Tue Sep 03, 2019 11:21 am

I am working on the code: https://github.com/AndStorm/QUESTION.git .
This code properly works on Intel Core i7 and GeForce GTX 650 Ti system both on CPU and GPU with "-Minline" either with or without "-fast" PGI compiler flag.

I tried to compile it on Xeon Knights Landing (KNL) with Nvidia TITAN V GPU installed in KNL through PCI-Express.
I use the compile line written in README.md of the repository.
CUDA Toolkit 9.2 is installed on the system, the OS is Debian, x86_64. PGI 19.4 pgc++ compiler.
But the compilation fails with an error (ERROR.txt in the repository):

Code: Select all

...
pgc++-Error-CUDA Fortran is not supported on Knights Landing host systems
pgc++-Error-OpenACC for Tesla GPU targets is not supported on Knights Landing host systems
I tried to specify the target processor knl or haswell, but the error is the same.

I used to compile a similar simpler and smaller C++ code (using cudaMemcpy() and compiler flags "-Mnollvm -Mcuda8.0") for launching on Nvidia TITAN V GPU fixed in KNL using OpenAcc and PGI 18.x pgc++ compilers and had no problem.

What is the reason for the error?
And what a way out can be in such a situation?

It is a disaster for me, because my task is to compare the performance of CPU-optimized code with the GPU-optimized code, which i am working at now.

mkcolg
Posts: 8048
Joined: Jun 30 2004

Re: can not compile the C++ code using OpenAcc and PGI 19.4 to launch on Titan V GPU from KNL

Post by mkcolg » Tue Sep 03, 2019 1:18 pm

Hi @and,

Sorry about that. We were still working on KNL support when it was announced that the processor was being discontinued, so we decided it was best to make it very explicit that we don't support KNL+Tesla. Note by "support", we're meaning that if you do encounter an issue specific to KNL+Tesla, it's not something we'll fix.

Though, I'm a bit surprised that using "-tp=haswell" didn't work for you since it does for me:

Code: Select all

% pgc++ -c -ta=tesla nbody.cpp -tp=knl --c++17 -w -V19.4
pgc++-Error-OpenACC for Tesla GPU targets is not supported on Knights Landing host systems
% pgc++ -c -ta=tesla nbody.cpp -tp=haswell --c++17 -w -V19.4
%
-Mat

@and
Posts: 31
Joined: Sep 22 2017

Re: can not compile the C++ code using OpenAcc and PGI 19.4 to launch on Titan V GPU from KNL

Post by @and » Wed Sep 04, 2019 9:58 am

I beg Your pardon. It is my fault. If to set -tp=haswell in the compile line, the code works properly.
Thank You very much for Your suppport and help!

Post Reply