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

Could not build WRFv4.6.0 using configure_new

Feng Liu

Member
Hi WRF Users
I recently obtained the latest version of WRF 4.6.0 by cloning the repository using the command `git clone --recurse-submodule GitHub - wrf-model/WRF: The official repository for the Weather Research and Forecasting (WRF) model`.

In an attempt to build theWRF_ARW, I followed the instructions outlined in the `README.cmake_build` document under the WRF documentation directory. However, during the build process using `configure_new` and `compile_new`, I encountered the following error message:

NVFORTRAN-F-0007-Subprogram too large to compile at this optimization level (/WRF4.6.0/WRF/_build/inc/REGISTRY_COMM_NESTING_DM_subs.inc)
NVFORTRAN/x86-64 Linux 22.1-0: compilation aborted
make[2]: *** [CMakeFiles/WRF_Core.dir/frame/module_comm_nesting_dm.F.o] Error 2
make[1]: *** [CMakeFiles/WRF_Core.dir/all] Error 2
make: *** [all] Error 2

Could you please provide insights based on your experience with this issue?

Thanks,

Feng
 
This tutorial is outdated as it does not cover the latest methods for building WRF 6.0. The current version can be built using `configure_new` and `compile_new`, which are not mentioned in the tutorial.

Thanks
I think both methods work, because I have used the old method to build 4.6 but the new method uses cmake build structure. Sadly, I'm not familiar with it yet either.
 
I think both methods work, because I have used the old method to build 4.6 but the new method uses cmake build structure. Sadly, I'm not familiar with it yet either.
Thank you for responding. I attempted to compile using both methods but in vain. When using the traditional method, I encountered the following error message:

make[3]: [module_wind_mav.o] Error 2 (ignored
...
make[3]: Leaving directory `/WRF4.6.0/WRF/phys'
ar: module_wind_mav.o: No such file or directory
make[2]: [physics] Error 1 (ignored)
make[2]: Leaving directory `/WRF4.6.0/WRF/phys'
make[1]: Leaving directory `/wrf/WRF4.6.0/WRF'
 
Thank you for responding. I attempted to compile using both methods but in vain. When using the traditional method, I encountered the following error message:

make[3]: [module_wind_mav.o] Error 2 (ignored
...
make[3]: Leaving directory `/WRF4.6.0/WRF/phys'
ar: module_wind_mav.o: No such file or directory
make[2]: [physics] Error 1 (ignored)
make[2]: Leaving directory `/WRF4.6.0/WRF/phys'
make[1]: Leaving directory `/wrf/WRF4.6.0/WRF'
which compiler are you using gnu? intel?
 
@Feng Liu
Can you attach the compile log and configure.wrf script from your compile when you did it the standard way (i.e., not with cmake)? Thanks!
 
Hi, thank you very much for your response. Please see compile.log file attached based on the standard way for your review.
 

Attachments

  • compile.log
    877.2 KB · Views: 7
@Feng Liu
Can you attach the compile log and configure.wrf script from your compile when you did it the standard way (i.e., not with cmake)? Thanks!
I got the same error message as I posted here at very beginning when I tried to use
./configure_new
./compile_new -j 12

Error message:
NVFORTRAN-F-0007-Subprogram too large to compile at this optimization level (/samba/fliu/wrf/WRF4.6.0/WRF/_build/inc/REGISTRY_COMM_NESTING_DM_subs.inc)
NVFORTRAN/x86-64 Linux 22.1-0: compilation aborted
make[2]: *** [CMakeFiles/WRF_Core.dir/frame/module_comm_nesting_dm.F.o] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/WRF_Core.dir/all] Error 2
make: *** [all] Error 2
 
There are currently two problems with v4.6.0 and the nvhpc/pgi compilers.

First, regardless of cmake/make build PR#1944 introduced a non-standard Fortran call isnan() which NVIDIA explicitly does not support : Error : isnan, has not been explicitly declared. I'll follow up with an appropriate fix as there shouldn't be a need to check for nan outputs if you check inputs for defined operations (here being acos()). In the interim, a quick fix is to modify phys/module_wind_mav.F:find_turb() function at lines 1209-1244 for v4.6.0 to use ieee_arithmetic and the corresponding nan check ieee_is_nan:
Code:
 1209    function find_turb(xc, yc, xt, yt, u, v, sr_angle, sr_dis)  result(ft)
 1210    use, intrinsic :: ieee_arithmetic ! <--- EDIT HERE !!!
 1211    implicit none
 1212    logical :: ft 
 1213    real :: xc, yc, xt, yt, sr_angle, sr_dis, u, v
 1214    real :: posi_angle, posi_dis, spd, xp, yp, angle
 1215    real ( kind = 8 ) :: tmp1, tmp2
 1216  
 1217    ft = .false.
 1218  
 1219    xp = xt - xc
 1220    yp = yt - yc
 1221    posi_dis = sqrt(yp**2 + xp**2) 
 1222  
 1223    if (posi_dis <= sr_dis) then
 1224        posi_angle = atan2(-yp, -xp) 
 1225        spd = sqrt(u**2 + v**2)
 1226        !tmp1 = -(u*xp + v*yp) ! negative means ups diretion
 1227        tmp1 = real( -(u*xp + v*yp), kind = 8 )
 1228        tmp2 = real( sqrt( (u**2 + v**2) * (xp**2 + yp**2) ), kind = 8)
 1229  
 1230        if (abs(tmp2) < abs(tmp1)) then
 1231            tmp2 = sign(tmp1,tmp2)
 1232        end if
 1233  
 1234        angle = real(acos(tmp1/tmp2), kind = 4)
 1235  
 1236        if (ieee_is_nan(angle)) then ! <--- EDIT HERE !!!
 1237           angle = 0.
 1238        end if
 1239   
 1240        if (abs(angle) <= sr_angle) then
 1241            ft = .true.
 1242        end if
 1243    end if
 1244  
 1245    end function find_turb


The second issue is that the cmake build applies optimizations to all files when compiling in release mode. While this should be changed in the future, a more timely fix would be to compile in Debug mode (./configure_new -- -DCMAKE_BUILD_TYPE=Debug).


Fixes for both these issues should be addressed in the next patch update.
 

Also another issue is bad line continuations :
 
Report

Hi islas,​

Many thanks for providing the solutions. I've successfully compiled WRF4.6.0 on our HPC system using cmake, making adjustments to certain modules as per your guidance.
I am now working on the test case using WRF4.6.0.

Feng
 
Failed to compile WRFV4.6.0 using WRF-MOSIT(Intel LLVM) (/phys/module_firebrand_spotting.f90).
Help ?

Shadekul
 

Attachments

  • compile.wrf1.log
    914.9 KB · Views: 3
Top