[netcdfgroup] g77, g95, netcdf-g95 on mac
Felipe Pimenta
felipepimenta at gmail.com
Mon Jan 28 11:38:03 MST 2008
Hi Steve,
The command: nm /sw/lib/libnetcdf.a | grep nf_def_var resulted in
nothing (no expressions such as nf_def_var) .
The result of "nm /sw/lib/libnetcdf.a > ~/Desktop/output.txt" it's
included as attachment to this message. Here goes a sample. There is a
_nc_def_var:
U _nc_cktype
00000b00 T _nc_def_var
U _nc_inq_natts
00000db0 T _nc_inq_var
00001060 T _nc_inq_vardimid
00000d40 T _nc_inq_varid
Thanks,
Felipe
On Jan 28, 2008 1:00 PM, Steve Cousins <cousins at umit.maine.edu> wrote:
>
> On Mon, 28 Jan 2008, felipe at udel.edu wrote:
>
> > Hi Steve,
> >
> > No, I don't have a /sw/lib/libnetcdff.a. This is what I have at /sw/lib :
> >
> > ls /sw/lib/libnet*
> > /sw/lib/libnetcdf.3.dylib /sw/lib/libnetcdf.dylib
> > /sw/lib/libnetcdf_c++.4.dylib /sw/lib/libnetcdf_c++.la
> > /sw/lib/libnetcdf.4.dylib /sw/lib/libnetcdf.la
> > /sw/lib/libnetcdf_c++.a
> > /sw/lib/libnetcdf.a /sw/lib/libnetcdf_c++.3.dylib
> > /sw/lib/libnetcdf_c++.dylib
>
> Hi Felipe,
>
> Ok. How about running:
>
> nm /sw/lib/libnetcdf.a | grep nf_def_var
>
> to see if the symbol is in there at all. Perhaps it wasn't compiled with
> the Fortran code? Or just do:
>
> nm /sw/lib/libnetcdf.a
>
> to see what _is_ in there and what the underscoring is like.
>
> Good luck,
>
> Steve
>
>
>
> > Thanks for your suggestion,
> >
> > Felipe
> >
> >
> >
> > On Jan 28, 2008 12:39 PM, Steve Cousins <cousins at umit.maine.edu> wrote:
> >>>
>
> >>> Is there a /sw/lib/libnetcdff.a file (two f's at the end)? I've run into
> >>> this where code that used to work now needs to add this library in to get
> >>> the Fortran symbols. FWIW, I vote that this "feature" gets removed. It is
> >>> a real pain.
> >>>
> >>> I hope this helps.
> >>>
> >>> Steve
> >>> ______________________________________________________________________
> >>> Steve Cousins, Ocean Modeling Group Email: cousins at umit.maine.edu
> >>> Marine Sciences, 452 Aubert Hall http://rocky.umeoce.maine.edu
> >>> Univ. of Maine, Orono, ME 04469 Phone: (207) 581-4302
> >>>
> >>>
> >>> On Mon, 28 Jan 2008, Felipe Pimenta wrote:
> >>>
> >>>> Hi Roy,
> >>>>
> >>>> I did it with "-L/sw/lib/ -lnetcdf" and also trying with and without
> >>>> the -fno-second-underscore and -fno-underscoring flags. The result is
> >>>> still an error:
> >>>>
> >>>> g95 -O5 -o pom.exe pom2k.f areas_masks.o advave.o advq.o advt1.o
> >>>> advt2.o advct.o advu.o advv.o baropg.o bcond.o bcondorl.o box.o dens.o
> >>>> depth.o file2ic.o findpsi.o printall.o profq.o proft.o profu.o profv.o
> >>>> prxy.o prxyz.o prxz.o pryz.o seamount.o slpmax.o smol_adif.o vertvl.o
> >>>> def_var_netcdf.o handle_netcdf_error.o write_netcdf.o -L/sw/lib/
> >>>> -lnetcdf
> >>>> ld: Undefined symbols:
> >>>> _nf_def_var__
> >>>> _nf_put_att_text__
> >>>> _nf_strerror__
> >>>> _nccre_
> >>>> ...
> >>>> ... (long list...)
> >>>> ...
> >>>> _nf_set_fill__
> >>>> _nf_sync__
> >>>> make: *** [pom.exe] Error 1
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Felipe
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Jan 28, 2008 12:38 PM, Roy Mendelssohn <Roy.Mendelssohn at noaa.gov> wrote:
> >>>>> Okay, I looked more closely at your command line. You have
> >>>>>
> >>>>> "-L/sw/lib/libnetcdf.a -lnetcdf"
> >>>>>
> >>>>> it should be
> >>>>>
> >>>>> "-L/sw/lib/ -lnetcdf"
> >>>>>
> >>>>> Give that a try.
> >>>>>
> >>>>> -Roy M.
> >>>>>
> >>>>>
> >>>>> On Jan 28, 2008, at 8:51 AM, Felipe Pimenta wrote:
> >>>>>
> >>>>>> Dear Ed Hartnett and Roy Mendelssohn,
> >>>>>>
> >>>>>> Thanks for your email. I tried to compile the code with the
> >>>>>> following flags:
> >>>>>>
> >>>>>> -fno-second-underscore and
> >>>>>> -fno-underscoring
> >>>>>>
> >>>>>> Together, separated and with g95 and g77. The problem still occurs. I
> >>>>>> also checked the packages I have from Fink:
> >>>>>>
> >>>>>> g95 0.90-3 Another GNU Fortran 95 compiler
> >>>>>> netcdf-g95 3.6.2-6 Interface & lib for array-based data access
> >>>>>>
> >>>>>> I've rebuild them from source with Fink, but I could not solve the
> >>>>>> problem.
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> Felipe
> >>>>>>
> >>>>>>
> >>>>>> On 1/26/08, Roy Mendelssohn <Roy.Mendelssohn at noaa.gov> wrote:
> >>>>>>> Use whatever is he option that suppresses adding an underscore to
> >>>>>>> subroutine names.
> >>>>>>>
> >>>>>>> -Roy M.
> >>>>>>>
> >>>>>>> On Jan 26, 2008, at 6:16 AM, Felipe Pimenta wrote:
> >>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> I currently upgraded the netcdf of my mac power pc OS X 10.4.11 to
> >>>>>>>> netcdf-g95 using fink (I will have to work with g95 in a near
> >>>>>>>> future).
> >> >>>>>
> >>>>>>>> However, a code that I used to run on g77 with netcdf not is not
> >>>>>>>> compiling anymore. I've changed the library file path inside the
> >>>>>>>> fortran subroutine to:
> >>>>>>>>
> >>>>>>>> include '/sw/lib/netcdf-g95/include/netcdf.inc'
> >>>>>>>>
> >>>>>>>> but the following problem occurs:
> >>>>>>>>
> >>>>>>>> g77 -O5 -o pom.exe pom2k.f areas_masks.o advave.o advq.o advt1.o
> >>>>>>>> advt2.o advct.o advu.o advv.o baropg.o bcond.o bcondorl.o box.o
> >>>>>>>> dens.o
> >>>>>>>> depth.o file2ic.o findpsi.o printall.o profq.o proft.o profu.o
> >>>>>>>> profv.o
> >>>>>>>> prxy.o prxyz.o prxz.o pryz.o seamount.o slpmax.o smol_adif.o
> >>>>>>>> vertvl.o
> >>>>>>>> def_var_netcdf.o handle_netcdf_error.o write_netcdf.o
> >>>>>>>> -L/sw/lib/libnetcdf.a -lnetcdf
> >>>>>>>> /usr/bin/ld: Undefined symbols:
> >>>>>>>> _nf_def_var__
> >>>>>>>> _nf_put_att_text__
> >>>>>>>> _nf_strerror__
> >>>>>>>> _nf_close__
> >>>>>>>> _nf_create__
> >>>>>>>> _nf_def_dim__
> >>>>>>>> _nf_enddef__
> >>>>>>>> _nf_put_var_real__
> >>>>>>>> _nf_put_vara_real__
> >>>>>>>> collect2: ld returned 1 exit status
> >>>>>>>> make: *** [pom.exe] Error 1
> >>>>>>>>
> >>>>>>>> I also tried to compile the code with g95, without success. Does
> >>>>>>>> anybody have any suggestions?
> >>>>>>>>
> >>>>>>>> Thanks a lot,
> >>>>>>>>
> >>>>>>>> Felipe
> >>>>>>>> _______________________________________________
> >>>>>>>> netcdfgroup mailing list
> >>>>>>>> netcdfgroup at unidata.ucar.edu
> >>>>>>>> For list information or to unsubscribe, visit: http://
> >>>>>>>> www.unidata.ucar.edu/mailing_lists/
> >>>>>>>
> >>>>>>> **********************
> >>>>>>> "The contents of this message do not reflect any position of the U.S.
> >>>>>>> Government or NOAA."
> >>>>>>> **********************
> >>>>>>> Roy Mendelssohn
> >>>>>>> Supervisory Operations Research Analyst
> >>>>>>> NOAA/NMFS
> >>>>>>> Environmental Research Division
> >>>>>>> Southwest Fisheries Science Center
> >>>>>>> 1352 Lighthouse Avenue
> >>>>>>> Pacific Grove, CA 93950-2097
> >>>>>>>
> >>>>>>> e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
> >>>>>>> voice: (831)-648-9029
> >>>>>>> fax: (831)-648-8440
> >>>>>>> www: http://www.pfeg.noaa.gov/
> >>>>>>>
> >>>>>>> "Old age and treachery will overcome youth and skill."
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>>>>>> --
> >>>>>> =================================
> >>>>>> Felipe Mendonca Pimenta
> >>>>>> College of Marine and Earth Studies
> >>>>>> University of Delaware, 211 Robinson Hall
> >>>>>> Newark, DE, 19716-3501 USA
> >>>>>> Phone: (302) 831-2848, felipe at udel.edu
> >>>>>> =================================
> >>>>>
> >>>>> **********************
> >>>>> "The contents of this message do not reflect any position of the U.S.
> >>>>> Government or NOAA."
> >>>>> **********************
> >>>>> Roy Mendelssohn
> >>>>> Supervisory Operations Research Analyst
> >>>>> NOAA/NMFS
> >>>>> Environmental Research Division
> >>>>> Southwest Fisheries Science Center
> >>>>> 1352 Lighthouse Avenue
> >>>>> Pacific Grove, CA 93950-2097
> >>>>>
> >>>>> e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
> >>>>> voice: (831)-648-9029
> >>>>> fax: (831)-648-8440
> >>>>> www: http://www.pfeg.noaa.gov/
> >>>>>
> >>>>> "Old age and treachery will overcome youth and skill."
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> =================================
> >>>> Felipe Mendonca Pimenta
> >>>> College of Marine and Earth Studies
> >>>> University of Delaware, 211 Robinson Hall
> >>>> Newark, DE, 19716-3501 USA
> >>>> Phone: (302) 831-2848, felipe at udel.edu
> >>>> =================================
> >>>> _______________________________________________
> >>>> netcdfgroup mailing list
> >>>> netcdfgroup at unidata.ucar.edu
> >>>> For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
> >>>>
> >>>
> >>
> >>
> >>
> > --
> > =================================
> > Felipe Mendonca Pimenta
> > College of Marine and Earth Studies
> > University of Delaware, 211 Robinson Hall
> > Newark, DE, 19716-3501 USA
> > Phone: (302) 831-2848, felipe at udel.edu
> > =================================
> >
>
--
=================================
Felipe Mendonca Pimenta
College of Marine and Earth Studies
University of Delaware, 211 Robinson Hall
Newark, DE, 19716-3501 USA
Phone: (302) 831-2848, felipe at udel.edu
=================================
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output.txt
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/attachments/20080128/c1ae58d6/attachment-0001.txt
More information about the netcdfgroup
mailing list