Re: [netcdfgroup] which netCDF for MacOS?

If I understand the message correctly, Netcdf creates it's Fortran bindings to C using cfortran.h to define how things are passed, see http://www-zeus.desy.de/~burow/cfortran/cfortran.html. The error suggests that the intel compiler isn't included.

To be certain, find the cfortran.h file in he Fortran folder and see if it defines the intel compiler. If it does, include in the Fortran flags -Dwhateverthenames

If you can't find the Intel compiler, I believe there is one for AbsoftProUnix so adding -DAbsoftProUnix or whatever the name is might work.

Also, I believe cfortran.h is only used for f77, not for F90. So if you only need F90. exclude in the configure. I forget the exact option for this, but do ./configure --help and it should tell you how to do that.

HTH,

-Roy M.

On Dec 19, 2007, at 3:54 PM, Michael Bane wrote:

I originally sent the below in Nov but didn't get any replies so I'll
ask in a different way: is there a netCDF for the Apple Intel MacBook
(pref for using with codes compiled using Intel compilers)? Thanks,
Michaek
----
I've just bitten the bullet and decided to build netCDF on my new
MacBook... but unfortunately have hit a problem so advice is welcome.

Hardware: MacBook with Intel Core2 Duo

Compilers: have installed the Intel Fortran compiler for MacOs off
the Intel web site:

quanti:~/src/netcdf-3.6.2 mkbane$ uname -a;ifort -V
Darwin quanti.lan 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23
16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
Intel(R) Fortran Compiler for applications running on IA-32, Version
10.0    Build 20070426 Package ID: m_fc_p_10.0.016
Copyright (C) 1985-2007 Intel Corporation.  All rights reserved.
30 DAY EVALUATION LICENSE

ifort: NOTE: The evaluation period for this product ends on 28-
nov-2007 UTC.


And I set f77 and f90 env vars to point to ifort, run `configure` but
hit a problem with `make clean` (see below). I can send my configure
log output if required. Many thanks for any useful suggestions. Michael
---

quanti:~/src/netcdf-3.6.2 mkbane$ echo $F77 $F90;which ifort
/opt/intel/fc/10.0.016/bin/ifort /opt/intel/fc/10.0.016/bin/ifort
/opt/intel/fc/10.0.016/bin/ifort

quanti:~/src/netcdf-3.6.2 mkbane$ make check 2>&1 | tee
mkb_make_check.log
Making check in f90
/bin/sh ../libtool --mode=compile /opt/intel/fc/10.0.016/bin/ifort -
I../libsrc -I.  -g -c -o typeSizes.lo typeSizes.f90
libtool: compile:  /opt/intel/fc/10.0.016/bin/ifort -I../libsrc -I. -
g -c typeSizes.f90 -o typeSizes.o
/bin/sh ../libtool --mode=compile /opt/intel/fc/10.0.016/bin/ifort -
I../libsrc -I.  -g -c -o netcdf.lo netcdf.f90
libtool: compile:  /opt/intel/fc/10.0.016/bin/ifort -I../libsrc -I. -
g -c netcdf.f90 -o netcdf.o
/bin/sh ../libtool --mode=link /opt/intel/fc/10.0.016/bin/ifort -I../
libsrc -I.  -g   -o libnetcdff90.la   typeSizes.lo  netcdf.lo
libtool: link: ar cru .libs/libnetcdff90.a  typeSizes.o netcdf.o
libtool: link: ranlib .libs/libnetcdff90.a
libtool: link: creating libnetcdff90.la
libtool: link: ( cd ".libs" && rm -f "libnetcdff90.la" && ln -s "../
libnetcdff90.la" "libnetcdff90.la" )
Making check in fortran
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -
I. -I.. -I.    -I../libsrc    -g -O2 -MT fort-attio.lo -MD -MP -MF
"$depbase.Tpo" -c -o fort-attio.lo fort-attio.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo";
exit 1; fi
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -g
-O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-
attio.c -o fort-attio.o
In file included from ncfortran.h:12,
                   from fort-attio.c:7:
cfortran.h:138:3: error: #error "cfortran.h:  Can't find your
environment among:    - MIPS cc and f77 2.0. (e.g. Silicon Graphics,
DECstations, ...)         - IBM AIX XL C and FORTRAN Compiler/6000
Version 01.01.0000.0000         - VAX   VMS CC 3.1 and FORTRAN
5.4.                                      - Alpha VMS DEC C 1.3 and
DEC FORTRAN 6.0.                               - Alpha OSF DEC C and
DEC Fortran for OSF/1 AXP Version 1.2              - Apollo DomainOS
10.2 (sys5.3) with f77 10.7 and cc 6.7.                -
CRAY -
   NEC SX-4 SUPER-
UX                                                      -
CONVEX -

Sun -
   PowerStation Fortran with Visual C+
+                                   - HP9000s300/s700/s800 Latest
test with: HP-UX A.08.07 A 9000/730        - LynxOS: cc or gcc with
f2c.                                            - VAXUltrix: vcc,cc
or gcc with f2c. gcc or cc with f77.                 -            f77
with vcc works; but missing link magic for f77 I/O.     -
NO fort. None of gcc, cc or vcc generate required names.    -
f2c    : Use #define    f2cFortran, or cc -
Df2cFortran                 - NAG f90: Use #define NAGf90Fortran, or
cc -DNAGf90Fortran              - Absoft UNIX F77: Use #define
AbsoftUNIXFortran or cc -DAbsoftUNIXFortran     - Absoft Pro Fortran:
Use #define AbsoftProFortran     - Portland Group Fortran: Use
#define pgiFortran     - PathScale Fortran: Use #define
PATHSCALE_COMPILER"
make[1]: *** [fort-attio.lo] Error 1
make: *** [check-recursive] Error 1
quanti:~/src/netcdf-3.6.2 mkbane$
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
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@xxxxxxxx (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."





  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: