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 Compilation

nos_1988

New member
Hi everyone,

I tried to compile WRF 4.4 by gfortran. I configure WRF with option DM+SM (35). I got error /usr/bin/ld: cannot find /home/nos/WRF/WRF/external/RSL_LITE/librsl_lite.a: No such file or directory.
 

Attachments

  • compile.log
    405.9 KB · Views: 2
Would you please compile WRF in dmpar mode and let me know whether you still have the same issue?
 
Relevant excerpt from the logfile :
Code:
          CPP="/lib/cpp -P -nostdinc -I. -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DDA_CORE=0 -DWRFPLUS=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR  -DWRF_USE_CLM -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT  -DDM_PARALLEL -DNETCDF -DHDF5 -DLANDREAD_STUB=1 -DUSE_ALLOCATABLES -Dwrfmodel -DGRIB1 -DINTIO -DKEEP_INT_AROUND -DLIMIT_ARGS -DBUILD_RRTMG_FAST=0 -DBUILD_RRTMK=0 -DBUILD_SBM_FAST=1 -DSHOW_ALL_VARS_USED=0 -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0  -traditional-cpp -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT" AR="ar" ARFLAGS="ru" ;\
          ranlib /home/nos/WRF/WRF/external/RSL_LITE/librsl_lite.a )
make[3]: Entering directory '/home/nos/WRF/WRF/external/RSL_LITE'
mpicc -cc=gcc -w -O3 -c   -DDM_PARALLEL -DLANDREAD_STUB=1 -DMAX_HISTORY=25 -DNMM_CORE=0  -c c_code.c
mpicc -cc=gcc -w -O3 -c   -DDM_PARALLEL -DLANDREAD_STUB=1 -DMAX_HISTORY=25 -DNMM_CORE=0  -c buf_for_proc.c
c_code.c: In function ‘rsl_lite_pack_’:
c_code.c:487:27: error: passing argument 1 of ‘f_pack_lint_’ from incompatible pointer type [-Wincompatible-pointer-types]
  487 |             F_PACK_LINT ( buf, p+yp_curs, imemord, &js, &je, &ks, &ke, &is, &ie,
      |                           ^~~
      |                           |
      |                           char *
In file included from c_code.c:31:
rsl_lite.h:200:25: note: expected ‘long int *’ but argument is of type ‘char *’
  200 | void F_PACK_LINT (long *inbuf, long *outbuf, int* memorder, int* js, int* je, int* ks, int* ke, int* is, int* ie, int* jms, int* jme, int* kms, int* kme, int* ims, int* ime, int* curs);
      |                   ~~~~~~^~~~~
c_code.c:487:33: error: passing argument 2 of ‘f_pack_lint_’ from incompatible pointer type [-Wincompatible-pointer-types]
  487 |             F_PACK_LINT ( buf, p+yp_curs, imemord, &js, &je, &ks, &ke, &is, &ie,
      |                                ~^~~~~~~~
      |                                 |
      |                                 char *
rsl_lite.h:200:38: note: expected ‘long int *’ but argument is of type ‘char *’

This looks to be an issue of compiling with the newer gcc 14 compilers. See GCC 14 leads to compile errors in WRF/WPS compilation · Issue #2047 · wrf-model/WRF for more details.

A propose fix can be found at Add explicit casts to mismatched pointer types in rsl_lite by islas · Pull Request #2062 · wrf-model/WRF

If you need to stay on WRF v4.4, you might be able to take those proposed edits and integrate them into your copy for the time being.
 
Top