Originally posted by: Andreas Herten
Dear Rafik,
I include my progress on the individual steps in the following.
xlc_configure w/o -gcc
I called xlc_configure without the -gcc option twice. In the first time, GCC 5.4.0 was still loaded by the module system available on the node, in the second time it was not. I configured xlc with
/gpfs/software/opt/xlc/16.1/xlC/16.1.0/bin/xlc_configure -o config_xlc -cuda /gpfs/software/opt/cuda/9.2.88 -cuda_cc_major 6 -cuda_cc_minor 0 -nosymlink
In both cases, xlc_configure returned no error; but compiling the OpenMP-enabled program did not work.
If I call xlc++ without any OpenMP flags, thus making the OpenMP statements to meaningless pragmas, the program compiles as expected.
-qinfo
I call xlc -qversion=verbose, once with the config which is using the system GCC (4.8.0) and once configured with the 5.4.0 GCC.
-
System GCC
$ xlc -qversion=verbose -F config_xlc
IBM XL C/C++ for Linux, V16.1.0 (Community Edition)
Version: 16.01.0000.0000
Driver Version: 16.1.0(C/C++) Level: 180412 ID: _cDgp0De0EeiRmNzegUH2Xw
C/C++ Front End Version: 16.1.0(C/C++) Level: 180412 ID: _d-hUqDz8EeiRm9zegUH2Xw
High-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _rAOlVzzZEeiRm9zegUH2Xw
Low-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _ayqxljzZEeiRm9zegUH2Xw
Intermediate Language Splitter Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _XXdUwfgWEeed2OHRoHeItA
W-Code to LLVM-IR Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _20SS0Bc1Eeid4OHRoHeItA
NVVM-IR to PTX Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _ePggcSCAEeiwhrbSB1AWhQ
/gpfs/software/opt/xlc/16.1/xlC/16.1.0//bin/.orig/xlc: note: XL C/C++ Community Edition is a no-charge product and does not include official IBM support. You can provide feedback at the XL on POWER C/C++ Community Edition forum (http://ibm.biz/xlcpp-linux-ce). For information about a fully supported XL C/C++ compiler, visit XL C/C++ for Linux (http://ibm.biz/xlcpp-linux).
-
GCC 5.4.0
$ xlc -qversion=verbose -F config_xlc
IBM XL C/C++ for Linux, V16.1.0 (Community Edition)
Version: 16.01.0000.0000
Driver Version: 16.1.0(C/C++) Level: 180412 ID: _cDgp0De0EeiRmNzegUH2Xw
C/C++ Front End Version: 16.1.0(C/C++) Level: 180412 ID: _d-hUqDz8EeiRm9zegUH2Xw
High-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _rAOlVzzZEeiRm9zegUH2Xw
Low-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _ayqxljzZEeiRm9zegUH2Xw
Intermediate Language Splitter Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _XXdUwfgWEeed2OHRoHeItA
W-Code to LLVM-IR Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _20SS0Bc1Eeid4OHRoHeItA
NVVM-IR to PTX Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _ePggcSCAEeiwhrbSB1AWhQ
/gpfs/software/opt/xlc/16.1/xlC/16.1.0//bin/.orig/xlc: note: XL C/C++ Community Edition is a no-charge product and does not include official IBM support. You can provide feedback at the XL on POWER C/C++ Community Edition forum (http://ibm.biz/xlcpp-linux-ce). For information about a fully supported XL C/C++ compiler, visit XL C/C++ for Linux (http://ibm.biz/xlcpp-linux).
New GCC
I followed along with your compilation instructions and created a dedicated GCC installation in $HOME/TMP/bug-report-temp/usr/local/. Unfortunately, the error stays the same.
# aherten at juron1-adm in ~/TMP/OpenMP-Offloading [15:42:59]
$ /gpfs/software/opt/xlc/16.1/xlC/16.1.0/bin/xlc_configure -o config_xlc -gcc $HOME/TMP/bug-report-temp/usr/local/ -cuda /gpfs/software/opt/cuda/9.2.88 -cuda_cc_major 6 -cuda_cc_minor 0 -nosymlink
INFORMATIONAL: Existing file "config_xlc" has been saved as "config_xlc.2018.7.18.15.43.4".
# aherten at juron1-adm in ~/TMP/OpenMP-Offloading [15:43:04]
$ xlc++ -F config_xlc -qsmp=omp -qoffload pi-gpu.c
In file included from /gpfs/software/opt/cuda/9.2.88/include/fatBinaryCtl.h:19:0,
from pi-gpu.fatbin.c:2,
from pi-gpu.fatbinwrap.c:2:
/gpfs/software/opt/xlc/16.1/xlC/16.1.0/include/stddef.h:34:19: error: missing binary operator before token "("
#if !__has_feature(modules)
^
/gpfs/software/opt/xlc/16.1/xlC/16.1.0/include/stddef.h:46:42: error: missing binary operator before token "("
#if !defined(_PTRDIFF_T) || __has_feature(modules)
^
/gpfs/software/opt/xlc/16.1/xlC/16.1.0/include/stddef.h:57:39: error: missing binary operator before token "("
#if !defined(_SIZE_T) || __has_feature(modules)
^
/gpfs/software/opt/xlc/16.1/xlC/16.1.0/include/stddef.h:71:42: error: missing binary operator before token "("
!defined(_RSIZE_T)) || __has_feature(modules)
^
In file included from pi-gpu.fatbin.c:2:0,
from pi-gpu.fatbinwrap.c:2:
/gpfs/software/opt/cuda/9.2.88/include/fatBinaryCtl.h:87:62: error: 'size_t' has not been declared
void* *elf, size_t *esize);
^
In file included from pi-gpu.fatbinwrap.c:8:0:
/gpfs/software/opt/cuda/9.2.88/include/crt/host_runtime.h:194:9: error: 'size_t' has not been declared
size_t size,
^
/gpfs/software/opt/cuda/9.2.88/include/crt/host_runtime.h:205:9: error: 'size_t' has not been declared
size_t size,
^
1586-346 (U) An error occurred during code generation. The code generation return code was 255.
$ xlc -qversion=verbose -F config_xlc
IBM XL C/C++ for Linux, V16.1.0 (Community Edition)
Version: 16.01.0000.0000
Driver Version: 16.1.0(C/C++) Level: 180412 ID: _cDgp0De0EeiRmNzegUH2Xw
C/C++ Front End Version: 16.1.0(C/C++) Level: 180412 ID: _d-hUqDz8EeiRm9zegUH2Xw
High-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _rAOlVzzZEeiRm9zegUH2Xw
Low-Level Optimizer Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level: 180412 ID: _ayqxljzZEeiRm9zegUH2Xw
Intermediate Language Splitter Version: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _XXdUwfgWEeed2OHRoHeItA
W-Code to LLVM-IR Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _20SS0Bc1Eeid4OHRoHeItA
NVVM-IR to PTX Translator: 16.1.0(C/C++) and 15.1.7(Fortran) Level 180412 ID: _ePggcSCAEeiwhrbSB1AWhQ
/gpfs/software/opt/xlc/16.1/xlC/16.1.0//bin/.orig/xlc: note: XL C/C++ Community Edition is a no-charge product and does not include official IBM support. You can provide feedback at the XL on POWER C/C++ Community Edition forum (http://ibm.biz/xlcpp-linux-ce). For information about a fully supported XL C/C++ compiler, visit XL C/C++ for Linux (http://ibm.biz/xlcpp-linux).
Do you have any further ideas?
#C/C++andFortran#Ask-Question-Here--General-Compiler-Q-and-A