[netCDF #OQJ-741904]: NAG Fortran shared library?
- To: address@hidden
- Subject: [netCDF #OQJ-741904]: NAG Fortran shared library?
- From: "Unidata netCDF Support" <address@hidden>
- Date: Mon, 12 Nov 2012 09:21:20 -0700
> Thanks for your response, Russ.
You're welcome. I added the information you provided into our "Other Builds"
web page, so Google and other users can find it:
Please let me know if you need to make any changes or additions to that entry.
> The modifications I had to make were fairly mild, so I'm not personally
> too concerned about the lack of support. I just thought it might be
> helpful to someone else, so I will give you the details regarding this
> build for your site. However, if it just so happens that any of your
> testers can access CGD's Frankfurt, you should know that it does have NAG.
> Anyway, here's the info for my build:
> > uname -a
> Linux frankfurt.cgd.ucar.edu 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr
> 17 15:16:22 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux
> netCDF version was 4.2
> To get the C interface to netCDF, I just used gcc:
> > gcc --version
> gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
> The Fortran interface was built with nagfor 5.3.1:
> > nagfor -V
> NAG Fortran Compiler Release 5.3.1(910)
> Product NPL6A53NA for x86-64 Linux
> Copyright 1990-2012 The Numerical Algorithms Group Ltd., Oxford, U.K.
> To build a shared library, I had to change libtool.m4 (configure.ac
> changes were not necessary). The attached diff has those changes.
> With those changes, I followed the instructions on the website to the
> letter, except that I also set these flags in my environment:
> export FCFLAGS="-mismatch_all -kind=byte"
> export FFLAGS="$FCFLAGS"
> Other options such as "-dusty" and "-compat" were not necessary.
> "-mismatch_all" was necessary to turn off NAG's strict procedure
> interface checks, which disallow use of generic/overloaded procedures
> unless an explicit interface is present. NAG generates a prodigious
> number of warnings, so you may want to use some "-w" options for a more
> readable log.
> "-kind" must be specified, and all code compiled against the netCDF
> build must use the same option. I did not try "-kind=sequential".
> An explicit "-r8" was not necessary, and in fact was harmful, because it
> interfered with reading single-precision variables.
> On 11/09/2012 03:04 PM, Unidata netCDF Support wrote:
> > Hi Sean,
> >> I was trying to compile the Fortran interface with NAG 5.3.1 (on top
> >> of GCC 4.4), and there were a few bumps along the way. In particular,
> >> netCDF's build system doesn't know the flags necessary to build a shared
> >> library with NAG (mostly they are the same as for gcc, with an extra
> >> "-Wl," prepended).
> >> I was wondering if a) there was any chance this could be added, and b) you
> >> would be interested in seeing the modifications I made to fix this on my
> >> own. I did manage to get a .so built that tests (and seems to run) fine,
> >> by adding a few lines to m4/libtool.m4 and adding a few FFLAGS/FCFLAGS.
> > We don't have the NAG Fortran compiler installed here, and we're considering
> > moving the Fortran distribution to CMake rather than the autotools build
> > system, but haven't tackled that yet. If you have modifications to the
> > configure.ac file that we use with "autoreconf -i" to generate the configure
> > script, we might insert them for now, but it's unlikely we would have the
> > resources to install and maintain a NAG compiler to test that before each
> > release.
> > However, if you sent us the details, I could make that available on
> > our Web site in the "Other Builds" page:
> > http://www.unidata.ucar.edu/netcdf/docs/other-builds.html
> > so other NAG compiler users could find it.
> > Thanks for your work and offering your changes to the community.
> > --Russ
> > Russ Rew UCAR Unidata Program
> > address@hidden http://www.unidata.ucar.edu
> > Ticket Details
> > ===================
> > Ticket ID: OQJ-741904
> > Department: Support netCDF
> > Priority: High
> > Status: Closed
Russ Rew UCAR Unidata Program
Ticket ID: OQJ-741904
Department: Support netCDF
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.