Skip to content

(2023-02-07) Lab Notebook: WRF installation with EasyBuild


This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date, version information and other details.

Lab Notebook --- Installing WRF on HPCC using EasyBuild (2023-02-07)

The Problem (as of EasyBuild 4.6.2)

Currently, the most recent versions of WRF (4.1 and later) cannot be successfully built by the most recent version of EasyBuild instlled on HPCC (4.6.2). As best I can tell, although EasyBuild is loads more recent versions of GCC and OpenMPI and uses them to build dependencies such as netCDF, something in WRF itself (I think) is configure so that when attempting to compile tests cases (i.e. "compile em_b_wave"), the versions of GCC and OpenMPI the automatically load on HPCC (6.4.0 and 2.1.2 respectively) are used.

In my experience, this problem tends to manifiest in one of two ways: either EasyBuild will fail while trying to build one of the test cases due to a mismatch in compiler version with netCDF ("Fatal Error: Cannot read module file netcdf.mod opened at (1), because it was created by a different version of GNU Fortran") or elements of the test case will fail to build due to the older GCC complier not recognizing the flag "-fallow-argument-mismatch" (gfortran: error: unrecognized command line option -fallow-argument-mismatch; did you mean -Wlto-type-mismatch?) which is believe is a 10+ flag for GCC (see You will also probably see something like:

Serial Fortran compiler (mostly for tool generation): which SFC /opt/software/GCCcore/6.4.0/bin/gfortran

In the output or log file when trying to compile a test case.

Current Solution

Currently, the best solution is to use an older version of EasyBuid (4.5.0) which can be loaded via "module load EasyBuild/4.5.0". This approach has been tested and works out of the box for WRF 4.1.3, 4.2.2, and 4.3.

However, older (3.6.X) versions of WRF may require an even older verion of EasyBuild, but their remains problem with this approach realted to folder accesibility [TBD, consult with Andrew and Xaioge]

Notes and Future Considerations

I am neither well versed in Fortran nor WRF, so the above is a compilation of my observation of trying to get WRF intalled along with a little reserach along the way. As a Lab Notebook, this primarily serves as a reference point and installing WRF should probably be revisited if and when EasyBuild is updated (4.7.0 was released recently)

Update (2-8-2023): Installed EasyBuild 4.7.0, same issues as 4.6.2. need to follow up with additional confgiuration mentioned by Xiaoge