William.Hatheway
Member
Good afternoon everyone.
Here is a set of instructions on how to install the WRF/WPS using the "Classic" Intel Compilers.
Classic = ifort, icc, icpc, mpiifort, mpiicc, and mpiicpc.
PASSWD is your sudo password
############################# Basic package managment ############################
#download the key to system keyring; this and the following echo command are
# needed in order to install the Intel compilers
# add signed entry to apt sources and configure the APT client to use Intel repository:
# this update should get the Intel package info from the Intel repository
# necessary binary packages (especially pkg-config and build-essential)
# install the Intel compilers
# make sure some critical packages have been installed
# add the Intel compiler file paths to various environment variables (THIS IS EXTREMELY IMPORTANT)
# some of the libraries we install below need one or more of these variables. -diag-disable=10441 is for the removal of the warning that "Classic" compilers are going away.
# Continue installation of libraries as normal according to the users guide
# Steps for installing WRF
Classic intel compilers is option 15 from the list
Basic Nesting is option 1 from the list
After generating the configure.wrf file you need to make some edits to it to use the intel mpi commands. This is taken from the configure.wrf file in the notes.
That removes the GNU commands for intel commands.
Then compile WRF.
#Steps for installing WPS
Classic intel compilers is option 19
After generating the configure.wps file you need to make some edits to it to use the intel mpi commands.
That removes the GNU commands for intel commands.
Then compile WPS.
Lastly,
To use WRF/WPS you will need to invoke this command every time you want to run it.
This turns on the intel compilers in the terminal.
Here is a set of instructions on how to install the WRF/WPS using the "Classic" Intel Compilers.
Classic = ifort, icc, icpc, mpiifort, mpiicc, and mpiicpc.
PASSWD is your sudo password
############################# Basic package managment ############################
Code:
echo $PASSWD | sudo -S apt -y update
echo $PASSWD | sudo -S apt -y upgrade
#download the key to system keyring; this and the following echo command are
# needed in order to install the Intel compilers
Bash:
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB |
gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg >/dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
Bash:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
Bash:
echo $PASSWD | sudo -S apt -y update
Bash:
echo $PASSWD | sudo -S apt -y install autoconf automake bison build-essential byacc cmake csh curl default-jdk default-jre emacs flex g++ gawk gcc gfortran git ksh libcurl4-openssl-dev libjpeg-dev libncurses5 libncurses6 libpixman-1-dev libpng-dev libtool libxml2 libxml2-dev m4 make mlocate ncview okular openbox pipenv pkg-config python2 python2-dev python3 python3-dev python3-pip tcsh unzip xauth xorg time
Bash:
echo $PASSWD | sudo -S apt -y install intel-basekit
echo $PASSWD | sudo -S apt -y install intel-hpckit
echo $PASSWD | sudo -S apt -y install intel-oneapi-python
echo $PASSWD | sudo -S apt -y update
# make sure some critical packages have been installed
Bash:
which cmake pkg-config make gcc g++ gfortran
# add the Intel compiler file paths to various environment variables (THIS IS EXTREMELY IMPORTANT)
Bash:
source /opt/intel/oneapi/setvars.sh
# some of the libraries we install below need one or more of these variables. -diag-disable=10441 is for the removal of the warning that "Classic" compilers are going away.
Bash:
export CC=icc
export CXX=icpc
export FC=ifort
export F77=ifort
export F90=ifort
export MPIFC=mpiifort
export MPIF77=mpiifort
export MPIF90=mpiifort
export MPICC=mpiicc
export MPICXX=mpiicpc
export CFLAGS="-fPIC -fPIE -O3 -diag-disable=10441 "
export FFLAGS="-m64"
export FCFLAGS="-m64"
# Continue installation of libraries as normal according to the users guide
# Steps for installing WRF
Classic intel compilers is option 15 from the list
Basic Nesting is option 1 from the list
After generating the configure.wrf file you need to make some edits to it to use the intel mpi commands. This is taken from the configure.wrf file in the notes.
Bash:
sed -i '169s|mpif90 -f90=$(SFC)|mpiifort|g' $WRF_FOLDER/WRFV4.5.1/configure.wrf
sed -i '170s|mpicc -cc=$(SCC)|mpiicc|g' $WRF_FOLDER/WRFV4.5.1/configure.wrf
sed -i '177s|-w -O3|-diag-disable=10441 -w -O3|g' $WRF_FOLDER/WRFV4.5.1/configure.wrf
Then compile WRF.
#Steps for installing WPS
Classic intel compilers is option 19
After generating the configure.wps file you need to make some edits to it to use the intel mpi commands.
Bash:
sed -i '67s|mpif90|mpiifort|g' $WRF_FOLDER/WPS-4.5/configure.wps
sed -i '68s|mpicc|mpiicc|g' $WRF_FOLDER/WPS-4.5/configure.wps
Then compile WPS.
Lastly,
To use WRF/WPS you will need to invoke this command every time you want to run it.
Code:
source /opt/intel/oneapi/setvars.sh