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

20040730: update: building netcdf 3.5.1 with NAG f95 v5.0 on OS X



Eric,

> To: address@hidden
> From: Eric Salathe <address@hidden>
> Subject: update: building netcdf 3.5.1 with NAG f95 v5.0 on OS X
> Organization: University of Washington
> Keywords: 200407302101.i6UL1haW016337 netCDF NAG F95

The above message contained the following:

> I previously sent instructions for building netcdf w/ NAG f95 on OS X. 
> There is a slight modification for the new f95 5.0 version -- I had to 
> add -DNDEBUG to the CPPFLAGS. Oddly, this flag is not needed w/ f95 
> v4.2, but it is w/ v5.0  Can you shed any light on why that might be? I 
> gave the guys at NAG a lot of greif until I figured that out. Thanks.

That is bizarre!  There's no way that C macro should affect the build of
the Fortran-90 interface.

I think the guys at NAG deserved the grief.  :-)

> -Eric
> 
> 
> The following works to build netcdf 3.5.1 with NAG f95 v5.0 on OS X 
> 10.3:
> 
> 1. Environment variables:
> 
> FC=/usr/local/bin/f95
> FFLAGS=-O -dusty -w
> F90=/usr/local/bin/f95
> FPP=/usr/local/bin/f95 -fpp
> F90FLAGS=-O -w=unused -mismatch_all
> CPPFLAGS=-DNDEBUG -DNAGf90Fortran
> 
> 2. Patch rules.make to account for case-insensitive filenames:
> 
> *** rules.make.orig     Fri Jul 30 13:50:04 2004
> --- rules.make  Wed Jul 28 15:11:02 2004
> ***************
> *** 25,34 ****
>          @case "$(COMPILE.F)" in \
>              '') \
>                  set -x; \
> !               $(FPP) $(FPPFLAGS) $*.F | grep -v '^#' >$*-tmp.f ||     
> \
> !                   (rm $*-tmp.f ; exit 1);     \
> !               $(COMPILE.f) -o $@ $*-tmp.f || (rm $*-tmp.f; exit 1);   
> \
> !               rm $*-tmp.f;    \
>                  ;;      \
>              *)  \
>                  set -x; \
> --- 25,32 ----
>          @case "$(COMPILE.F)" in \
>              '') \
>                  set -x; \
> !               cp $*.F $*.ff; \
> !               $(FPP) $(FPPFLAGS) -c -O -dusty -w $*.ff ;      \
>                  ;;      \
>              *)  \
>                  set -x; \
> 
> 3. Patch nf_test/nf_test.F to include NAG unix module:
> 
> *** nf_test_orig.F      Wed Jun 11 09:20:48 1997
> --- nf_test.F   Wed Jul 28 15:31:22 2004
> ***************
> *** 75,80 ****
> --- 75,81 ----
>    #endif
> 
>            program nf_test
> +         USE F90_UNIX_ENV, ONLY : IARGC,GETARG
>    #if defined(VISUAL_CPLUSPLUS)
>    !     DIGITAL Visual Fortran needs DFLIB for getarg
>          USE DFLIB
> ***************
> *** 83,89 ****
>            implicit        none
>    #else
>            implicit        none
> !         integer         iargc
>    #endif
>    #include "tests.inc"
> 
> --- 84,90 ----
>            implicit        none
>    #else
>            implicit        none
> ! c$$$        integer         iargc
>    #endif
>    #include "tests.inc"
> 
> 
> 
> --
> Eric Salathe
> Climate Impacts Group             <address@hidden>
> University of Washington          
> <http://www.atmos.washington.edu/~salathe>

Regards,
Steve Emmerson
> NOTE: All email exchanges with Unidata User Support are recorded in the
> Unidata inquiry tracking system and then made publically 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.