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

20020305: netCDF on Linux using lf95 Lahey fortran



Tom,

> From: Tom Gross <address@hidden>
> Subject: Problems with netcdf and Lahey fortran
> Organization: NOAA/NOS/Coast Survey Development Laboratory
> Keywords: 200203050047.g250loK01022 netCDF Lahey Fortran

The above message contained the following:

> I am having bad problems getting Lahey fortran to work
> with the netcdf.  When I do the compile using lf95 
> it always complains about undefined references:
> ftest.o(.data+0x1e0): undefined reference to `nf_get_vars_real_'
> ftest.o(.data+0x1e4): undefined reference to `nf_put_vars_double_'
> ...
> When I use g77 everything works nicely. 

We don't have access to a Linux system with the Lahey lf95 compiler, so
our advice on this matter is, necessarily, limited.  I checked the
netCDF user-support database at

    http://www.unidata.ucar.edu/glimpsedocs/ghnetcdf.html

but didn't find a definitive success story.  The archive of the netCDF
mailing-list wasn't much better, although 

    http://www.unidata.ucar.edu/glimpse/netcdfgroup-list/1473

was useful.

My best guess at a solution would be to

    1.  Go to the top-level source directory.

    2.  Perform steps 3 and 4 mentioned near the end of the file
        INSTALL.html.

    3.  Try the following environment variable settings:

            CC=/usr/bin/cc
            CPPFLAGS='-DNDEBUG -DpgiFortran'
            FC=/usr/local/lf9560/bin/lf95
            F90=/usr/local/lf9560/bin/lf95
            FFLAGS='-O'
            CXX=/usr/bin/g++

        The CPPFLAGS values differs from the one you tried (-Df2cFortran)
        and the FFLAGS variable doesn't have the "--ml cdecl" option.
        These are things that the mailing-list posting recommended.

    4.  Perform steps 6 through 9 near the end of the file
        INSTALL.html.

Please let us know if the above helps.

> I would really appreciate some help with this.  The Lahey
> people have not been very helpful.  One more day and 
> I will drop Lahey altogether.  But the next step was to start
> using their multiprocessor options.
> Thanks,  Tom Gross

Because we don't have much advice to offer, if the above doesn't work,
then I suggest that you try posting to the netCDF mailing-list.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>