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

Re: netCDF f90 configure error



>To: address@hidden
>From: Shirley Moore <address@hidden>
>Subject: Re: 20010918: netCDF f90 configure error
>Organization: .
>Keywords: xlf90 IBM Power3 SMP AIX

Shirley,

> Thanks, I got netcdf compiled.  Now however I am running into a problem
> with a library I need not being there:
>
> fcd.o dccm3.o drtm.o summary.o  prtm.o prtm_timers.o prtm_utils.o
> -L/gpfs/local/usp/PETtools/netcdf-3.5.0/lib -lnetcdf_real8 -lmass
> ld: 0706-006 Cannot find or open library file: -l netcdf_real8
>         ld:open(): A file or directory in the path name does not exist.
> make: *** [all] Error 255
>
> This is when I am trying to build the PCTM climate modeling code that
> uses netcdf.  Here is what I have in my netcdf lib directory:
>
> nh4n1e 22% pwd
> /gpfs/local/usp/PETtools/netcdf-3.5.0/lib
> nh4n1e 23% ls
> libnetcdf.a      libnetcdf_c++.a

That's all you should have in your netcdf lib/ directory after
installing netcdf.

> On the ORNL IBM where they have netcdf installed and I am able to get
> PCTM to build, they have the following in /usr/local/lib:
>
> libnetcdf_c++.a
> libnetcdf_c.a 
> libnetcdf_real4.a
> libnetcdf_real8.a
>
> and they don't have libnetcdf.a.  I can't figure out from the
> installation instructions how to build these additional libraries.

Those extra libraries must have been created to support two different
compilation environments, one for 4-byte reals and the other for
8-byte reals.  So maybe they first built libnetcdf.a with CFLAGS
indicating 4-byte reals, installed it, and renamed it with the
"_real4" suffix, then did the same for 8-byte reals.  Maybe these
libraries just have different versions of the Fortran interfaces but
have the same C-interface code.  It's hard to tell from just the
names.  Since this is some sort of local modification to our
installation, you'll have to find local sources for information about
it or consult the person who modified the installation.

> Also, when I run the tests on my installation of netcdf, the Fortran test
> fails. I have attached the
> test output.

This looks like the xlf90 compiler is assuming the source is in free
form, whereas it is actually in "fixed-column" form with the 6-th
character in each line indicating continuation of the previous line,
etc.  Just find what compiler flag is needed to specify fixed form and
include it with the "FFLAGS" environment variable before building the
Makefiles with the configure script, or alternatively just edit
fortran/Makefile to include the right flag.

--Russ