Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

WRF Hydro Coupled fails to build without specific paths added

William.Hatheway

Active member
When building WRF Hydro Coupled following the NCAR's build guide located here:


It fails to build with intel llvm compilers.

Steps to reproduce:

  1. Install the required libraries
  2. download the wrf-hydro 5.4 github (git clone GitHub - NCAR/wrf_hydro_nwm_public: WRF-Hydro model code)
  3. download WRF 4.7.1 in new folder ( git clone GitHub - wrf-model/WRF: The official repository for the Weather Research and Forecasting (WRF) model -> cd WRF -> git submodule update --init --recursive )
  4. remove hydro folder from wrf folder based on users guide and then copy WRF hydro src folder to new hydro folder ( rm -r
    Code:
    "${WRF_FOLDER}"/WRF-${WRF_VERSION}/hydro/cp -r "${WRF_FOLDER}"/Hydro-Basecode/wrf_hydro_nwm_public/src "${WRF_FOLDER}"/WRF-${WRF_VERSION}/hydro
  5. configure ( ./configure_new -x -p "oneAPI LLVM" -- -DWRF_CORE=ARW -DWRF_NESTING=BASIC -DWRF_CASE=EM_REAL -DUSE_MPI=ON -DUSE_PIO=ON -DENABLE_HYDRO=ON -DWRF_HYDRO_NUDGING=1 -DUSE_HDF5=${HDF5_ROOT} -DUSE_JASPER=${Jasper_ROOT} 2>&1 | tee wrf_configure_new.log)
  6. compile ( ./compile_new -j 2 2>&1 | tee compile.wrf1.log)
  7. Build will fail at fftpack5


Now this is what I don't understand, when I export the netcdf include and lib paths the compilation will build.

Code:
export FFLAGS="-I${NETCDF_ROOT}/include ${FFLAGS}"
  export FCFLAGS="-I${NETCDF_ROOT}/include ${FCFLAGS}"
  export LDFLAGS="-L${NETCDF_ROOT}/lib    ${LDFLAGS}"

why is this?

@islas any ideas why the include and lib paths aren't being added to the cmake commands?
 
Yes. The hydro/ folder is also designed to be able to build without replacing it with the hydro repo's own, so it should be standalone
That's from @islas and according to the hydro people the hydro folder that's in WRF's tar file is built and maintained by the WRF staff not them. So i'm confused who to ask my questions to.
I just want to make sure i am asking in the proper forum
 
That hydro/Routing/Diversions/module_diversions_timeslice.F90 does not exist within the hydro source within WRF, but does exist within the WRF Hydro github. While the hydro/ folder that come with WRF works, it is hard to guarantee that replacing the code with the WRF Hydro repo's code will compile as there might be discrepancies or deviations.

This issue of code mismatch, especially as part of it lies outside of the WRF repo itself, is not something I can fix and would need to go through the WRF Hydro group.
 
@islas

So I found what the issue is with WRF-Hydro coupling with intel llvm. For some reason when WRF_Hydro=1 with the intel llvm compilers it is not calling the ./configure command in the hydro folder. I have manually called ./configure in the hydro folder and used the ifort option and it will build WRF-Hydro coupled. So If you can point me in the direction in the ARW github where the ./configure command calls the /hydro ./configure command I can see if I can find the issue and then issue a PR for a potential fix
 
@islas

So I found what the issue is with WRF-Hydro coupling with intel llvm. For some reason when WRF_Hydro=1 with the intel llvm compilers it is not calling the ./configure command in the hydro folder. I have manually called ./configure in the hydro folder and used the ifort option and it will build WRF-Hydro coupled. So If you can point me in the direction in the ARW github where the ./configure command calls the /hydro ./configure command I can see if I can find the issue and then issue a PR for a potential fix
solved the problem, has to with /hydro/wrf_hydro_config not having a stanza for the passing of "Configure option for Hydro : $x $paropt \n"); for the new intel one api stanza. The current version of wrf_hydro_config looks for ifort in the compiler option and since option 78 has Intel in it and not ifort it causes a critical failure.

I think the easiest solution is to ask the hydro team to add a stanza for intel instead of modifying the naming structure of the ./configure option 78
 
That will fix intel one api for the make build (option 78 / ./configure is only for the make build). The original issue of the thread will most likely not be solved, as the new ./configure_new does not utilize WRF Hydro's ./configure
 
That will fix intel one api for the make build (option 78 / ./configure is only for the make build). The original issue of the thread will most likely not be solved, as the new ./configure_new does not utilize WRF Hydro's ./configure
You are correct, is there any documentation that talks about how the configure_new propogates information to the hydro compilers?
 
Top