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

Error in compiling WRF v.4.6.0, no executables found

Christa

New member
Hi, I have a problem when compiling WRF v4.6.0. I have looked for the error in compile log but could not understand how to fix it, and I need help, please. I have attached my compile log. Thank you.
 

Attachments

  • log.compile.txt
    63.1 KB · Views: 6
Code:
diffwrf io_netcdf is being built now.
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_def_var_chunking_':
nf_nc4.f90:(.text+0x5ea2): undefined reference to `nc_def_var_chunking_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_inq_var_chunking_':
nf_nc4.f90:(.text+0x61bf): undefined reference to `nc_inq_var_chunking_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_chunk_cache_':
nf_nc4.f90:(.text+0x6c0f): undefined reference to `nc_set_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_chunk_cache_':
nf_nc4.f90:(.text+0x6c48): undefined reference to `nc_get_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_var_chunk_cache_':
nf_nc4.f90:(.text+0x6cdc): undefined reference to `nc_set_var_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_var_chunk_cache_':
nf_nc4.f90:(.text+0x6d37): undefined reference to `nc_get_var_chunk_cache_ints'
collect2: error: ld returned 1 exit status

Looks like netcdf-c may not have built right.


Run the tests and see if any fail first.
 
Code:
diffwrf io_netcdf is being built now.
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_def_var_chunking_':
nf_nc4.f90:(.text+0x5ea2): undefined reference to `nc_def_var_chunking_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_inq_var_chunking_':
nf_nc4.f90:(.text+0x61bf): undefined reference to `nc_inq_var_chunking_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_chunk_cache_':
nf_nc4.f90:(.text+0x6c0f): undefined reference to `nc_set_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_chunk_cache_':
nf_nc4.f90:(.text+0x6c48): undefined reference to `nc_get_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_var_chunk_cache_':
nf_nc4.f90:(.text+0x6cdc): undefined reference to `nc_set_var_chunk_cache_ints'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/cbire/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_var_chunk_cache_':
nf_nc4.f90:(.text+0x6d37): undefined reference to `nc_get_var_chunk_cache_ints'
collect2: error: ld returned 1 exit status

Looks like netcdf-c may not have built right.


Run the tests and see if any fail first.
Hi, thank you your reply. I have the tests and all succeeded but still having the same error.
 

Attachments

  • log.compile.txt
    63.3 KB · Views: 5
Hi, thank you your reply. I have the tests and all succeeded but still having the same error.

Okay that's good to know. So the next simple test is to make sure that all the exports to the library are in the $PATH and $LD_LIBRARY_PATH

Try these commands and copy the output here:

echo $PATH

echo $LD_LIBRARY_PATH

What that command does is prints out the file paths of all the exports in the variable name. What we are looking for is the file paths to the netcdf folders in it.

This may not be the issue but I'm trying to debug it using the simple solutions before going into the harder ones.
 
Okay that's good to know. So the next simple test is to make sure that all the exports to the library are in the $PATH and $LD_LIBRARY_PATH

Try these commands and copy the output here:

echo $PATH

echo $LD_LIBRARY_PATH

What that command does is prints out the file paths of all the exports in the variable name. What we are looking for is the file paths to the netcdf folders in it.

This may not be the issue but I'm trying to debug it using the simple solutions before going into the harder ones.
It looks like it is the file folder is there but I still want to double check
 
Okay that's good to know. So the next simple test is to make sure that all the exports to the library are in the $PATH and $LD_LIBRARY_PATH

Try these commands and copy the output here:

echo $PATH

echo $LD_LIBRARY_PATH

What that command does is prints out the file paths of all the exports in the variable name. What we are looking for is the file paths to the netcdf folders in it.

This may not be the issue but I'm trying to debug it using the simple solutions before going into the harder ones.
Hi,
here are the ouputs:
echo $PATH
/home/cbire/Build_WRF/LIBRARIES/mpich/bin:/home/cbire/Build_WRF/LIBRARIES/netcdf/bin:/home/cbire/Build_WRF/LIBRARIES/netcdf/bin:/opt/rh/gcc-toolset-9/root/usr/bin:/home/cbire/Wrappers:/home/cbire/Wrappers:/home/cbire/.local/bin:/home/cbire/bin:/home/cbire/Wrappers:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/bin:/usr/X11R6/bin

echo $LD_LIBRARY_PATH
/opt/rh/gcc-toolset-9/root/usr/lib64:/opt/rh/gcc-toolset-9/root/usr/lib:/opt/rh/gcc-toolset-9/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-9/root/usr/lib/dyninst
 
Hi,
here are the ouputs:
echo $PATH
/home/cbire/Build_WRF/LIBRARIES/mpich/bin:/home/cbire/Build_WRF/LIBRARIES/netcdf/bin:/home/cbire/Build_WRF/LIBRARIES/netcdf/bin:/opt/rh/gcc-toolset-9/root/usr/bin:/home/cbire/Wrappers:/home/cbire/Wrappers:/home/cbire/.local/bin:/home/cbire/bin:/home/cbire/Wrappers:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/bin:/usr/X11R6/bin

echo $LD_LIBRARY_PATH
/opt/rh/gcc-toolset-9/root/usr/lib64:/opt/rh/gcc-toolset-9/root/usr/lib:/opt/rh/gcc-toolset-9/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-9/root/usr/lib/dyninst


Bash:
export LD_LIBRARY_PATH=$HOME/WRF/Libs/NETCDF/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$HOME/WRF/Libs/grib2/lib:$LD_LIBRARY_PATH

export PATH=$HOME/WRF/Libs/MPICH/bin:$PATH

export PATH=$HOME/WRF/Libs/grib2/lib:$PATH

So these are the exports I use for WRF when doing GNU compilers.

looks like everything is in the path correct for you, but I would add the netcdf lib folder and the grib2 folder (which is where all the other library files are located) to the ld library path and see if that helps you
 
Bash:
export LD_LIBRARY_PATH=$HOME/WRF/Libs/NETCDF/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$HOME/WRF/Libs/grib2/lib:$LD_LIBRARY_PATH

export PATH=$HOME/WRF/Libs/MPICH/bin:$PATH

export PATH=$HOME/WRF/Libs/grib2/lib:$PATH

So these are the exports I use for WRF when doing GNU compilers.

looks like everything is in the path correct for you, but I would add the netcdf lib folder and the grib2 folder (which is where all the other library files are located) to the ld library path and see if that helps you
I have tried this but still having errors. There's still no executables. What could I do next?
 

Attachments

  • log.compile.txt
    63.3 KB · Views: 2
@Christa I'm assuming you're using the same versions of netCDF linked in the tutorial. Could you post the output of the "Library Compatibility Tests" in that tutorial? I would have assumed they would fail since any use of netCDF in the WRF build is also failing...

Additionally, could you upload your configure.wrf generated from ./configure?
 
@Christa I'm assuming you're using the same versions of netCDF linked in the tutorial. Could you post the output of the "Library Compatibility Tests" in that tutorial? I would have assumed they would fail since any use of netCDF in the WRF build is also failing...

Additionally, could you upload your configure.wrf generated from ./configure?
Hi, yes I am using the same versions of netcdf in the tutorial. Here are the outputs of Library Compability Tests:
Test 1:
C function called by Fortran
Values are xx = 2.00 and ii = 1
SUCCESS test 1 fortran + c + netcdf

Test 2:
C function called by Fortran
Values are xx = 2.00 and ii = 1
status = 2
SUCCESS test 2 fortran + c + netcdf + mpi

All of them succeeded.
And here is the configure.wrf file attached. Thank you
 

Attachments

  • configure.wrf.txt
    21.4 KB · Views: 4
Sorry for the delayed response, @Christa. I couldn't quite reproduce the issue but I think you can try export NETCDF_classic=1
This thread also seems to address the same issues.

I think it comes from the fact that the netCDF install was done without shared libraries but does not link in HDF5.
 
Sorry for the delayed response, @Christa. I couldn't quite reproduce the issue but I think you can try export NETCDF_classic=1
This thread also seems to address the same issues.

I think it comes from the fact that the netCDF install was done without shared libraries but does not link in HDF5.
Hi @islas thank you for the reply, unfortunately I tried export NETCDF_classic=1 but still not working with the same error in the build log

I followed the instructions in Compiling WRF
./configure --prefix=$DIR/netcdf --disable-dap
--disable-netcdf-4 --disable-shared
should I change this?
 
Last edited:
I had the similar issue with netcdf while using gcc 9.2.1, I changed into gcc 9.5.0.
Hi @Dipson11 I tried to change to GCC 10.3.1 but still the same issue.
The first errors are :
./../frame/pack_utils.o ../../frame/module_internal_header_util.o ../../frame/module_driver_constants.o ../../frame/module_machine.o ../../frame/module_wrf_error.o ../../frame/wrf_debug.o libwrfio_int.a ; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
ESMF_MOD_DEPENDENCE="/home/cbire/WRF/external/esmf_time_f90/module_utility.o" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf ; \
rm -f module_wrf_error.o
 
As an alternative, you might try following the directions here :
for building the dependencies. They are slightly different, and I think it's worth exploring as the problematic symbols are HDF5-specific and the original online tutorials omit HDF5 building. The ones I've linked use shared libraries and HDF5 to build netCDF.

For the initial export of variables, you should be able to more or less reuse the online tutorial instructions for GCC / gfortran instead of the Intel-specific ones shown in the link above. The rest of the instructions in the code boxes per software dependency should not need significant changes between compilers.
 
Hi, I have a problem when compiling WRF v4.6.0. I have looked for the error in compile log but could not understand how to fix it, and I need help, please. I have attached my compile log. Thank you.
Hi, I saw a small part of this thread mentioning about installing and compiling WRF version 4.6 and would like to ask about a small problem in my compilation process. I downloaded the v4.6.0.zip fileK121R`R2BO8M~SUN3[VU]%U.png from WRF's git site and extracted it to the server to install. The problem is that when I compile to the last step I can't generate *.exe successfully. What's the reason for this? I would appreciate it if you could tell me something about this.U[(1QGM`FKZ7(DSI(R%N~38.png%LYEXMANL9O8N9YD556D0KN.png
 
Hi, I saw a small part of this thread mentioning about installing and compiling WRF version 4.6 and would like to ask about a small problem in my compilation process. I downloaded the v4.6.0.zip file
K121R`R2BO8M~SUN3[VU]%U.png
from WRF's git site and extracted it to the server to install. The problem is that when I compile to the last step I can't generate *.exe successfully. What's the reason for this? I would appreciate it if you could tell me something about this.
Hi,
Since the issue you're seeing isn't the exact same as the other user, and especially because compiling issues can be due to multiple different things, can you open a new thread to ask your question? When you do, please attach the configure.wrf file, as well as the full compiling log. Thanks.
 
Top