Cara-Lyn, >Date: Mon, 13 Sep 2004 20:24:58 -0600 >From: Cara-Lyn Lappen <address@hidden> >Organization: Colorado State University >To: Steve Emmerson <address@hidden> >Subject: Re: 20040910: Mac OS X 10.3.4, NetCDF 3.5.1 The above message contained the following: > Thanks for looking at this. Here is the summary of what I have done. ... > I then downloaded netcdf 3.5.1. And got it to build without problems. > I got the same errors as I did above . When I built 3.5.1, I used the > following environmental variables: > > Actually, first I obtained the patch from > > http://www.unidata.ucar.edu/content/software/netcdf/absoft90-macosx.patch > > and applied this patch to the file src/fortran/cfortran.h using the > command: > > patch -c cfortran.h absoft90-macosx.patch > > Next, I set the environment variables as follows before running the > configure script that came with the distribution: > > FC=/Applications/absoft/bin/f90 > FFLAGS="-w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1" > F90=/Applications/absoft/bin/f90 > F90FLAGS="-w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1" > FLIBS=-lU77 > CPPFLAGS="-DAbsoftProFortran" > CFLAGS= > > This produced library files (libnetcdf.a) with lower case symbol, i.e., > _nf_close_. > > I then changed the FFLAGS and F90FLAGS environmental variables to have > -TEXT_NAMES = UCS. This produced the following after I compiled the > netcdf libraries and did an "nm" on them for nf_close or NF_CLOSE: > > > nm libnetcdf.a | grep -i nf_clos > 00000dbc T _nf_close_ > U _NF_CLOSE_ > > So, in this case there is one that is lower case and one that is upper > case. I tried to compile CAM and got the same errors as I have all > along. I believe I see the problem. The patch-file that you applied to the "cfortran.h" file in order to build the netCDF package on a Mac OS X system using the Absoft Pro Fortran compiler assumed that all Fortran code would be compiled using the "-YEXT_NAMES=LCS" option. The CAM package, however, requires the (default) "-YEXT_NAMES=UCS" option. So, what we have is a mismatch between the patch-file assumptions and your situation. Please try the following: 1. Go to the fortran/ subdirectory. 2. Revert your "fortran/cfortran.h" file to what it was before you patched it (you should be able to retrieve the original from the download-file). 3. Apply the attached patch (which assumes that upper-case names will be used). 4. Go to the top-level source-directory. 5. Execute the command "make distclean". 6. Set the following environment variables to the indicated values: FC=/Applications/absoft/bin/f90 FFLAGS="-w -YEXT_NAMES=UCS -YEXT_SFX=_ -YCFRL=1" F90=/Applications/absoft/bin/f90 F90FLAGS="-w -YEXT_NAMES=UCS -YEXT_SFX=_ -YCFRL=1" FLIBS=-lU77 CPPFLAGS="-DNDEBUG -DAbsoftProFortran" CFLAGS=-O 7. Perform steps 6 through 9 described at http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html#ReportingProblems Please let me know if this helps. > Cara-Lyn > > *********************************************************** > Dr. Cara-Lyn Lappen > Dept. of Atmos. Sciences ,__o > Colorado State University _ -\ _<; > Fort Collins, CO. 80523-1371 (*) /' (*) > Home Phone: (970) 382-2290 > Work Phone: (970) 382-2290 > Cell Phone: (970) 946-6134 > Email: address@hidden > *********************************************************** Regards, Steve Emmerson
Attachment:
t.t
Description: t.t