| November 25, 2009 8:00 PM PST | |
Introduction :
This document explains how to build the Weather Research & Forecasting(WRF) v3.1.1 and the WRF Preprocessing System(WPS) v3.1.1 using the Intel C++ and Fortran Compilers for Linux(e.g. version 11.1.046) and Intel MPI (e.g. 3.2.1).
Building WRF and WPS BKMs with Intel(r) Compilers in serial mode you can find here: WRF and WPS.
Before you continue reading this article please check another article at http://software.intel.com/en-us/articles/building-the-wrf-with-intel-compilers-on-linux-and-improving-performance-on-intel-architecture/.
Version :
WRF v.3.1.1.
WPS v.3.1.1.
Intel(r) C++ and Fortran Compilers Professional Edition for Linux 11.1.046.
Obtaining Source Code :
The WRF source codes can be downloaded here.
The WPS source codes can be downloaded here.
Prerequisites :
The WRF requires netCDF library. Installation best known method with the Intel® Compilers you can find here.
The WPS requires:
1)The WRF.
2)The Jasper library. Installation best know method with the Intel® Compilers you can find here.
3)The JPEG library. Installation best know method with the Intel® Compilers you can find here.
4)The Zlib library. Installation best know method with the Intel® Compilers you can find here.
5)The NCAR Graphics* library. How to build with Intel(R) Compilers you can find here.
Environment Set Up :
You should set up environment variables for Intel(r) C++ and Fortran Compiler and netCDF. If you want to build distributed version of WPS then you should set up environment variables for Inte MPI.
E.g.
$export INTEL_COMPILER_TOPDIR="/opt/spdtools/compiler/cpro/Compiler/11.1/046"
$. $INTEL_COMPILER_TOPDIR/bin/intel64/ifortvars_intel64.sh
$. $INTEL_COMPILER_TOPDIR/bin/intel64/iccvars_intel64.sh
$export NETCDF=/opt/netcdf
$. /opt/intel/impi/3.2.1.009/bin64/mpivars.sh
Source Code Changes : none
Building the Application :
Note: While building mpicc and mpif90 should be symbolic links to mpiicc and mpiifort, respectively.
WRF:
1)Copy/move tar file WRFV3.1.1.TAR.gz to the directory /opt.
2)Decompress source files
$ tar -zxvf WRFV3.1.1.TAR.gz
3)
$cd ./WRFV3
4)Create script build_WRF.sh:
"#!/bin/sh
export NETCDF=/opt/netcdf
export JASPERLIB=/opt/usr/lib
export JASPERINC=/opt/usr/include
export LD_LIBRARY_PATH="/opt/lib/:${LD_LIBRARY_PATH}"
export INCLUDE="/opt/include/:${INCLUDE}"
# To enable large file
# support in NetCDF, set the environment variable
#WRFIO_NCD_LARGE_FILE_SUPPORT to 1
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
#If you have Intel MPI installed and wish to use instead, make the
#following changes to settings below:
#DM_FC = mpiifort
#DM_CC = mpiicc
#and source bin64/mpivars.sh file from your Intel MPI installation
#before the build.
export DM_FC=mpiifort
export DM_CC=mpiicc
./configure --prefix=/opt/WRFV3-mpi
mkdir ./buildlog
./compile em_b_wave &> ./buildlog/em_b_wave
./compile em_grav2d_x &> ./buildlog/em_grav2d_x
./compile em_heldsuarez &> ./buildlog/em_heldsuarez
./compile em_hill2d_x &> ./buildlog/em_hill2d_x
./compile em_les &> ./buildlog/em_les
./compile em_quarter_ss &> ./buildlog/em_quarter_ss
./compile em_real &> ./buildlog/em_real
./compile em_seabreeze2d_x &> ./buildlog/em_seabreeze2d_x
./compile em_squall2d_x &> ./buildlog/em_squall2d_x
./compile em_squall2d_y &> ./buildlog/em_squall2d_y
"
5)Make script executable:
$chmod +x build_WRF.sh
6)Execute this script with command line:
$((./build_WRF.sh) 3>&2 2>&1 1>&3 | tee build_WRF.err ) 2>&1 | tee build_WRF.log
Or just execute script:
$./build_WRF.sh
NOTE:
For building parallel WRF version chose
7. Linux x86_64 i486 i586 i686, ifort compiler with icc (dmpar)
or
8. Linux x86_64 i486 i586 i686, ifort compiler with icc (dm+sm)
while configuring.
WPS:
1)Copy/move tar file WPSV3.1.1.TAR.gz to the directory /opt.
2)Decompress source files
$tar -zxvf WPSV3.1.1.TAR.gz
.
3)Set up environment variables which are mentioned in section "Configuration Set Up".
4)Configure WPS
$./configure
NOTE:
For building WPS parallel version chose
3. PC Linux x86_64, Intel compiler DM parallel, NO GRIB2
or
4. PC Linux x86_64, Intel compiler DM parallel
while configuring.
5)Compile WPS
$./compile
Running the Application :
1)To run under Intel(r) MPI first of all MPD ring should be brought up
a) on the single machine:
$mpdboot &
b)on hosts (some hosts) in the file mpd.hosts:
$mpdboot -n <number to start > -f mpd.hosts
.
2)To run the main WRF simulation in parallel mode:
$mpiexec - n <number of procs> ./wrf.exe
3)To run WPS components in parallel mode:
$mpiexec - n <number of procs> ./component_name.exe
Verifying Correctness :
To verify results you can use utility diffwrf. You can find it in directory./external/io_netcdf/diffwrf.
E.g. To run diffwrf from directory ./test/em_real/
$../../external/io_netcdf/diffwrf /wrfout_d01_etalon ./wrfout_d01_2000-01-24_12\:00\:00
Known Issues or Limitations :
1)If WPS should be built with WRF parallel version then in WPS post-configure file variable WRF_DIR should be changed to
WRF_DIR = ../WRFV3-mpi
.
This document explains how to build the Weather Research & Forecasting(WRF) v3.1.1 and the WRF Preprocessing System(WPS) v3.1.1 using the Intel C++ and Fortran Compilers for Linux(e.g. version 11.1.046) and Intel MPI (e.g. 3.2.1).
Building WRF and WPS BKMs with Intel(r) Compilers in serial mode you can find here: WRF and WPS.
Before you continue reading this article please check another article at http://software.intel.com/en-us/articles/building-the-wrf-with-intel-compilers-on-linux-and-improving-performance-on-intel-architecture/.
Version :
WRF v.3.1.1.
WPS v.3.1.1.
Intel(r) C++ and Fortran Compilers Professional Edition for Linux 11.1.046.
Obtaining Source Code :
The WRF source codes can be downloaded here.
The WPS source codes can be downloaded here.
Prerequisites :
The WRF requires netCDF library. Installation best known method with the Intel® Compilers you can find here.
The WPS requires:
1)The WRF.
2)The Jasper library. Installation best know method with the Intel® Compilers you can find here.
3)The JPEG library. Installation best know method with the Intel® Compilers you can find here.
4)The Zlib library. Installation best know method with the Intel® Compilers you can find here.
5)The NCAR Graphics* library. How to build with Intel(R) Compilers you can find here.
Environment Set Up :
You should set up environment variables for Intel(r) C++ and Fortran Compiler and netCDF. If you want to build distributed version of WPS then you should set up environment variables for Inte MPI.
E.g.
$export INTEL_COMPILER_TOPDIR="/opt/spdtools/compiler/cpro/Compiler/11.1/046"
$. $INTEL_COMPILER_TOPDIR/bin/intel64/ifortvars_intel64.sh
$. $INTEL_COMPILER_TOPDIR/bin/intel64/iccvars_intel64.sh
$export NETCDF=/opt/netcdf
$. /opt/intel/impi/3.2.1.009/bin64/mpivars.sh
Source Code Changes : none
Building the Application :
Note: While building mpicc and mpif90 should be symbolic links to mpiicc and mpiifort, respectively.
WRF:
1)Copy/move tar file WRFV3.1.1.TAR.gz to the directory /opt.
2)Decompress source files
$ tar -zxvf WRFV3.1.1.TAR.gz
3)
$cd ./WRFV3
4)Create script build_WRF.sh:
"#!/bin/sh
export NETCDF=/opt/netcdf
export JASPERLIB=/opt/usr/lib
export JASPERINC=/opt/usr/include
export LD_LIBRARY_PATH="/opt/lib/:${LD_LIBRARY_PATH}"
export INCLUDE="/opt/include/:${INCLUDE}"
# To enable large file
# support in NetCDF, set the environment variable
#WRFIO_NCD_LARGE_FILE_SUPPORT to 1
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
#If you have Intel MPI installed and wish to use instead, make the
#following changes to settings below:
#DM_FC = mpiifort
#DM_CC = mpiicc
#and source bin64/mpivars.sh file from your Intel MPI installation
#before the build.
export DM_FC=mpiifort
export DM_CC=mpiicc
./configure --prefix=/opt/WRFV3-mpi
mkdir ./buildlog
./compile em_b_wave &> ./buildlog/em_b_wave
./compile em_grav2d_x &> ./buildlog/em_grav2d_x
./compile em_heldsuarez &> ./buildlog/em_heldsuarez
./compile em_hill2d_x &> ./buildlog/em_hill2d_x
./compile em_les &> ./buildlog/em_les
./compile em_quarter_ss &> ./buildlog/em_quarter_ss
./compile em_real &> ./buildlog/em_real
./compile em_seabreeze2d_x &> ./buildlog/em_seabreeze2d_x
./compile em_squall2d_x &> ./buildlog/em_squall2d_x
./compile em_squall2d_y &> ./buildlog/em_squall2d_y
"
5)Make script executable:
$chmod +x build_WRF.sh
6)Execute this script with command line:
$((./build_WRF.sh) 3>&2 2>&1 1>&3 | tee build_WRF.err ) 2>&1 | tee build_WRF.log
Or just execute script:
$./build_WRF.sh
NOTE:
For building parallel WRF version chose
7. Linux x86_64 i486 i586 i686, ifort compiler with icc (dmpar)
or
8. Linux x86_64 i486 i586 i686, ifort compiler with icc (dm+sm)
while configuring.
WPS:
1)Copy/move tar file WPSV3.1.1.TAR.gz to the directory /opt.
2)Decompress source files
$tar -zxvf WPSV3.1.1.TAR.gz
.
3)Set up environment variables which are mentioned in section "Configuration Set Up".
4)Configure WPS
$./configure
NOTE:
For building WPS parallel version chose
3. PC Linux x86_64, Intel compiler DM parallel, NO GRIB2
or
4. PC Linux x86_64, Intel compiler DM parallel
while configuring.
5)Compile WPS
$./compile
Running the Application :
1)To run under Intel(r) MPI first of all MPD ring should be brought up
a) on the single machine:
$mpdboot &
b)on hosts (some hosts) in the file mpd.hosts:
$mpdboot -n <number to start > -f mpd.hosts
.
2)To run the main WRF simulation in parallel mode:
$mpiexec - n <number of procs> ./wrf.exe
3)To run WPS components in parallel mode:
$mpiexec - n <number of procs> ./component_name.exe
Verifying Correctness :
To verify results you can use utility diffwrf. You can find it in directory./external/io_netcdf/diffwrf.
E.g. To run diffwrf from directory ./test/em_real/
$../../external/io_netcdf/diffwrf /wrfout_d01_etalon ./wrfout_d01_2000-01-24_12\:00\:00
Known Issues or Limitations :
1)If WPS should be built with WRF parallel version then in WPS post-configure file variable WRF_DIR should be changed to
WRF_DIR = ../WRFV3-mpi
.
Do you need more help?
This article applies to: ISN General, Intel® C++ Compiler for Linux* Knowledge Base, Intel® Fortran Compiler for Linux* Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (9) 
| November 17, 2009 4:51 AM PST
vastviewec
|
Hi, I'm testing the latest WRF/WPS using my own dual core desktop (CPU core 2 duo, System: Ubuntu 9.10). I successed in compiling WRF and WPS following your instruction with intel MPI. However, when I tried to run wrf in parrel mode by typing "mpiexec -n 2 ./wrf.exe", the program didn't get run and I got following message: root@user-desktop:~/Desktop/WRF/WRFV3/run# mpiexec -n 2 ./wrf.exe starting wrf task 0 of 2 starting wrf task 1 of 2 rank 1 in job 1 user-desktop_48750 caused collective abort of all ranks exit status of rank 1: return code 1 Is there any problem for this? Thanks very much! |
| November 17, 2009 5:33 AM PST
Kirill Mavrodiev (Intel)
|
I had several times such issue. This is MPI issue. Try 1)to kill all mpd cycles before running ./real.exe $mpdallexit 2) then again start mpd $mpdboot & 3)execute wrf.exe in distributed mode: $mpiexec -n 2 ./wrf.exe |
| November 18, 2009 6:36 AM PST
vastviewec
|
Dear Kirill, Thank you so much for your reply! I tried your way. )to kill all mpd cycles before running ./real.exe $mpdallexit No problem 2) then again start mpd $mpdboot & No problem 3)execute wrf.exe in distributed mode: $mpiexec -n 2 ./wrf.exe I've no problem running real by typing "$mpiexec -n 2 ./real.exe", but after that when I tried to run "$mpiexec -n 2 ./wrf.exe" but failed. I tried several times but always got similar messages: root@user-desktop:/usr/WRF/WRFV3/run# mpiexec -n 2 ./wrf.exe starting wrf task 0 of 2 starting wrf task 1 of 2 rank 1 in job 3 user-desktop_51469 caused collective abort of all ranks exit status of rank 1: killed by signal 11 rank 0 in job 3 user-desktop_51469 caused collective abort of all ranks exit status of rank 0: killed by signal 11 Is there still a problem? Thanks! |
| November 18, 2009 7:05 AM PST
Kirill Mavrodiev (Intel)
|
Hi Kan, Probably I was in hurry and wrote 1)to kill all mpd cycles before running ./real.exe . But I wanted to say before running ./wrf.exe . So, try to kill and start mpd cycle before executing ./real.exe and then kill and start mpd cycle before executing ./wrf.exe. It should look like: $mpdallexit $mpdboot & $./real.exe $mpdallexit $mpdboot & $./wrf.exe . Thanks, Kirill |
| November 26, 2009 5:32 AM PST
GONSO INFANTE |
Hi, i tried to follow your suggestions. However, the version of the intel compiler that i have in the machine is 10.1.018 and the Intel MPI is 3.1. This is what i do: export INTEL_COMPILER_TOPDIR="/opt/intel" source $INTEL_COMPILER_TOPDIR/cce/10.1.018/bin/iccvars.sh source $INTEL_COMPILER_TOPDIR/fce/10.1.018/bin/ifortvars.sh export NETCDF=/home/bcodina/netCDF export WRFIO_NCD_LARGE_FILE_SUPPORT=1 export WRF_EM_CORE=1 source $INTEL_COMPILER_TOPDIR/impi/3.1/bin/mpivars.sh export DM_FC=mpiifort export DM_CC=mpiicc ./configure mkdir ./buildlog ./compile em_real &> ./buildlog/em_real However the compilation fails and in the log files i find error messages like this: mpicc -DFSEEKO64_OK -w -O3 -ip -DDM_PARALLEL -c c_code.c cc1: error: unrecognized command line option "-ip" Does that mean that the optimization ip is not supported by Intel MPI 3.1?? Is there any way to solve this?? |
| November 26, 2009 5:37 AM PST
infagon
|
Hi, i tried to follow your suggestions. However, the version of the intel compiler that i have in the machine is 10.1.018 and the Intel MPI is 3.1. This is what i do: export INTEL_COMPILER_TOPDIR="/opt/intel" source $INTEL_COMPILER_TOPDIR/cce/10.1.018/bin/iccvars.sh source $INTEL_COMPILER_TOPDIR/fce/10.1.018/bin/ifortvars.sh export NETCDF=/home/bcodina/netCDF export WRFIO_NCD_LARGE_FILE_SUPPORT=1 export WRF_EM_CORE=1 source $INTEL_COMPILER_TOPDIR/impi/3.1/bin/mpivars.sh export DM_FC=mpiifort export DM_CC=mpiicc ./configure mkdir ./buildlog ./compile em_real &> ./buildlog/em_real However the compilation fails and in the log files i find error messages like this: mpicc -DFSEEKO64_OK -w -O3 -ip -DDM_PARALLEL -c c_code.c cc1: error: unrecognized command line option "-ip" Does that mean that the optimization ip is not supported by Intel MPI 3.1?? Is there any way to solve this?? |
| February 10, 2010 1:50 PM PST
iceni2004
|
vastviewec, what was in your rsl.out.0000 file? I have a similar problem. I've built WRF (dmpar) on our IA-64 cluster using the mpif90/mpicc (and the Bull MPI) I've the met_em* files downloaded from the NCAR website ./real.exe runs fine but prun -n40 ./wrf.exe (for example) aborts with the following in the rsl files: ~/RCS/WRF-CHEM/v3.1.1/WRFV3/run$ less rsl.error.0000 taskid: 0 hostname: horace6 Quilting with 1 groups of 0 I/O tasks. Namelist dfi_control not found in namelist.input. Using registry defaults for v ariables in dfi_control Namelist tc not found in namelist.input. Using registry defaults for variables in tc Namelist scm not found in namelist.input. Using registry defaults for variables in scm Namelist fire not found in namelist.input. Using registry defaults for variable s in fire Ntasks in X 5, ntasks in Y 8 WRF V3.1.1 MODEL ************************************* Parent domain ids,ide,jds,jde 1 74 1 61 ims,ime,jms,jme -4 22 -4 15 ips,ipe,jps,jpe 1 15 1 8 ************************************* DYNAMICS OPTION: Eulerian Mass Coordinate alloc_space_field: domain 1, 9258880 bytes allocated -------------- FATAL CALLED --------------- un-normalized TimeInterval not allowed: ESMF_TimeIntervalAbsValue arg1 ------------------------------------------- aborting job: application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 Anybody have any thoughts? I've built and run on a Cray XT (using same met_em files) without problem |
| March 20, 2012 11:37 PM PDT
Vikrant |
I am trying to install WRF on HPC cluster. I get the following error nup_em.f90(3): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MODULE_DOMAIN] USE module_domain, ONLY : domain, wrfu_timeinterval, alloc_and_configure_domain, & nup_em.f90(26): error #6457: This derived type name has not been declared. [GRID_CONFIG_REC_TYPE] TYPE (grid_config_rec_type) config_flags error #6632: Keyword arguments are invalid without an explicit interface. finally the executable are not generate |
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Ronald W. Green (Intel)
|


Kirill Mavrodiev (Intel)
2,704