PGI Community Editionバージョン19.10を使用すると、コンパイルが失敗します。
エラーは、インクルードパスが正しくないことが原因のようです。 ただし、明示的に指定( make OCCA_INCLUDE_PATH=/opt/pgi/linux86-64-llvm/19.10/include
)しても問題は解決しません。
実際のエラーメッセージは次のとおりです。
/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
これは、gcc9.3.1に付属するFedora31Linuxシステム上にあります。
PGI20.1コンパイラではこれを再現できません
CMakeビルドまたはmakeビルドを使用していますか?
通常のMakefileだけで、occaのcmakeも試していません。
これはどのPGIエディションとプラットフォームにありますか? cmakeまたはMakefilesを使用していますか?
私はCMakeを独占的に使用しています。 CentOS7.7でPGI20.1(このProfessional Editionだと思います)を使用しますが、ソフトウェアスタックはEasyBuildモジュールで構成されているため、関連するインクルード/ライブラリのほとんどはシステムインクルード/ライブラリではありません。
それでは、クラシックメイクでテストできますか? PGI20.1にアクセスできません。
来週(もう仕事をしていません)それを試すことができます、そして私たちのテストを対称にするためにCMakeバリアントも試してみてください。
クリーンなoccaリポジトリとmake -j4
を試してみましたが、エラーは発生しませんでした。
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.
再現できないので締めくくり