Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error building netcdf with intel parallel studio xe

Fernando_M_3
Beginner
505 Views

Hi all, i'm trying to build netcdf-4.4.1. with intel parallel studio xe 2016 update 3 in Red Hat Enterprise Linux Server 7.2, following this url:

https://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-netcdf-with-the-intel-compilers

It presents the following error when running make:

libtool: compile:  icc -DHAVE_CONFIG_H -I. -I.. -I../include -I/opt/hdf5/include -I/opt/curl/include -O3 -xHost -ip -no-prec-div -static-intel -MT libnetcdf4_la-nc4file.lo -MD -MP -MF .deps/libnetcdf4_la-nc4file.Tpo -c nc4file.c  -fPIC -DPIC -o .libs/libnetcdf4_la-nc4file.o
nc4file.c(2322): error: identifier "H5LT_FILE_IMAGE_DONT_COPY" is undefined
                        H5LT_FILE_IMAGE_DONT_COPY|H5LT_FILE_IMAGE_DONT_RELEASE
                        ^

nc4file.c(2322): error: identifier "H5LT_FILE_IMAGE_DONT_RELEASE" is undefined
                        H5LT_FILE_IMAGE_DONT_COPY|H5LT_FILE_IMAGE_DONT_RELEASE
                                                  ^

compilation aborted for nc4file.c (code 2)
make[2]: *** [libnetcdf4_la-nc4file.lo] Error 1
make[2]: Leaving directory `/root/libs/netcdf-4.4.1/libsrc4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/libs/netcdf-4.4.1'
make: *** [all] Error 2
^C[1]+  Exit 2                  make &>make.log

Any ideas to fix this?

Thanks in advance

 

0 Kudos
1 Reply
mecej4
Honored Contributor III
505 Views

I do not see any relevance to Intel Fortran here. Nor do I see the problem as an Intel C compiler issue.

The Netcdf C source files make heavy use of preprocessor symbols and compilations fail if the necessary include files in which symbols (such as H5LT_FILE_IMAGE_DONT_COPY) are defined are not pulled in in the configure and build processes. This particular symbol is defined in hdf5_hl.h, and you need to investigate why that file was not included in the compilation of nc4file.c.

You may be able to use a pre-built Netcdf and HDF distribution package from your Linux packager. If you must build the library yourself, sometimes it is helpful to get the build process to work with the system C compiler, and after that succeeds you can try to rebuild with the Intel C compiler.

0 Kudos
Reply