[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #XZT-324632]: installing threadsafe NetCDF 4.2 on IBM/AIX



Hi Andrea,

> I am trying to install a static version of NetCDF 4.2
> (I am interested in the Fortran APIs) to be threadsafe and in 64b
> on a IBM Power6 machine.
> 
> To do that, I first install the C library (v4.2.1.1) with the commands
> 
> + export OBJECT_MODE=64
> + export CC=xlc_r
> + export FC=xlf90_r
> + export F77=xlf_r
> + export FCFLAGS=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource -qcache=auto
> -qarch=pwr6 -qtune=pwr6
> + export FFLAGS=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource -qcache=auto
> -qarch=pwr6 -qtune=pwr6
> + export CFLAGS=-q64 -qmaxmem=-1 -qarch=pwr6 -qtune=pwr6
> + export LDFLAGS=-q64 -b64
> + export ARFLAGS=-X 64 -cru
> + export AR_FLAGS=-X 64 -cru
> + ./configure --prefix=/users/home/ans012/local/netcdf-4.2-c
> --disable-netcdf-4 --disable-doxygen --disable-shared
> 
> The installation goes well,
> then I move to the Fortran API package (netcdf-fortran-4.2)
> that I install accordingly:
> 
> + NC=/users/home/ans012/local/netcdf-4.2-c
> + export OBJECT_MODE=64
> + export CC=xlc_r
> + export FC=xlf90_r
> + export F77=xlf_r
> + export FCFLAGS=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource -qcache=auto
> -qarch=pwr6 -qtune=pwr6
> + export FFLAGS=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource -qcache=auto
> -qarch=pwr6 -qtune=pwr6
> + export F90FLAGS_f90=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource
> -qcache=auto -qarch=pwr6 -qtune=pwr6
> + export FFLAGS_f90=-q64 -qmaxmem=-1 -NS32648 -qextname -qsource
> -qcache=auto -qarch=pwr6 -qtune=pwr6
> + export CFLAGS=-q64 -qmaxmem=-1 -qarch=pwr6 -qtune=pwr6
> + export LDFLAGS=-q64 -b64 -L/users/home/ans012/local/netcdf-4.2-c/lib
> + export CPPFLAGS=-I/users/home/ans012/local/netcdf-4.2-c/include
> + export ARFLAGS=-X 64 -cru
> + export AR_FLAGS=-X 64 -cru
> + ./configure --prefix=/users/home/ans012/local/netcdf-4.2-fortran
> --disable-sharedhttp://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html

Since you disabled shared libraries for the C APIs, building Fortran libraries
is somewhat more complicated, as descirbed in the second part of these 
instructions:

  http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html

In particular, I think you need to set LD_LIBRARY_PATH before invoking the
configure script, and LDFLAGS will have to contain "-lnetcdf" and possibly
other libraries, as shown in the example.

Please let us know if this doesn't work.

--Russ

> Now the compilation goes well but the make check
> fails:
> 
> [...]
> ld: 0711-317 ERROR: Undefined symbol: .nf_get_var1_int1_
> ld: 0711-317 ERROR: Undefined symbol: .nf_get_var1_int2_
> ld: 0711-317 ERROR: Undefined symbol: .nf_get_var1_int_
> ld: 0711-317 ERROR: Undefined symbol: .nf_get_var1_real_
> [...]
> 
> Namely all the Fortran 77 API are "undefined symbol".
> If I reinstall both C and Fortran libraries
> without "-qextname" option for xlf/xlf90
> (no trailing underscore for Fortran routines)
> then all the C APIs (nc_get_var... etc.)
> become "undefined symbol"
> 
> In any case I can't succeed in linking
> a Fortran program with the new libraries,
> 
> do you have any suggestion/recommendation?
> 
> Thanks in advance,
> Regards
> 
> Andrea Storto
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: XZT-324632
Department: Support netCDF
Priority: Normal
Status: Closed