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

[netCDF #YVQ-214480]: Patch for Intel fortran on Mac OS



Hi Dave,

Sorry it's taken so long to respond to your email.
> Here is a patch to fix Netcdf support for Intel fortran on Mac OS.
> This should help with a variety of symptoms that I have seen
> recently, such as make check failures, fortran 90 problems, and
> broken shared library (libnetcdff.dylib).
> 
> This applies directly to Netcdf versions 4.1.2 and 4.1.3, which both
> use the same libtool version 2.4.  Equivalent fixes may also work
> with Netcdf versions as far back as 3.6.2.
> 
> ? diff -u netcdf-4.1.3/m4/libtool.m4 patch.libtool.2.4/libtool.m4
> --- netcdf-4.1.3/m4/libtool.m4   2011-06-30 17:22:42.000000000 -0600
> +++ patch.libtool.2.4/libtool.m4 2011-12-05 14:25:58.000000000 -0700
> @@ -4252,6 +4252,16 @@
> [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
> ;;
> 
> +    darwin* | rhapsody*)
> +     case `$CC -V 2>&1 | sed 5q` in
> +        *Intel*\ [[CF]]*Compiler*)
> +       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
> +       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
> +       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
> +       ;;
> +     esac
> +     ;;
> +
> hpux9* | hpux10* | hpux11*)
> _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
> # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
> 
> I tested this with a few combinations of Mac OS versions 10.6 and
> 10.7, Intel fortran versions 11.1.089 and 12.1.1.246, and Netcdf
> 4.1.2 and 4.1.3; also with or without netcdf-4 and opendap.  Make
> check completed with zero failures.  Valid static and dynamic
> libraries resulted, with correct F77 and F90 support, as far as I
> could tell.  My testing with user programs is very limited, so far.
> 
> This is actually a patch against libtool 2.4.  The same patch with
> line number adjustments will also be needed with the current libtool
> release, version 2.4.2.
> 
> As you probably know, the Netcdf configure script must be rebuilt
> after this patch.  I found it worked best to first patch
> netcdf-4.1.3/m4/libtool.m4, then make a dummy run of configure (if
> there is no previous Makefile), then make distclean, then run
> configure a second time, then the normal make check.
> 
> Would you please test this on your own darwin/Mac platform, and let
> me know the results?  Also please consider announcing this to the
> user list if you can confirm that it is safe.  Thanks.

Thanks very much for providing this and testing it.  I've just updated
our Intel compiler on a Mac OS X platform, so will test this and let
you know.

Rather than updating earlier versions, I'd like to announce that this fix
is in the 4.2-beta release and also provide updated libtool.m4 and
configure files for the earlier releases, separately.

In the mean time, I've updated our "known problems" file with your patch
so I can point to it for people having immediate problems:

  
http://www.unidata.ucar.edu/netcdf/docs/known_problems.html#intel-fortran-macosx

Please let me know if there's a problem or correction to that "known problems" 
entry.

Thanks again for developing and providing this valuable fix!

--Russ



--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YVQ-214480
Department: Support netCDF
Priority: Normal
Status: Closed