Difference between revisions of "Building and testing WRF on Triolith"

From SNIC Documentation
Jump to: navigation, search
(Created page with "This page describes the compiling and testing of the [http://www.wrf-model.org/index.php WRF] v371 model on NSC's triolith system ([http://www.nsc.liu.se/systems/triolith/ Trioli...")
 
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
:<code>module load netcdf/4.3.2-i1403-impi-5.0.2.044-hdf5-1.8.14</code>
 
:<code>module load netcdf/4.3.2-i1403-impi-5.0.2.044-hdf5-1.8.14</code>
  
2. Set appropriate HDF5 and netcdf environmeot variables:
+
2. Set appropriate HDF5 and netcdf environment variables:
  
 
:<code>export PHDF5=/software/apps/hdf5/1.8.14/i1403-impi-5.0.2.044</code>
 
:<code>export PHDF5=/software/apps/hdf5/1.8.14/i1403-impi-5.0.2.044</code>
Line 46: Line 46:
 
The model should be launched using NSC's [https://www.nsc.liu.se/systems/triolith/software/triolith-software-apps-mpprun.html mpprun] MPI launch application. The model can be tested using an interactive session e.g.
 
The model should be launched using NSC's [https://www.nsc.liu.se/systems/triolith/software/triolith-software-apps-mpprun.html mpprun] MPI launch application. The model can be tested using an interactive session e.g.
  
:<code>interactive -N 1 -A <your-SNCI-project-code> -t 01:00:00</code>
+
:<code>interactive -N 1 -A <your-SNIC-project-code> -t 01:00:00</code>
 
:<code>mpprun ideal.exe</code>
 
:<code>mpprun ideal.exe</code>
 
:<code>mpprun wrf.exe</code>
 
:<code>mpprun wrf.exe</code>
Line 55: Line 55:
 
  #!/bin/csh
 
  #!/bin/csh
 
  #SBATCH -t 01:00:00
 
  #SBATCH -t 01:00:00
  #SBATCH -A <your-SNCI-project-code>
+
  #SBATCH -A <your-SNIC-project-code>
 
  #SBATCH -N 1
 
  #SBATCH -N 1
 
  mpprun ideal.exe
 
  mpprun ideal.exe
Line 67: Line 67:
 
For the 2D case, the serial code can be launched directly e.g. <code>./ideal.exe</code> however note that you should still run jobs within an interactive session:
 
For the 2D case, the serial code can be launched directly e.g. <code>./ideal.exe</code> however note that you should still run jobs within an interactive session:
  
:<code>interactive -n 1 -A <your-SNCI-project-code> -t 01:00:00</code>
+
:<code>interactive -n 1 -A <your-SNIC-project-code> -t 01:00:00</code>
 
:<code>./ideal.exe</code>
 
:<code>./ideal.exe</code>
 
:<code>./wrf.exe</code>
 
:<code>./wrf.exe</code>
  
 
or through Triolith's batch system.
 
or through Triolith's batch system.
 +
 +
 +
;Building WPS
 +
 +
1. Ensure the correct intel compiler, HDF5 and netcdf modules are loaded:
 +
 +
:<code>module load buildenv-intel/2015-1</code>
 +
:<code>module load hdf5/1.8.14-i1403-impi-5.0.2.044</code>
 +
:<code>module load netcdf/4.3.2-i1403-impi-5.0.2.044-hdf5-1.8.14</code>
 +
 +
When compiling WPS, assumes you have already compiled WRF and the location/name of the WRF folder is <code>../WRFV3</code> relative to the main WPS folder.
 +
 +
2. Set appropriate HDF5 and netcdf environment variables:
 +
 +
:<code>export PHDF5=/software/apps/hdf5/1.8.14/i1403-impi-5.0.2.044</code>
 +
:<code>export NETCDF=/software/apps/netcdf/4.3.2/i1403-impi-5.0.2.044-hdf5-1.8.14</code>
 +
 +
3. Configure WPS:
 +
 +
:<code>./configure</code>
 +
 +
Either option 17 or 20 should work.
 +
 +
At this point the <code>configure.wps</code> file needs to be edited - line 48 should appear as:
 +
 +
:<code>
 +
WRF_LIB        =      -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
 +
                        -L$(WRF_DIR)/external/io_grib_share -lio_grib_share \
 +
                        -L$(WRF_DIR)/external/io_int -lwrfio_int \
 +
                        -L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
 +
                        -L$(NETCDF)/lib -lnetcdff -lnetcdf \
 +
                        -L/software/apps/intel/composer_xe_2015.1.133/compiler/lib/intel64 -liomp5
 +
</code>
 +
 +
4. Finally, compile WPS:
 +
 +
:<code>./compile</code>

Latest revision as of 12:03, 31 August 2017

This page describes the compiling and testing of the WRF v371 model on NSC's triolith system (Triolith). Source code can be downloaded from the WRF page ([1]) after filling in a registration form.

The notes below refer to compiling and testing version 3.7.1 of the model.

1. Ensure the correct intel compiler, HDF5 and netcdf modules are loaded using:

module load buildenv-intel/2015-1
module load hdf5/1.8.14-i1403-impi-5.0.2.044
module load netcdf/4.3.2-i1403-impi-5.0.2.044-hdf5-1.8.14

2. Set appropriate HDF5 and netcdf environment variables:

export PHDF5=/software/apps/hdf5/1.8.14/i1403-impi-5.0.2.044
export NETCDF=/software/apps/netcdf/4.3.2/i1403-impi-5.0.2.044-hdf5-1.8.14

3. Configure the model. In the WRF base folder (WRF3):

./configure

If you are using/testing the 3D version of the model, choose option 16

If you are using/testing the 2D version of the model, choose option 13 (serial). For the 2D case, at this point the configure.wrf file also needs to be edited - lines 241-244 should appear as:

LIB_EXTERNAL    = \
                     -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/software/apps/netcdf/4.3.2/i1403-impi-5.0.2.044-hdf5-1.8.14/lib -lnetcdff -lnetcdf   \
                     -L/software/apps/intel/composer_xe_2015.1.133/compiler/lib/intel64 -liomp5

4. Compile the model:

./compile -j 4 wrf

5. Compile test case (see README_test_cases), e.g. 3D quarter-circle sheer supercell

./compile em_quarter_ss

6. After a successful build, go to the specific test directory, e.g.:

cd test/em_quarter_ss

and run the initialization (ideal.exe) followed by the simulation (wrf.exe).

  • 3D case

The model should be launched using NSC's mpprun MPI launch application. The model can be tested using an interactive session e.g.

interactive -N 1 -A <your-SNIC-project-code> -t 01:00:00
mpprun ideal.exe
mpprun wrf.exe

or by submitting a run script to the batch queue system on Triolith e.g. run script:

#!/bin/csh
#SBATCH -t 01:00:00
#SBATCH -A <your-SNIC-project-code>
#SBATCH -N 1
mpprun ideal.exe
mpprun wrf.exe

More information regarding running applications on Triolith.

  • 2D case

For the 2D case, the serial code can be launched directly e.g. ./ideal.exe however note that you should still run jobs within an interactive session:

interactive -n 1 -A <your-SNIC-project-code> -t 01:00:00
./ideal.exe
./wrf.exe

or through Triolith's batch system.


Building WPS

1. Ensure the correct intel compiler, HDF5 and netcdf modules are loaded:

module load buildenv-intel/2015-1
module load hdf5/1.8.14-i1403-impi-5.0.2.044
module load netcdf/4.3.2-i1403-impi-5.0.2.044-hdf5-1.8.14

When compiling WPS, assumes you have already compiled WRF and the location/name of the WRF folder is ../WRFV3 relative to the main WPS folder.

2. Set appropriate HDF5 and netcdf environment variables:

export PHDF5=/software/apps/hdf5/1.8.14/i1403-impi-5.0.2.044
export NETCDF=/software/apps/netcdf/4.3.2/i1403-impi-5.0.2.044-hdf5-1.8.14

3. Configure WPS:

./configure

Either option 17 or 20 should work.

At this point the configure.wps file needs to be edited - line 48 should appear as:

WRF_LIB         =      -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
                       -L$(WRF_DIR)/external/io_grib_share -lio_grib_share \
                       -L$(WRF_DIR)/external/io_int -lwrfio_int \
                       -L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
                       -L$(NETCDF)/lib -lnetcdff -lnetcdf \
                       -L/software/apps/intel/composer_xe_2015.1.133/compiler/lib/intel64 -liomp5

4. Finally, compile WPS:

./compile