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

PLEASE HELP!!!! unable to compile em_real using WRF v4.6.1!!

zhw

New member
Hi members,

I hope everyone is doing great. I have been following the instructions here: Full WRF and WPS Installation Example (GNU) (select 34 and 1 for configuration), but unable to compile em_real successfully. Everything seems to be running fine until the final linking in which I get the following error from the link command to create wrf.exe, where this happens...
I did set these environment variables in addition: FFLAGS = -fallow-argument-mismatch, FCFLAGS = -fallow-argument-mismatch.

gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


time mpif90 -o ../main/module_wrf_top.o -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -fallow-invalid-boz -I../dyn_em -I/home/hanwenzhang/WRF/external/esmf_time_f90 -I/home/hanwenzhang/WRF/main -I/home/hanwenzhang/WRF/external/io_netcdf -I/home/hanwenzhang/WRF/external/io_int -I/home/hanwenzhang/WRF/frame -I/home/hanwenzhang/WRF/share -I/home/hanwenzhang/WRF/phys -I/home/hanwenzhang/WRF/wrftladj -I/home/hanwenzhang/WRF/chem -I/home/hanwenzhang/WRF/inc -I/home/hanwenzhang/Build_WRF/LIBRARIES/netcdf/include ../main/module_wrf_top.f90
1.35user 0.16system 0:01.51elapsed 100%CPU (0avgtext+0avgdata 77384maxresident)k
0inputs+2728outputs (0major+24016minor)pagefaults 0swaps
rm -f wrf.o
sed -e "s/^\!.*'.*//" -e "s/^ *\!.*'.*//" wrf.F > wrf.G
/lib/cpp -P -nostdinc -I/home/hanwenzhang/WRF/inc -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 -DDM_PARALLEL -DNETCDF -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 -I. -traditional-cpp wrf.G > wrf.bb
/home/hanwenzhang/WRF/tools/standard.exe wrf.bb | /lib/cpp -P -nostdinc -traditional-cpp > wrf.f90
rm -f wrf.G wrf.bb
time mpif90 -o wrf.o -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -fallow-invalid-boz -I../dyn_em -I/home/hanwenzhang/WRF/external/esmf_time_f90 -I/home/hanwenzhang/WRF/main -I/home/hanwenzhang/WRF/external/io_netcdf -I/home/hanwenzhang/WRF/external/io_int -I/home/hanwenzhang/WRF/frame -I/home/hanwenzhang/WRF/share -I/home/hanwenzhang/WRF/phys -I/home/hanwenzhang/WRF/wrftladj -I/home/hanwenzhang/WRF/chem -I/home/hanwenzhang/WRF/inc -I/home/hanwenzhang/Build_WRF/LIBRARIES/netcdf/include wrf.f90
0.22user 0.08system 0:00.30elapsed 100%CPU (0avgtext+0avgdata 37952maxresident)k
0inputs+64outputs (0major+11888minor)pagefaults 0swaps
ranlib libwrflib.a
time mpif90 -o wrf.exe -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -fallow-invalid-boz wrf.o ../main/module_wrf_top.o libwrflib.a /home/hanwenzhang/WRF/external/fftpack/fftpack5/libfftpack.a /home/hanwenzhang/WRF/external/io_grib1/libio_grib1.a /home/hanwenzhang/WRF/external/io_grib_share/libio_grib_share.a /home/hanwenzhang/WRF/external/io_int/libwrfio_int.a -L/home/hanwenzhang/WRF/external/esmf_time_f90 -lesmf_time /home/hanwenzhang/WRF/external/RSL_LITE/librsl_lite.a /home/hanwenzhang/WRF/frame/module_internal_header_util.o /home/hanwenzhang/WRF/frame/pack_utils.o -L/home/hanwenzhang/WRF/external/io_netcdf -lwrfio_nf -L/home/hanwenzhang/Build_WRF/LIBRARIES/netcdf/lib -lnetcdff -lnetcdf
/usr/bin/ld: /tmp/ccS01ACw.ltrans55.ltrans.o: in function `__module_wps_io_arw_MOD_read_wps':
<artificial ":<".text+0x39b12e): undefined reference to `__module_optional_input_MOD_flag_st000010'
/usr/bin/ld: <artificial":<".text+0x39b13b): undefined reference to `__module_optional_input_MOD_flag_st010040'
/usr/bin/ld: <artificial":<".text+0x39b148): undefined reference to `__module_optional_input_MOD_flag_st040100'
/usr/bin/ld: <artificial":<".text+0x39b155): undefined reference to `__module_optional_input_MOD_flag_st100200'
......(many similar lines).....
/usr/bin/ld: <artificial":<".text+0x3a82d2): undefined reference to `__module_optional_input_MOD_st_input'
/usr/bin/ld: <artificial":<".text+0x3a82dd): undefined reference to `__module_optional_input_MOD_st_input'
/usr/bin/ld: <artificial":<".text+0x3a82e8): undefined reference to `__module_optional_input_MOD_st_input'
/usr/bin/ld: <artificial":<".text+0x3a82f3): undefined reference to `__module_optional_input_MOD_st_input'
/usr/bin/ld: /tmp/ccS01ACw.ltrans55.ltrans.o:<artificial":<".text+0x3a82fe): more undefined references to `__module_optional_input_MOD_st_input' follow
collect2: error: ld returned 1 exit status
Command exited with non-zero status 1
1648.06user 24.24system 5:10.71elapsed 538%CPU (0avgtext+0avgdata 3293636maxresident)k
0inputs+822936outputs (0major+12363348minor)pagefaults 0swaps
make[1]: [Makefile:17: em_wrf] Error 1 (ignored)
make[1]: Leaving directory '/home/hanwenzhang/WRF/main'
( cd run ; /bin/rm -f wrf.exe ; ln -s ../main/wrf.exe . )
if [ 0 -eq 1 ] ; then \
( cd main ; make -i -r RLFLAGS="" MODULE_DIRS="-I../dyn_em -I/home/hanwenzhang/WRF/external/esmf_time_f90 -I/home/hanwenzhang/WRF/main -I/home/hanwenzhang/WRF/external/io_netcdf -I/home/hanwenzhang/WRF/external/io_int -I/home/hanwenzhang/WRF/frame -I/home/hanwenzhang/WRF/share -I/home/hanwenzhang/WRF/phys -I/home/hanwenzhang/WRF/wrftladj -I/home/hanwenzhang/WRF/chem -I/home/hanwenzhang/WRF/inc -I/home/hanwenzhang/Build_WRF/LIBRARIES/netcdf/include " SOLVER=em em_wrf_SST_ESMF ) ; \
fi
build started: Fri Nov 22 09:55:58 AM GMT 2024
build completed: Fri Nov 22 10:18:15 AM GMT 2024





Any help will be greatly appreciated!!!!

best regards,
 
Last edited:
Hi sir, thank you for your reply! Here are the log files and wrf files.
 

Attachments

  • ls.txt
    296 bytes · Views: 3
  • configure.wrf.txt
    20.3 KB · Views: 5
Hi sir, thank you for your reply! Here are the log files and wrf files.

try building it again but this time when you compile em_real do this command
Code:
./compile em_real 2>&1 | tee compile.wrf.log

or if you are compiling with multiple cores

Code:
./compile -j #cores em_real 2>&1 | tee compile.wrf.log

if you still have all the exports from when you built it I personally would delete the WRF folder where 4.6.1 is and rebuild it again or you can do these commands

Code:
./clean -a
then the above commands

if it fails again upload the compile.wrf.log file and configure.wrf file again. Also include what options you chose. That will help debug it
 
try building it again but this time when you compile em_real do this command
Code:
./compile em_real 2>&1 | tee compile.wrf.log

or if you are compiling with multiple cores

Code:
./compile -j #cores em_real 2>&1 | tee compile.wrf.log

if you still have all the exports from when you built it I personally would delete the WRF folder where 4.6.1 is and rebuild it again or you can do these commands

Code:
./clean -a
then the above commands

if it fails again upload the compile.wrf.log file and configure.wrf file again. Also include what options you chose. That will help debug it
Thank you for your guidance! I followed your instructions, but unfortunately I still failed to compile em_real successfully.

At the configuration step, I chose 34 (dmpar) and 1 (basics).

Here attaches the new compile.wrf.log and configure.wrf file.


Some additional information, I cannot compile em_real when configuring 32 (serial) and 0 (no nesting) either. I was able to compile em_real when configuring 32 (serial) and 0 (no nesting) using WRF version 4.3.3. However, I failed to compile em_real when configuring 34 (dmpar) and 1 (basics) for WRF version 4.3.3 as well.


Thank you for your help!


Best regards,
 

Attachments

  • compile.wrf.log
    745.6 KB · Views: 4
  • configure.wrf.txt
    20.3 KB · Views: 1
Thank you for your guidance! I followed your instructions, but unfortunately I still failed to compile em_real successfully.
Hi,
I apologize for asking you to build one more time, but can you issue these exact commands?

Code:
./clean -a

./configure

./compile em_real -j 1 >& compile.txt

and then, once again, attach the compile.txt file, along with the latest configure.wrf. Thank you!
 
Hi,
I apologize for asking you to build one more time, but can you issue these exact commands?

Code:
./clean -a

./configure

./compile em_real -j 1 >& compile.txt

and then, once again, attach the compile.txt file, along with the latest configure.wrf. Thank you!
Hi Administrator,

Here attaches the files, as the system does not allow to upload configure.wrf, I converted it to .txt. Like previous cases, I chose 34 and 1 for configuration. Greatly appreciated for your help!

Best regards,
 

Attachments

  • compile.txt
    745.7 KB · Views: 6
  • configure.wrf.txt
    20.3 KB · Views: 3
Thanks for sending those. Did you make any modifications to the WRF code before compiling?
 
Top