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 compile ERROR

vrojas

New member
Good morning,
I have an error when compiling WRF 4.4.2. I am attaching the log file. Please, I look forward to your prompt response, and thanks for your support.
 

Attachments

  • log_compile.txt
    1.1 MB · Views: 13
can you type this command from the terminal you are trying to compile WRF with?

env | sort

and then put the output into a text file
 
Good morning, I have attached the requested file. Thanks for helping to fix the problem.
Today I will be attentive to any other suggestion or request in order to compile WRF successfully.
 

Attachments

  • env_sort_file.txt
    3.4 KB · Views: 10
Good morning, I have attached the requested file. Thanks for helping to fix the problem.
Today I will be attentive to any other suggestion or request in order to compile WRF successfully.
Are you trying to install WRF with the conda package activated? Does it show something in the terminal like (base)
 
I have anaconda installed, and by default the base env appears every time I log in. Is it possible that the problem is having anaconda installed? I will uninstall anaconda and then try to compile WRF
 
I have anaconda installed, and by default the base env appears every time I log in. Is it possible that the problem is having anaconda installed? I will uninstall anaconda and then try to compile WRF
So what is happening is because Anaconda is a mini environment on the desktop it has library files that are the same name as the ones you installed for WRF.

So you can do two things.

1. Uninstall Anaconda but then if you are using anaconda for any of your software it won't work.

2. Enter these commands to make anaconda not start up automatically.

conda activate base
conda config --set auto_activate_base false
conda deactivate

then restart the terminal and conda should not come on automatically and WRF should install properly,
 
Hi Will,
After making the recommendation (disable anaconda), I recompiled WRF and got error.
Please, I am sure that with your help WRF can be compiled correctly.
 

Attachments

  • env_sort_file_02.txt
    3.4 KB · Views: 3
  • log_compile_02.txt
    1.1 MB · Views: 3
Hi Will,
After making the recommendation (disable anaconda), I recompiled WRF and got error.
Please, I am sure that with your help WRF can be compiled correctly.
Good afternoon,

Can you please attach config.log from the WRF folder. I want to make sure everything is correct
 
Hi Will,

This is the configure.wrf file (configure_wrf_log.txt) after running ./configure
 

Attachments

  • configure_wrf_log.txt
    20.8 KB · Views: 2
  • Screenshot from 2022-10-09 23-04-07.png
    Screenshot from 2022-10-09 23-04-07.png
    33.2 KB · Views: 5
Last edited:
@vrojas
To be certain, did you go through the system environment tests listed in the compile tutorial, and did you pass them all?

The error message showing is:
Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f
/bin/sh: line 1: /lib/cpp: No such file or directory
/bin/sh: line 1: /lib/cpp: No such file or directory
make[3]: [Makefile:58: ESMF_Fraction.o] Error 127 (ignored)

This happens right at the beginning of the compile. Can you try commands at the top of the compile by issuing the following commands:

From the top-level WRF directory, issue a "clean -a" to clean the code, then reconfigure. After that, enter these one at a time. As you go, check for the new files I've indicated, and if, at any point, you don't have one, stop and let me know what that file is.

Code:
cd external/esmf_time_f90
Code:
/bin/rm -f ESMF_Base.o
Code:
/bin/rm -f ESMF_Fraction.o
Code:
sed -e "/\!.*'/s/'//g" ESMF_Base.F90 > ESMF_Base.b

Then issue an "ls" to check that you now have a file called "ESMF_Base.b"

Code:
sed -e "/\!.*'/s/'//g" ESMF_Fraction.F90 > ESMF_Fraction.b

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.b"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Fraction.b > ESMF_Fraction.f

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.f"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f

Then issue an "ls" to check that you now have a file called "ESMF_Base.f"

Code:
/bin/rm -f ESMF_Fraction.b

That last line seems to be the one the compile is tripping up on. It's claiming you don't have the file "ESMF_Fraction.b," but if you had it in the steps above, you should have it now.

Let me know how this goes.
 
@vrojas
To be certain, did you go through the system environment tests listed in the compile tutorial, and did you pass them all?

The error message showing is:
Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f
/bin/sh: line 1: /lib/cpp: No such file or directory
/bin/sh: line 1: /lib/cpp: No such file or directory
make[3]: [Makefile:58: ESMF_Fraction.o] Error 127 (ignored)

This happens right at the beginning of the compile. Can you try commands at the top of the compile by issuing the following commands:

From the top-level WRF directory, issue a "clean -a" to clean the code, then reconfigure. After that, enter these one at a time. As you go, check for the new files I've indicated, and if, at any point, you don't have one, stop and let me know what that file is.

Code:
cd external/esmf_time_f90
Code:
/bin/rm -f ESMF_Base.o
Code:
/bin/rm -f ESMF_Fraction.o
Code:
sed -e "/\!.*'/s/'//g" ESMF_Base.F90 > ESMF_Base.b

Then issue an "ls" to check that you now have a file called "ESMF_Base.b"

Code:
sed -e "/\!.*'/s/'//g" ESMF_Fraction.F90 > ESMF_Fraction.b

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.b"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Fraction.b > ESMF_Fraction.f

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.f"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f

Then issue an "ls" to check that you now have a file called "ESMF_Base.f"

Code:
/bin/rm -f ESMF_Fraction.b

That last line seems to be the one the compile is tripping up on. It's claiming you don't have the file "ESMF_Fraction.b," but if you had it in the steps above, you should have it now.

Let me know how this goes.
Thanks @kwerner I was about to get to that bit too. I saw the cpp issue as well
 
@vrojas
To be certain, did you go through the system environment tests listed in the compile tutorial, and did you pass them all?

The error message showing is:
Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f
/bin/sh: line 1: /lib/cpp: No such file or directory
/bin/sh: line 1: /lib/cpp: No such file or directory
make[3]: [Makefile:58: ESMF_Fraction.o] Error 127 (ignored)

This happens right at the beginning of the compile. Can you try commands at the top of the compile by issuing the following commands:

From the top-level WRF directory, issue a "clean -a" to clean the code, then reconfigure. After that, enter these one at a time. As you go, check for the new files I've indicated, and if, at any point, you don't have one, stop and let me know what that file is.

Code:
cd external/esmf_time_f90
Code:
/bin/rm -f ESMF_Base.o
Code:
/bin/rm -f ESMF_Fraction.o
Code:
sed -e "/\!.*'/s/'//g" ESMF_Base.F90 > ESMF_Base.b

Then issue an "ls" to check that you now have a file called "ESMF_Base.b"

Code:
sed -e "/\!.*'/s/'//g" ESMF_Fraction.F90 > ESMF_Fraction.b

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.b"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Fraction.b > ESMF_Fraction.f

Then issue an "ls" to check that you now have a file called "ESMF_Fraction.f"

Code:
/lib/cpp -P -nostdinc -I/home/wrf/wrf_build/WRF/inc -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 -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 -I. ESMF_Base.b > ESMF_Base.f

Then issue an "ls" to check that you now have a file called "ESMF_Base.f"

Code:
/bin/rm -f ESMF_Fraction.b

That last line seems to be the one the compile is tripping up on. It's claiming you don't have the file "ESMF_Fraction.b," but if you had it in the steps above, you should have it now.

Let me know how this goes.
Hi K and Will,

The bug associated with /lib/cpp has been fixed. In Arch linux the executable /lib/cpp did not exist, so I linked it from /usr/bin with the following command: ln -s /usr/bin/cpp /lib. Then, start over by running the following commands: ./clean -a; ./configure; ./compile em_real >& log_compile_04.txt & tail -f log_compile_04.txt. Now the error is associated with make[3]: time: No such file or directory, as shown in the attached log file (log_compile_04.txt). I will be attentive again to your recommendations and suggestions to solve this new error.
Thank you very much K and Will, for your valuable help.

PS: When doing both tests (gcc compiler and netcdf-mpi), both passed successfully.
best wishes
 

Attachments

  • log_compile_04.txt
    1 MB · Views: 7
Top