Re: [netcdf-hdf] HDF compile error

Thanks to Elena's help, the problem has been solved. I built my own HDF4
library with --disable-netcdf as she suggested.  I also had to build
my own HDF-EOS2 library using the HDF4 library I had just made.

The following libraries were used in this build:
HDF4.2r4
HDF-EOS2.13.v1
NetCDF362b6
ESMF 2.2.2rp3

Here is my final compile statement.

mpif90 -o real.exe -g -traceback -fpe1 -convert big_endian real_em.o ../dyn_em/module_initialize_real.o libwrflib.a -L../external/ io_netcdf -lwrfio_nf -L/usr/local/other/netcdf/3.6.2_intel-10.1.013/ lib -lnetcdf -L../external/RSL_LITE -lrsl_lite -L../external/io_int - lwrfio_int -L../external/io_grib1 -lio_grib1 -L../external/ io_grib_share -lio_grib_share ../frame/ module_internal_header_util.o ../frame/pack_utils.o -L../external/ esmf_time_f90 -lesmf_time ../lis/lib/read_grib/readgrib.a ../lis/lib/ grib/griblib.a ../lis/lib/w3lib/libw3.a -L/discover/nobackup/projects/ lis/esmf_2_2_2rp3_intel_10_1_017_impi_3_2_011/lib/libO/Linux.intel. 64.mpi.default -lesmf -lnetcdf_stubs -lstdc++ -lrt -L/home/cbblanke/ lib/HDF4.2r4/hdf4/lib -L/home/cbblanke/lib/hdfeos/lib/linux -L/usr/ local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/lib - lhdfeos -lGctp -lmfhdf -ldf -ljpeg -lz -lm -lsz mpif90 -o ndown.exe -g -traceback -fpe1 -convert big_endian ndown_em.o ../dyn_em/ module_initialize_real.o libwrflib.a -L../external/io_netcdf - lwrfio_nf -L/usr/local/other/netcdf/3.6.2_intel-10.1.013/lib -lnetcdf - L../external/RSL_LITE -lrsl_lite -L../external/io_int -lwrfio_int -L../ external/io_grib1 -lio_grib1 -L../external/io_grib_share - lio_grib_share ../frame/module_internal_header_util.o ../frame/ pack_utils.o -L../external/esmf_time_f90 -lesmf_time ../lis/lib/ read_grib/readgrib.a ../lis/lib/grib/griblib.a ../lis/lib/w3lib/ libw3.a -L/discover/nobackup/projects/lis/ esmf_2_2_2rp3_intel_10_1_017_impi_3_2_011/lib/libO/Linux.intel. 64.mpi.default -lesmf -lnetcdf_stubs -lstdc++ -lrt -L/home/cbblanke/ lib/HDF4.2r4/hdf4/lib -L/home/cbblanke/lib/hdfeos/lib/linux -L/usr/ local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/lib - lhdfeos -lGctp -lmfhdf -ldf -ljpeg -lz -lm -lsz mpif90 -o nup.exe -g - traceback -fpe1 -convert big_endian nup_em.o ../dyn_em/ module_initialize_real.o libwrflib.a -L../external/io_netcdf - lwrfio_nf -L/usr/local/other/netcdf/3.6.2_intel-10.1.013/lib -lnetcdf - L../external/RSL_LITE -lrsl_lite -L../external/io_int -lwrfio_int -L../ external/io_grib1 -lio_grib1 -L../external/io_grib_share - lio_grib_share ../frame/module_internal_header_util.o ../frame/ pack_utils.o -L../external/esmf_time_f90 -lesmf_time ../lis/lib/ read_grib/readgrib.a ../lis/lib/grib/griblib.a ../lis/lib/w3lib/ libw3.a -L/discover/nobackup/projects/lis/ esmf_2_2_2rp3_intel_10_1_017_impi_3_2_011/lib/libO/Linux.intel. 64.mpi.default -lesmf -lnetcdf_stubs -lstdc++ -lrt -L/home/cbblanke/ lib/HDF4.2r4/hdf4/lib -L/home/cbblanke/lib/hdfeos/lib/linux -L/usr/ local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/lib - lhdfeos -lGctp -lmfhdf -ldf -ljpeg -lz -lm -lsz

Clay

On Jun 19, 2009, at 10:48 AM, Elena Pourmal wrote:

Clay,

I think HDF4 library on your system has NetCDF APIs defined and this
creates the conflict.

Would it be possible for you to recompile HDF4 to disable NetCDF APIs?

Here is the configuration you will need to use

./configure --disable-netcdf --with-zlib=/path --with-jpeg=/path... (--
with-szip=/path....)

Please let me know if you have any questions.

Elena

On Jun 19, 2009, at 10:30 AM, Blankenship, Clay B. (MSFC-NCC8259)
[USRA] wrote:

I am trying to compile LIS-WRF (a coupled land-atmosphere model) on
a Linux cluster using Intel Fortran 90 and MPI with NetCDF and HDF
libraries.

This is the link command:

mpif90 -o wrf.exe -g -traceback -fpe1  -convert big_endian  wrf.o
libwrflib.a -L../external/io_netcdf -lwrfio_nf
 -L/usr/local/other/netcdf/3.6.2_intel-10.1.013/lib -lnetcdf -L../
external/RSL_LITE -lrsl_lite
 -L../external/io_int -lwrfio_int -L../external/io_grib1 -lio_grib1
-L../external/io_grib_share -lio_grib_share
 ../frame/module_internal_header_util.o ../frame/pack_utils.o
 -L../external/esmf_time_f90 -lesmf_time
 ../lis/lib/read_grib/readgrib.a ../lis/lib/grib/griblib.a ../lis/
lib/w3lib/libw3.a
 -L/discover/nobackup/projects/lis/
esmf_2_2_2rp3_intel_10_1_017_impi_3_2_011/lib/libO/Linux.intel.
64.mpi.default
 -lesmf -lnetcdf_stubs -lstdc++ -lrt
 -L/usr/local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/
lib -lhdfeos -lGctp -lmfhdf -ldf -ljpeg -lz -lm -lsz

I get the following warnings:

/usr/local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/lib/
libmfhdf.a(var.o): In function `NC_var_shape':
var.c:(.text+0x7cc): multiple definition of `NC_var_shape'
/usr/local/other/netcdf/3.6.2_intel-10.1.013/lib/libnetcdf.a(var.o):/
usr/local/other/netcdf-3.6.2/libsrc/var.c:361: first defined hereld:
Warning: size of symbol `NC_var_shape' changed from 548 in /usr/
local/other/netcdf/3.6.2_intel-10.1.013/lib/libnetcdf.a(var.o) to
602 in /usr/local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/
Linux/lib/libmfhdf.a(var.o)

What does this mean, exactly?  Is there a conflict between HDF and
NetCDF, or do I not have the right versions?

I can compile LIS only (without WRF) using the following command,
and everthing works fine.

mpif90 -o /home/cbblanke/nobackup//LIS   A_BUNCH_OF_FILES.o
 ../lib/w3lib/libw3.a ../lib/read_grib/readgrib.a ../lib/grib/
griblib.a  -lmpi
 -L/usr/local/other/netcdf/3.6.2_intel-10.1.013/lib -lnetcdf
 -L/discover/nobackup/projects/lis/
esmf_2_2_2rp3_intel_10_1_017_impi_3_2_011/lib/libO/Linux.intel.
64.mpi.default
 -lesmf -lnetcdf_stubs -lstdc++ -lrt
 -L/usr/local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/
lib/  -lhdfeos -lGctp
 -L/usr/local/other/baselibs/ESMF222rp3_NetCDF362b6_10.1.017/Linux/
lib  -lmfhdf -ldf -ljpeg -lz -lm -lsz

Any advice would be appreciated.

Clay


--
Clay Blankenship                 * USRA Research Scientist
clay.b.blankenship@xxxxxxxx      * 256-961-7638
320 Sparkman Drive               * Huntsville, AL 35805
National Space Science and Technology Center




_______________________________________________
netcdf-hdf mailing list
netcdf-hdf@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/


--
Clay Blankenship                 * USRA Research Scientist
clay.b.blankenship@xxxxxxxx      * 256-961-7638
320 Sparkman Drive               * Huntsville, AL 35805
National Space Science and Technology Center