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
์ด๊ฒ์ gcc 9.3.1๊ณผ ํจ๊ป ์ ๊ณต๋๋ Fedora 31 Linux ์์คํ ์ ์์ต๋๋ค.
๋ด PGI 20.1 ์ปดํ์ผ๋ฌ๋ก ์ด๊ฒ์ ์ฌํํ ์ ์์ต๋๋ค
CMake ๋น๋ ๋๋ make ๋น๋๋ฅผ ์ฌ์ฉ ์ค์
๋๊น?
๊ทธ๋ฅ ์ผ๋ฐ์ ์ธ Makefiles, ๋๋ occa์ ๋ํด cmake๋ ์๋ํ์ง ์์์ต๋๋ค.
์ด๊ฒ์ ์ด๋ค PGI ์๋์ ๊ณผ ํ๋ซํผ์ ์์ต๋๊น? cmake ๋๋ Makefile์ ์ฌ์ฉํ๊ณ ์์ต๋๊น?
์ ๋ CMake๋ฅผ ๋ ์ ์ ์ผ๋ก ์ฌ์ฉํ๊ณ ์์ต๋๋ค. CentOS 7.7์์ PGI 20.1(์ด Professional Edition ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค)์ ์ฌ์ฉํ์ง๋ง ์ํํธ์จ์ด ์คํ์ 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.
์ฌ์์ฐ ๋ถ๊ฐํ์ฌ ํ์