But the compilation immediately fails with the output in the attached .txt file.
I have installed the NVIDIA HPC SDK:
nvc++ 20.7-0 LLVM 64-bit target on x86-64 Linux -tp knl
NVIDIA Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
There is gcc 7.4.0 on my PC:
g++ (Debian 7.4.0-6) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And CUDA version 11 and NVIDIA GPU driver version 455.23.05:
Building C object CMakeFiles/cmTC_db1fc.dir/testCCompiler.c.o
/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvcc -acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70 -o CMakeFiles/cmTC_db1fc.dir/testCCompiler.c.o -c /data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeTmp/testCCompiler.c
nvcc fatal : 'cmodel=medium': expected a number
The C compiler is called “nvc”, but here you’re trying to use “nvcc”, which is the CUDA C++ compiler so doesn’t recognize the “-mcmodel=medium” option. Try setting "-DCMAKE_C_COMPILER=nvc ".
I have another PC with CPU Intel Core i7 and GPU NVIDIA Geforce GTX 650 Ti (cc30) and OS Fedora 23.
It is rather an old operating system. Will Linux_x86_64 Tarball downloaded from https://developer.nvidia.com/nvidia-hpc-sdk-downloads work on it or I have to update my OS from Fedora 23 to the current Fedora version? And does NVIDIA HPC SDK nvc++ compiler support this old GPU NVIDIA Geforce GTX 650 Ti (compute capability 3.0)? If it doesn’t support, the compiler nvc++ will not work with this graphics card or nevertheless I can try launching the code on GPU Geforce GTX 650 Ti using nvc++ compiler?