oneapi安装CMAQ

ISO:centos7.9

安装依赖如下:

1. 安装Intel编译器

2. 安装 mpich

3. 安装 zlib

4. 安装 curl

5. 安装 netcdf

6. 安装 ioapi

7. 安装 CMAQ

1. 安装Intel编译器

wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18673/l_BaseKit_p_2022.2.0.262_offline.sh

wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18679/l_HPCKit_p_2022.2.0.191_offline.sh

先装BaseKit在装HCP

安装教程看intel2022手册

安装完成后执行环境:

source /share/app/intel/oneapi/setvars.sh

2. 安装 mpich

  563  wget https://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
  564  ls
  565  tar xf mpich-3.4.2.tar.gz 
  566  ls
  567  cd ../app/
  568  mkdir mpich-3.4.2
  569  cd mpich-3.4.2/
  570  pwd
  571  cd ../../install/mpich-3.4.2
  572  ls
  573  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS='-fPIC' ./configure --prefix=/share/app/mpich-3.4.2/ --with-device=ch3
  574  make -j 2 && make install -j 2
  575  vi /root/.bashrc 
  576  export PATH=/share/app/mpich-3.4.2/bin:$PATH
  577  echo "export PATH=/share/app/mpich-3.4.2/bin:$PATH" >> /root/.bashrc 

3. 安装 zlib

  580  wget http://www.zlib.net/fossils/zlib-1.2.11.tar.gz
  581  ls
  582  tar xf zlib-1.2.11.tar.gz 
  583  ls
  584  cd zlib-1.2.11
  585  ls
  586  cd ../../app/
  587  mkdir zlib-1.2.11
  588  cd zlib-1.2.11/
  589  pwd
  590  cd ../../install/zlib-1.2.11
  591  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS='-fPIC' ./configure --prefix=/share/app/zlib-1.2.11/
  592  make -j 2 && make install -j 2

4. 安装 curl

  596  wget https://curl.se/download/curl-7.77.0.tar.gz --no-check-certificate
  597  ls
  598  tar xf curl-7.77.0.tar.gz 
  599  cd ../app/
  600  cd ../install/
  601  ls
  602  cd ../app/
  603  mkdir curl-7.77.0
  604  cd curl-7.77.0/
  605  pwd
  606  cd ../../install/curl-7.77.0
  607  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS='-fPIC' ./configure --prefix=/home/rain/Build_CMAQ/LIBRARIES/curl --with-zlib=/home/rain/Build_CMAQ/LIBRARIES/zlib --without-ssl
  608  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS='-fPIC' ./configure --prefix=/share/app/curl-7.77.0/ --with-zlib=/share/app/zlib-1.2.11/ --without-ssl
  609  make -j 2 && make install -j 2

5. 安装 netcdf

  612  wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.8.0.tar.gz
  613  wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.5.3.tar.gz
  614  ls
  615  tar xf netcdf-c-4.8.0.tar.gz 
  616  tar xf netcdf-fortran-4.5.3.tar.gz 
  617  ls
  618  cd ../app/
  619  mkdir netcdf
  620  cd netcdf
  621  pwd
  622  cd ..
  623  ls
  624  cd ../install/
  625  cd netcdf-c-4.8.0
  629  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS="-fPIC -I/share/app/curl-7.77.0/include" LDFLAGS="-L/share/app/curl-7.77.0/lib" ./configure --prefix=/share/app/netcdf --disable-dap --disable-netcdf-4
  630  make -j 2 && make install -j 2
 
  631  cd ..
  632  ls
  633  cd netcdf-fortran-4.5.3
  634  CC=icc CXX=icc FC=ifort CPP='icpc -E' CPPFLAGS="-fPIC -I/share/app/netcdf/include" LDFLAGS="-L/share/app/netcdf/lib" LD_LIBRARY_PATH="/share/app/netcdf/lib:$LD_LIBRARY_PATH" ./configure --prefix=/share/app/netcdf/
  635  make -j 2 && make install -j 2
  636  export PATH=/share/app/netcdf/bin:$PATH
  637  export NETCDF=/share/app/netcdf
  638  export LD_LIBRARY_PATH=/share/app/netcdf/lib:$LD_LIBRARY_PATH
  639  echo "export PATH=/share/app/netcdf/bin:$PATH" >> /root/.bashrc 
  640  echo "export NETCDF=/share/app/netcdf" >> /root/.bashrc
  641  echo "export LD_LIBRARY_PATH=/share/app/netcdf/lib:$LD_LIBRARY_PATH" >> /root/.bashrc

6. 安装 ioapi

  646  wget https://www.cmascenter.org/ioapi/download/ioapi-3.2.tar.gz
  647  ls
  657  mkdir ioapi
  658  cd ioapi
  660  tar xf ../ioapi-3.2.tar.gz
  662  export BIN=Linux2_x86_64ifort
  663  mkdir Linux2_x86_64ifort
  664  ln -s /share/app/netcdf/lib/*.so Linux2_x86_64ifort/
  665  cp ioapi/Makefile.nocpl ioapi/Makefile
  666  cp m3tools/Makefile.nocpl m3tools/Makefile
  667  cp Makefile.template Makefile
  668  vi Makefile
   BIN        = Linux2_x86_64ifort
   BASEDIR    = ${PWD}
   INSTALL    = /share/app/ioapi
   LIBINST    = $(INSTALL)/$(BIN)
   BININST    = $(INSTALL)/$(BIN)
   CPLMODE    = nocpl
   IOAPIDEFS  =
   PVMINCL    =
  669  vi ioapi/Makeinclude.Linux2_x86_64ifort
  AR   = ar
  CC   = mpiicc
  CXX  = mpiicpc
  FC   = mpiifort -auto -warn notruncated_source -static-intel
  M4   = m4
  LINK = $(CC)

  OMPFLAGS  = -qopenmp      # for Intel compilers, version 15 or earlier
  OMPLIBS   = -qopenmp
  
  #ARCHLIB   = -Bstatic
  
   670  make configure
  724  vi ioapi/Makefile
  BASEDIR = /share/install/ioapi
  INSTDIR = /share/app/ioapi/Linux2_x86_64ifort

  725  vi m3tools/Makefile
  BASEDIR = /share/install/ioapi
  SRCDIR  = ${BASEDIR}/m3tools
  IODIR   = ${BASEDIR}/ioapi
  OBJDIR  = ${BASEDIR}/${BIN}
  INSTDIR = /share/app/ioapi/Linux2_x86_64ifort
  
  726  make all
  727  make install
  728  cp ioapi/fixed_src/* Linux2_x86_64ifort/
  729  cp ioapi/fixed_src/* /share/app/ioapi/Linux2_x86_64ifort/

7. 安装 CMAQ

  730  wget https://codeload.github.com/USEPA/CMAQ/tar.gz/refs/tags/CMAQv5.3.3_17Aug2021
  732  tar xf CMAQ-CMAQv5.3.3_17Aug2021.tar.gz 
  733  ls
  734  cd ../app/
  735  mkdir CMAQ-5.3.3
  738  cd ../../install/CMAQ-CMAQv5.3.3_17Aug2021
  739  ls
  740  cp bldit_project.csh bldit_project.csh.old
  741  vi bldit_project.csh
  set CMAQ_HOME =  /share/app/CMAQ-5.3.3/
  
  742  ./bldit_project.csh
#提示没有csh,就yum install安装一个csh

  779  cd /share/app/CMAQ-5.3.3/
  780  ls
  781  $ cp config_cmaq.csh config_cmaq.csh.old
  782  cp config_cmaq.csh config_cmaq.csh.old
 783  vi config_cmaq.csh
 #> I/O API, netCDF, and MPI library locations
 setenv IOAPI_INCL_DIR   /share/install/ioapi/ioapi/fixed_src    #> I/O API include header files
 setenv IOAPI_LIB_DIR    /share/app/ioapi/Linux2_x86_64ifort    #> I/O API libraries

 if ( $NETCDF == "netcdf_combined_directory_path" ) then
 setenv NETCDF_LIB_DIR   /share/app/netcdf/lib                #> netCDF C directory path
 setenv NETCDF_INCL_DIR  /share/app/netcdf/include            #> netCDF C directory path
 setenv NETCDFF_LIB_DIR  /share/app/netcdf/lib                #> netCDF Fortran directory path
 setenv NETCDFF_INCL_DIR /share/app/netcdf/include            #> netCDF Fortran directory path
 endif

 setenv MPI_INCL_DIR     /share/app/mpich-3.4.2/include              #> MPI Include directory path
 setenv MPI_LIB_DIR      /share/app/mpich-3.4.2/lib               #> MPI Lib directory path

  setenv myLINK_FLAG "-qopenmp"
  784  ./config_cmaq.csh intel
  785  ls
  786  cd CCTM/scripts/
  787  ls
  788  mkdir BLD_CCTM_v532_intel
  789  cp /share/app/mpich-3.4.2/include/* BLD_CCTM_v532_intel/
  790  ./bldit_cctm.csh intel
  791  ls -al BLD_CCTM_v533_intel/CCTM_*.exe
  792  ./CCTM_v533.exe

[root@ceshi BLD_CCTM_v533_intel]# ./CCTM_v533.exe

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值