Sorry if I’m unclear about you’re question, but I’m assuming that you’re seeing an error like the following?
% pgcc flt_max.c -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/
PGC-S-0039-Use of undeclared variable __FLT_MAX__ (flt_max.c: 6)
PGC/x86-64 Linux 19.10-0: compilation completed with severe errors
The problem here, is the GNU 4.8.5 float.h header files presume “FLT_MAX” gets predefined by the compiler but pgcc doesn’t predefine it. Instead, we ship our own “float.h” including it before the system float.h. However, if you put the GNU include file path on the compile line, the GNU float.h will get included first, so FLT_MAX isn’t defined.
Either don’t explicitly add the include path to the GNU headers (the path will get implicitly added in the correct order), or include the the path to the PGI version first.
“float.h” would be coming from your system’s GNU include files. We no longer ship our own wrapper “float.h” files since we now internally define things like “FLX_MAX”, like GNU does, so the wrapper is no longer needed.
What’s the actual error you’re seeing and which GNU version do you have installed?
What’s the value if “GCCINC” in your NVHPC Compiler installation’s configuration file (Linux_x86_64/20.9/compilers/bin/localrc or the file set in $NVLOCALRC).
I just tried on a CentOS8 system and it worked fine for me, but GCCINC is set correctly in my localrc:
set GCCINC= /usr/lib/gcc/x86_64-redhat-linux/8/include /usr/local/include /usr/include;
set GCCINC= /cm/shared/apps/spack/gpu/opt/spack/linux-centos8-cascadelake/intel-19.0.5.281/openmpi-4.0.4-gnk7ocykjviwjr7hxocujrxfdoiswqih/include /cm/shared/apps/spack/gpu/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/intel-19.0.5.281-on6hypwwqeum7akypqc2fahnowaukom4/include /usr/lib/gcc/x86_64-redhat-linux/8/include /usr/local/include /usr/include;
My guess is that the admins had intel loaded when they installed NVHPC.
That intel include folder is accessible though but in either case this looks like more of a question to the admins now.
That is odd, but if you need a work around, you can create you’re own localrc (via “makelocal -d . -x”) and then set the environment variable “NVLOCALRC=/full/path/to/localrc”. Note that you can rename “localrc” to anything you want.