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

[netCDF #EJA-190555]: netcdf42-fortran: netcdf.h for fortran not found by configure (= a script glitch?) (fwd)

Hi Peter,

Sorry to have taken so long to respond to your last set of comments and 
Since then, I've reactivated my yellowstone login at NCAR, so I now have access 
Intel C, Fortran, and C++ compilers for testing.  I also got the scripts that 
CISL uses
to build and install netCDF C and Fortran libraries using Intel, GNU, 
Pathscale, and
PGI compilers.  I've attached those two scripts, in case you're interested.  I 
adapted them to test building with Intel compilers, which worked in a 
way, with no modifications required to our netCDF configure scripts.

> To the Email from yesterday one short addendum, idea from this morning
> (to avoid gfortran to creep in, not yet tested):

I think all that's required to make sure you use only Intel compilers (if that 
is your 
preference) is to set the environment variables CC and FC to the desired 
names before running the configure script, and make sure your PATH is set so 
those compilers are found by the configure script, rather than gcc and gfortran.

For example, this worked fine for me on CISL's yellowstone platform for the C
and Fortran builds using icc and ifort (both versions 12.1.5):

  # First build and install the netCDF C library, version
  cd ~/netcdf-
  export CC=icc
  export FC=ifort
  export CPPFLAGS="-I${H5DIR}/include"
  export LDFLAGS="-L${H5DIR}/lib"
  ./configure --prefix=${NCDIR} --disable-dap-remote-tests
  make check
  make install

  # Next, build and install the netCDF Fortran library, version 4.2
  cd ~/netcdf-4.2
  export CPPFLAGS="-I${NCDIR}/include"
  export LDFLAGS="-L${NCDIR}/lib"
  NFDIR=/where/you/want/to/install/netcdf-Fortran  # could be the same as $NCDIR
  ./configure --prefix=${NFDIR}
  make check
  make install

I tested the above with both the current releases of netCDF C (version 
netCDF Fortran (version 4.2), as well as the development releases (netCDF-C 
4.3.2rc3 and netCDF-Fortran version 4.4.0-rc1, both available on GitHub).

So, our configure scripts seem to work with GNU, Intel, PGI, and Pathscale 
on Linux, OSX, Solaris, and other platforms that we've tested on.  If following 
above doesn't work for you, please send us the details.


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

Ticket Details
Ticket ID: EJA-190555
Department: Support netCDF
Priority: Urgent
Status: Open

Attachment: build.c
Description: Binary data

Attachment: build.fortran
Description: Binary data

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.