Compiling WRF at the University of Utah
Latest updates on what is needed to avoid those dreaded compile errors.

Compiling Configurations as of 12/2015

The following commands needed before the ./configure and ./compile em_real wrf

Latest compiling settings for kingspeak and using CHPC modules:

Tutorial using modules by Adam Varble here:

October 2015 Adam Varble Modules Tutorial

Settings from Brian Blaylock:

Check
http://home.chpc.utah.edu/~u0553130/Brian_Blaylock/wrf.html
for latest info

I was compiling 3.7 yesterday without problems. This is what I've got...
source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh
source /uufs/chpc.utah.edu/sys/pkg/mpich2/std_pgi_rh6/etc/mpich2.csh
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/std_pgi_rh6
setenv WRF_EM_CORE 1
setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1
setenv LD_LIBRARY_PATH "/uufs/chpc.utah.edu/sys/pkg/netcdf/std_rh6/lib:$LD_LIBRARY_PATH"
setenv LD_LIBRARY_PATH "/uufs/chpc.utah.edu/sys/pkg/openmotif/std_rh6/lib64:$LD_LIBRARY_PATH"
setenv MANPATH "$NETCDF/man:$MANPATH"
setenv NCARG_ROOT /uufs/chpc.utah.edu/sys/pkg/ncarg/std
setenv PATH "/uufs/chpc.utah.edu/sys/pkg/ncarg/std/bin:$PATH"
# JASPER Library required for grib2 processing in WPS
setenv JASPERLIB /uufs/chpc.utah.edu/sys/installdir/jasper/1.900.1-atmos07102015/lib
setenv JASPERINC /uufs/chpc.utah.edu/sys/installdir/jasper/1.900.1-atmos07102015/include

CHPC is trying to get everyone to use modules rather than sourcing. I think it's "supposed" to solve these sourcing issues. If you want to set up modules, you can follow the directions on the CHPC website and here's a copy of my aliases, custom, and tcshrc files http://home.chpc.utah.edu/~u0553130/CHPC/

3 April 2015 From Jeff Massey and Leah Campbell:

setenv NCARG_ROOT /uufs/chpc.utah.edu/sys/pkg/ncarg/6.1.2_rhel6
setenv LD_LIBRARY_PATH "/uufs/chpc.utah.edu/sys/pkg/netcdf/std_rh6/lib:$LD_LIBRARY_PATH"
setenv LD_LIBRARY_PATH "/uufs/chpc.utah.edu/sys/pkg/openmotif/std_rh6/lib64:$LD_LIBRARY_PATH"
source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh
source /uufs/kingspeak.peaks/sys/pkg/mvapich2/std/etc/mvapich2.csh



3 April 2015 SLURM script from Derek Mallia:

This script submits a job for real.exe


#! /bin/bash
#SBATCH --time=48:00:00 #walltime for the WRF simulation, max is 72 on Kingspeak general nodes, 336 on private nodes
#SBATCH --nodes=5 #Number of nodes I want to use, max is 15 for lin-group, each node has 16 cores
#SBATCH --ntasks=80 #Number of MPI tasks, multiply number of nodes with cores per node. 5*16=80
#SBATCH --account=lin-kp #Account name
#SBATCH --partition=lin-kp #Partition name
#SBATCH --mail-user=Derek.Mallia@utah.edu #Email account
#SBATCH --mail-type=FAIL,BEGIN,END #When to email
#SBATCH -o dvm_REAL.out #Error and output file names
#SBATCH -e dvm_REAL.err
cd /uufs/chpc.utah.edu/common/home/lin-group1/dvm/WRF_v34_kingspeak/WRFV3/test/em_real
srun hostname | sort > nodefile.$SLURM_JOBID
mpiexec.hydra -n $SLURM_NTASKS -machinefile nodefile.$SLURM_JOBID ./real.exe


This script submits a job for wrf.exe


#! /bin/bash
#SBATCH --time=48:00:00 #walltime for the WRF simulation, max is 72 on Kingspeak general nodes, 336 on private nodes
#SBATCH --nodes=5 #Number of nodes I want to use, max is 15 for lin-group, each node has 16 cores
#SBATCH --ntasks=80 #Number of MPI tasks, multiply number of nodes with cores per node. 5*16=80
#SBATCH --account=lin-kp #Account name
#SBATCH --partition=lin-kp #Partition name
#SBATCH --mail-user=Derek.Mallia@utah.edu #Email account
#SBATCH --mail-type=FAIL,BEGIN,END #When to email
#SBATCH -o dvm_WRF.out #Error and output file names
#SBATCH -e dvm_WRF.err
cd /uufs/chpc.utah.edu/common/home/lin-group1/dvm/WRF_v34_kingspeak/WRFV3/test/em_real
srun hostname | sort > nodefile.$SLURM_JOBID
mpiexec.hydra -n $SLURM_NTASKS -machinefile nodefile.$SLURM_JOBID ./wrf.exe



UPDATE 15 August 2014:

settings needed for WPS 3.6 with grib 2 (thanks to Jeff Massey and Nick Bassill
setenv JASPERLIB /uufs/chpc.utah.edu/sys/pkg/pylib/general/jasper/1.900.1/lib
setenv JASPERINC /uufs/chpc.utah.edu/sys/pkg/pylib/generaljasper/1.900.1/include

UPDATE 29 August 2013:

Settings needed for compiling on new CHPC Kingspeak Cluster courtesy of Derek Mallia
source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.sh
#Sources pgi compilers that work with RED HAT 6
source /uufs/kingspeak.peaks/sys/pkg/mvapich2/std_pgi/etc/mvapich2.sh
#Sources new MPI for Kingspeak server
export PATH=/uufs/chpc.utah.edu/sys/pkg/ncl/6.1.2_rhel6/bin:/uufs/chpc.utah.edu/sys/pkg/netcdf/4.3.0_rhel6/bin:$PATH
export NETCDF=/uufs/chpc.utah.edu/sys/pkg/netcdf/4.0pg
export NCARG_ROOT=/uufs/chpc.utah.edu/sys/pkg/ncarg/5.1.1
export WRF_DIR=
export WRF_EM_CORE=1
end Aug 29 Update **********************


For the WRF MODEL ARW Core Build:

For large domains include this command:
setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1

Compiling on METEO NODES using MPICH2:
using config option 3 and nesting option 1:
setenv WRF_EM_CORE 1
source /uufs/chpc.utah.edu/sys/pkg/pgi/std/etc/pgi.csh
source /uufs/chpc.utah.edu/sys/pkg/mpich2/std_pgi/etc/mpich2.csh
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/4.0pg

Compiling on CHPC NODES using MVAPICH2:

SANDDUNE ARCH:
using config option 3 and nesting option 1:
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/4.0pg
setenv WRF_EM_CORE 1
source /uufs/chpc.utah.edu/sys/pkg/pgi/std/etc/pgi.csh
source /uufs/sanddunearch.arches/sys/pkg/mvapich2/std/etc/mvapich2.csh
setenv TMPDIR /scratch/local

UPDRAFT:
using config option 4 (dm +) and nesting option 1:
setenv WRF_EM_CORE 1
source /uufs/updraft.arches/sys/pkg/mvapich2/std_pgi/etc/mvapich2.csh
setenv source /uufs/chpc.utah.edu/sys/pkg/pgi/9.0.4/etc/pgi.csh
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/4.0pg

EMBER:
using config option 3 and nesting option 1:
setenv WRF_EM_CORE 1
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/4.0pg
source /uufs/chpc.utah.edu/sys/pkg/pgi/9.0.4/etc/pgi.csh
source /uufs/ember.arches/sys/pkg/mvapich2/std_pgi/etc/mvapich2.csh


COMPILING RIP (Courtesy Leah Campbell):
Commands to use before compiling:
setenv RIP_ROOT /uufs/chpc.utah.edu/common/home/YOUR_PATH/rip4
source /uufs/chpc.utah.edu/sys/pkg/pgi/std_rh6/etc/pgi.csh
source /uufs/chpc.utah.edu/sys/pkg/mpich2/std_pgi_rh6/etc/mpich2.csh
setenv NETCDF /uufs/chpc.utah.edu/sys/pkg/netcdf/std_pgi_rh6
setenv NCARG_ROOT /uufs/chpc.utah.edu/sys/pkg/ncarg/6.1.2_rhel6
I altered several lines from the generic one that ./configure generates.
Then use the attached configure.rip file located here:
Configure RIP file


COMPILING WPS ON ALL PLATFORMS:
option 5-6
setenv WRF_DIR
setenv NCARG_ROOT /uufs/chpc.utah.edu/sys/pkg/ncarg/5.0.0