使用PGI Community Edition Version 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
这是在带有 gcc 9.3.1 的 Fedora 31 Linux 系统上。
我无法用我的 PGI 20.1 编译器重现它
您使用的是 CMake 构建还是 make 构建?
只是普通的Makefile,我什至没有尝试过cmake for occa。
这是在哪个 PGI 版本和平台上? 您使用的是 cmake 还是 Makefiles?
我只使用 CMake。 在 CentOS 7.7 上使用 PGI 20.1(我认为是专业版),但软件堆栈由 EasyBuild 模块组成,因此大多数相关的包含/库不是系统包含/库。
那么,您可以使用经典品牌对其进行测试吗? 我无权访问 PGI 20.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.
关闭,因为我们无法重现