tar -xvf aocc-compiler-5.0.0.tar #解压 cd aocc-compiler-3.2.0 #进入目录 ./install.sh #如果没有可执行权限请赋予可执行权限, chmod +x ./install.sh source ../setenv_AOCC.sh #这一行可以写入~/.bashrc,然后source ~/.bashrc,刷新一下环境变量
AOCL
下载AOCL 5.0 binary packages compiled with AOCC 5.0
1 2 3
tar -zxvf XXX.tar.gz #解压tar.gz包,如果报错请查询Linux下的解压命令,up记不太清了、、、 cd XXX ./install.sh -t /home/XXX #安装,可以指定安装目录,up安装在/home目录下的某个文件夹里的,这样不需要管理员权限、
安装OpenMPI
在安装OpenMPI之前请确保AOCC、AOCL以及必备的依赖已安装完全
1 2 3 4 5 6 7 8
which clang #检查clang which clang++ #检查clang++ which flang #检查flang 以上三个来自于AOCC和AOCL which c #检查有没有C which c++ #检查有没有C++ sudo apt install g++ sudo apt install gcc
下载OpenMPI的稳定版本,然后解压,进入目录
1 2 3
./configure CC=clang CXX=clang++ FC=flang --prefix=/xxxx #可以手动指定/xxx目录 make -j4 #以4核心编译,大小可调,比如16核处理器就改成make -j16 make install #编译安装
# For what used to be vasp.5.lib CPP_LIB = $(CPP) FC_LIB = $(FC) CC_LIB = clang CFLAGS_LIB = -O FFLAGS_LIB = -O1 FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library CXX_PARS = clang++ LLIBS = -lstdc++
## ## Customize as of this point! Of course you may change the preceding ## part of this file as well if you like, but it should rarely be ## necessary ... ##
# When compiling on the target machine itself, change this to the # relevant target when cross-compiling for another architecture VASP_TARGET_CPU ?= -march=znver4 #7840HS belongs to ZEN4 platform FFLAGS += $(VASP_TARGET_CPU)