cndaqiang Web Linux DFT

macOS配置开发环境

2024-02-08
cndaqiang
RSS

初版博客macOS配置科学计算环境 本文历史更新地址mac配置开发环境

oneapi

下面两个都安装到/opt/intel/oneapi

  • HPCKit
  • BaseKit

fftw

cd /opt/intel/oneapi/mkl/2022.2.0/interfaces/fftw3xf
 make libintel64

要想正常使用,还要

xcode-select --install 

mpi

cndaqiang@macosmon source % curl -o mpich-4.0.2.tar.gz https://www.mpich.org/static/downloads/4.0.2/mpich-4.0.2.tar.gz
cndaqiang@macosmon mpich-4.0.2 % ./configure --prefix=/opt/mpich/ CC=icc FC=ifort CXX=icpc

环境变量

#oneapi
. /opt/intel/oneapi/compiler/2022.2.0/env/vars.sh
. /opt/intel/oneapi/mkl/2022.2.0/env/vars.sh
alias icc="icc -diag-disable=10441"
# mpich
MPIPATH=/opt/mpich
PATH=$MPIPATH/bin:$PATH
export LD_LIBRARY_PATH=$MPIPATH/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$MPIPATH/lib:$LIBRARY_PATH
export C_INCLUDE_PATH=$MPIPATH/include:$C_INCLUDE_PATH

常用软件编译

QE

./configure FC=ifort CC=icc  MPIF90=mpifort

报错

cpp -P -traditional -Uvector -D__FFTW -D__MPI -Duse_beef -I/Users/cndaqiang/git/oneapi/q-e-qe-6.6//include -I/Users/cndaqiang/git/oneapi/q-e-qe-6.6//FoX/finclude -I/Users/cndaqiang/git/oneapi/q-e-qe-6.6//S3DE/iotk/include/ 
clang: error: no input files
make: *** [laxlib.fh] Error 1

解决报错,修改mack.inc,把-o 改成>

.h.fh:
        $(CPP) $(CPPFLAGS) $< > $*.fh
#       $(CPP) $(CPPFLAGS) $< -o $*.fh

本文首发于我的博客@cndaqiang.
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!


类似文章


评论


广告


广告
访客数据