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

I am working on the code: GitHub - AndStorm/QUESTION .
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 “-fastPGI 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):

...
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.

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:

% 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

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!