Occa: Compilation fails with PGI compiler

Created on 28 Apr 2020  路  7Comments  路  Source: libocca/occa

The compilation fails when using the PGI Community Edition Version 19.10.

The error seems to be due to an incorrect include path. However, explicitly specifying it (make OCCA_INCLUDE_PATH=/opt/pgi/linux86-64-llvm/19.10/include) does not resolve the issue.

The actual error message is:

/opt/pgi/linux86-64-llvm/19.10/bin/pgc++  -O3 -fast -Mipa=fast,inline -Msmartalloc -std=c++11 -fPIC -o /path/to/occa/obj/modes.o  -mp -c -I/path/to/occa/include -I/opt/pgi/linux86-64-llvm/19.10/include -I/usr/include -I/path/to/occa/src /path/to/occa/src/modes.cpp
pgc++-Warning--Mipa is not supported for this target

"/usr/include/c++/9/cstdlib", line 75: catastrophic error: cannot open source
          file "stdlib.h"
  #include_next <stdlib.h>
                          ^

1 catastrophic error detected in the compilation of "/path/to/occa/src/modes.cpp".
Compilation terminated.
make: *** [Makefile:132: /path/to/occa/obj/modes.o] Error 2

This is on a Fedora 31 Linux system which comes with gcc 9.3.1.

bug

All 7 comments

I cannot reproduce this with my PGI 20.1 compiler
Are you using the CMake build or the make build?

Just the normal Makefiles, I haven't even tried cmake for occa.

Which PGI edition and platform is this on? Are you using cmake or Makefiles?

I'm using CMake exclusively. Using PGI 20.1 (I think it's this Professional Edition) on CentOS 7.7, but the software stack consists of EasyBuild modules, so most of the includes/libraries that are relevant are not system includes/libraries.

Well, can you test it with classic make then? I don't have access to PGI 20.1.

Can try that next week (no longer at work), and I would ask you to try the CMake variant as well to make our testing symmetric.

I tried with a clean occa repository and make -j4 and I got no errors.

pgc++ -O3 -fast -Mipa=fast,inline -Msmartalloc -std=c++11 -fPIC -o /path/to/occa/obj/modes.o -mp -c -I/path/to/occa/include -I/path/to/occa/include -I/path/to/occa/src /path/to/occa/src/modes.cpp

$ pgc++ --version

pgc++ 20.1-0 LLVM 64-bit target on x86-64 Linux -tp haswell 
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.

Closing since we can't reproduce

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tcew picture tcew  路  22Comments

amikstcyr picture amikstcyr  路  11Comments

jeremylt picture jeremylt  路  12Comments

dmed256 picture dmed256  路  4Comments

tcew picture tcew  路  10Comments