[Wrf-users] nf_ linking errors

Davide Cittaro daweonline at gmail.com
Tue Mar 18 06:23:50 MDT 2008


Dear all,
I'm still trying to build WRF with gcc+gfortran (+openmpi). I've  
applied the proposed patch to include gfortran and gcc in configure  
script. As I run compile em_real the only errors I get are undefined  
references to nf_* functions. This happens in external/io_netcdf stuff  
and, later, in exe builds...
As far as I understand, I need to have netcdf built with the same  
compiler I'm using, to be sure I've tried to compile netcdf-3.6.2 with  
gcc+gfortran (I've also tried with mpicc+mpif90) and I've placed them  
in my home. I've set NETCDF envvar, I've corrected symlinks in WRF  
directory, I've corrected configure.wrf and set LD_LIBRARY_PATH in a  
coherent way. Still I get:

gfortran -w  -ffree-form -ffree-line-length-none -fconvert=big-endian - 
frecord-marker=4 -c  -I/home/dcittaro/usr/netcdf-3.6.2-gnu/include - 
I../ioapi_share diffwrf.f
diffwrf io_netcdf is being built now.
gfortran -w -ffree-form -ffree-line-length-none -fconvert=big-endian - 
frecord-marker=4 -I/home/dcittaro/usr/netcdf-3.6.2-gnu/include -I../ 
ioapi_share -fconvert=big-endian -o diffwrf diffwrf.o wrf_io.o  
field_routines.o module_wrfsi_static.o -L/home/dcittaro/usr/ 
netcdf-3.6.2-gnu/lib -lnetcdf ../../frame/wrf_debug.o ../../frame/ 
module_wrf_error.o -L../../external/esmf_time_f90 -lesmf_time
wrf_io.o: In function `ext_ncd_get_var_info_':
wrf_io.f:(.text+0x2857): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x2895): undefined reference to `nf_inq_vartype_'
wrf_io.f:(.text+0x2bb4): undefined reference to `nf_get_att_int_'

[cut]

I have no more ideas on how to solve this.
On the other side, I've noticed this:

dcittaro at node8 ~/usr/netcdf-3.6.2-gnu/lib $ nm libnetcdf.so | grep  
nf_inq_varid

The symbol nf_inq_varid (the first referenced in my error list...)  
doesn't exist, but

dcittaro at node8 ~/usr/netcdf-3.6.2-gnu/lib $ nm libnetcdf.so | grep  
nc_inq_varid
0000000000026c70 T nc_inq_varid

Any hint/help is very appreciated!
Thanks
d
---
Davide Cittaro
daweonline at gmail.com
http://www.daweonline.net




More information about the Wrf-users mailing list