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

Re: FFLAGS vs. FCFLAGS



>To: address@hidden
>From: Guy Williams <address@hidden>
>Subject: installing NetCDF for Absoft ProFortran 9.0 on Mac OS X
>Organization: UCAR/Unidata
>Keywords: 200501050128.j051SJv2004103

Hi Guy,

Here's a combination that now works with Absoft Fortran on Mac OS X.

 1. Get netcdf version 3.6.1-beta2 from

      ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.1-beta2.tar.gz

 2. Replace the src/fortran/cfortran.h that's there with the one from

      http://my.unidata.ucar.edu/content/staff/russ/public/cfortran.h

 3. Use the following environment variable settings:

    CPPFLAGS=-DAbsoftProFortran
    FCFLAGS='-w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1'
    F90FLAGS='-w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1'
    FLIBS=-lU77

    Note that with this beta release, you have to use "FCFLAGS" rather
    than "FFLAGS".

 4. Run configure; make test; make install.

It requires a patched version of cfortran.h, applying Dierk Polzin's
3.5.0 cfortran 4.1 patch to cfortran 4.3, which I've made available as
the file referenced above in step 2.

I think we should check this new cfortran.h in for 3.6.1-beta3 if it
doesn't mess up any other Fortran platforms (it's possible it might
affect using an Absoft Fortran compiler on a different platform than
Mac OS X, in which case someone else will have to tweak it ...).

I explicitly tested the above with the version of cfortran.h that's in
the release instead, and it fails with make test in nf_test, looking
for the symbol "_nf_close_" but libnetcdf.a has  _NF_CLOSE.  With the
patched version of cfortran.h, libnetcdf.a has _nf_close_, and
everything works OK.

--Russ