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
Hi, thank you your reply. I have the tests and all succeeded but still having the same error.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.
It looks like it is the file folder is there but I still want to double checkOkay 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,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
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
I have tried this but still having errors. There's still no executables. What could I do next?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
Hi, yes I am using the same versions of netcdf in the tutorial. Here are the outputs of Library Compability Tests:@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?
export NETCDF_classic=1
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 logSorry for the delayed response, @Christa. I couldn't quite reproduce the issue but I think you can tryexport NETCDF_classic=1
This thread also seems to address the same issues.
![]()
nf_nc4.f90
Hi, I attempted to compile WRF on an AlmaLinux Version 9.4 server, however, none of the exe files (ndown.exe, real.exe, tc.exe, and wrf.exe) were produced. As detailed in the tutorial (Compiling WRF), all necessary libraries were pre-installed, but by someone else. I don't have superuser access...forum.mmm.ucar.edu
I think it comes from the fact that the netCDF install was done without shared libraries but does not link in HDF5.
Did you remember to change the file path names to your location? The ones I provided where for my specific machine.I have tried this but still having errors. There's still no executables. What could I do next?
Hi @William.Hatheway I have changed the file path names to my location,Did you remember to change the file path names to your location? The ones I provided where for my specific machine.
Hi @Dipson11 I tried to change to GCC 10.3.1 but still the same issue.I had the similar issue with netcdf while using gcc 9.2.1, I changed into gcc 9.5.0.
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 fileHi, 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,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 filefrom 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.![]()