How to run WRF-SFire on Gross and Colibri

From CCM
Jump to: navigation, search

This is a legacy page and it is no longer maintained. For archival purposes only.

This page refers to a system installation that no longer exists. Please see Gross user's documentation for current information.

With gfortran

WRF-Fire can be built with gfortran, which is free and thus unlimited number of people can use it at the same time. Unfortunately gdb, the debugger that comes with gfortran, works very poorly and claims that variables do not exist when they do, etc.

  • get WRF-Fire.
  • Set up the environment (best add this to your .bashrc)
source ~jmandel/bin/gnu

which contains the settings

export NETCDF=~jmandel/lib/netcdf
export HDF5=$NETCDF
export JASPERINC=$NETCDF/include
export NCARG_ROOT=~jmandel/lib/ncarg

With the PGI fortran compiler

The Portland Group Fortran compiler has an actually working debugger, unlike gdb that comes with gfortran. Also, it important to test the code under as many compilers as possible. These instructions assume your shell is bash. We have only a very limited number of licenses of the PGI compiler available - do not leave any debug sessions running unnecessarily, this will prevent other people from using the compiler!

  • get WRF-Fire.
  • Set up the environment:
    • source ~jmandel/.pgif90_gcc (persists for your current session)
    • mpi-selector-menu, choose mvapich_pgi-1.2.0, start a new shell (persits forever until changed)
  • Follow How to run WRF-Fire.
    • In ./configure -d, choose "PGI fortran with GCC", and "nesting=1"
    • Follow Gross user's documentation to run MPI
    • To run under the debugger using the command line interface, use pgdbg -text ./wrf.exe
    • If you run graphics, use just pgdbg ./wrf.exe for the gui.

Some useful PGI debugger commands

  • r, s, n, the usual
  • b <subroutine> - stop in subroutine. Can find subroutines in modules.
  • watch <variable> - stop if the variable's value changes
  • If you lose the line where the code is stopped, use the up and down commands.
  • The list command stinks, sorry.
  • To stop right before the program exits (so that you can print variables for post mortem analysis, for example), b exit

For postmortem analysis for a program that did not run under the debugger, set before running the code ulimit -c unlimited ; export PGI_TERM=abort , then after the code crashes pgdbg -text pgdbg -core core ./wrf.exe

For more information search for pgdbg in the PGI User's Guide and the PGI Tools documentation.

Personal tools