[ncl-install] Prolblem installing NCL with ifort+icc

Mary Haley haley at ucar.edu
Wed Apr 30 09:31:17 MDT 2008


Good point Ted. This include file business can be confusing.

For building NCL, however, the -I/path/hdf should not be used or
needed.

Any NCL source code that needs to reference an HDF include file does
so with a "hdf/" prepended. Hence, using -I/path/hdf doesn't really
affect anything, except that it now makes all those include files
visible to the compiler as if they resided in the "include" directory
itself.  They can now inadvertently get used when you don't want them
to.

Furthermore, if you have similarly-named include files (as you do with
HDF and NetCDF), the compiler will use the first include file it
finds, based on your -I paths.

I strongly recommend *not* using -I/path/hdf, where "path" is
something like "/usr/local/include".

So, for example, if you installed the HDF software to:

    /usr/local/HDF4.2r2/{include,lib,bin}

[and hence the HDF include files should be in
"/usr/local/HDF4.2r2/include/hdf" if you followed the NCL build
instructions], and you installed the NetCDF software to:

    /usr/local/netcdf-3.6.2/{include,lib,bin}

then the only "-I" paths you should have are:

    -I/usr/local/HDF4.2r2/include -I/usr/local/netcdf-3.6.2/include

This way, in the NCL source code, if there's a "include <netcdf.h>",
the compiler will only see the one in "/usr/local/netcdf-3.6.2/include"

Do not include "-I/usr/local/HDF4.2r2/include/hdf".

Cheers,

--Mary



On Wed, 30 Apr 2008, Edward (Ted) Mansell wrote:

> It could also be a path issue if the -I/path/hdf directory is listed before netcdf so that the netcdf.h is found first in the hdf directory.  I had that problem.
>
> -- Ted
>
> At 9:38 AM -0500 4/30/08, Mary Haley wrote:
>> Hi Cucco,
>>
>> I'm taking a wild guess here, but the error about "NC_64BIT_OFFSET"
>> being undefined leads me to believe that maybe your HDF include files
>> were not installed to an "hdf" subdirectory, and hence they might have
>> clobbered the NetCDF version of the "netcdf.h" include file.
>


More information about the ncl-install mailing list