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

Building HDF4 with Intel compilers

Rafael
Beginner
1,519 Views
Hi,

I am trying to build HDF4 library in order to run my code. I have successfully installed ZLIB, JPEG libraries needed for HDF4 (no compiling errors, all tests passed).

Although I was able to build the HDF4 libraries at the end, some of the tests have failed (e.g., hdiff tests). This is pretty much what I did to install HDF4 (step-by-step):

(1) set environment variables
setenv CC icc
setenv CXX icpc
setenv F77 ifort

(2) ./configure --with-zlib=/home/rosolem/lib/zlib-1.2.3+ifort-10.1 --with-jpeg=/hom
e/rosolem/lib/jpeg-6b+ifort-10.1 --disable-netcdf --prefix=/home/rosolem/lib/hdf
4-2r4+ifort-10.1

(3) gmake >& gmake.out

(4) gmake check >& check.out

(5) gmake install

As I mentioned, when running gmake and gmake check, I got several different compiling warnings, although not errors. In addition, all hdiff tests have failed. I decided to try to install it anyway, and I got no errors. Is there a way to fix these warnings? I wonder if that may compromise my model simulations.

Has anyone had experience trying to build HDF4 with Intel compilers? I would appreciate to get some assistance.

Here is some information regarding machine, and compiler version:

Kernel: Linux
Mahcine: Intel Xeon CPU E5472 @ 3.00GHz
Processor: x86_64
OS: GNU/Linux
Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080801 Package ID: l_fc_p_10.1.018

Find attached the relevant files during the installation process
0 Kudos
5 Replies
Ron_Green
Moderator
1,519 Views
Quoting - Rafael
Hi,

I am trying to build HDF4 library in order to run my code. I have successfully installed ZLIB, JPEG libraries needed for HDF4 (no compiling errors, all tests passed).

Although I was able to build the HDF4 libraries at the end, some of the tests have failed (e.g., hdiff tests). This is pretty much what I did to install HDF4 (step-by-step):

(1) set environment variables
setenv CC icc
setenv CXX icpc
setenv F77 ifort

(2) ./configure --with-zlib=/home/rosolem/lib/zlib-1.2.3+ifort-10.1 --with-jpeg=/hom
e/rosolem/lib/jpeg-6b+ifort-10.1 --disable-netcdf --prefix=/home/rosolem/lib/hdf
4-2r4+ifort-10.1

(3) gmake >& gmake.out

(4) gmake check >& check.out

(5) gmake install

As I mentioned, when running gmake and gmake check, I got several different compiling warnings, although not errors. In addition, all hdiff tests have failed. I decided to try to install it anyway, and I got no errors. Is there a way to fix these warnings? I wonder if that may compromise my model simulations.

Has anyone had experience trying to build HDF4 with Intel compilers? I would appreciate to get some assistance.

Here is some information regarding machine, and compiler version:

Kernel: Linux
Mahcine: Intel Xeon CPU E5472 @ 3.00GHz
Processor: x86_64
OS: GNU/Linux
Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080801 Package ID: l_fc_p_10.1.018

Find attached the relevant files during the installation process

There is a writeup on building HDF5, but not HDF4:

http://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers/

You didn't show it, but did you build zlib and jpegwith the Intel C/C++ compiler? HDF5 also requires an F90 compiler definition in var F9X: export F9X=ifort

not sure if that would matter.

ron
0 Kudos
Rafael
Beginner
1,519 Views

There is a writeup on building HDF5, but not HDF4:

http://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers/

You didn't show it, but did you build zlib and jpegwith the Intel C/C++ compiler? HDF5 also requires an F90 compiler definition in var F9X: export F9X=ifort

not sure if that would matter.

ron

Dear Ron,

Thank you for your reply. In fact I did follow the same instructions to build HDF5 as shown in the link. The code I am using requires HDF4, and I have been told that HDF5 and HDF4 have some compatibility issues. I noticed the files were not attached previously, so I added then now.

For ZLIB and JPEG libraires I used the following:
setenv CC icc
setenv CFLAGS '-O3 -xP -ip'

I don't recall setting F9X for HDF4, but the code I am trying to use specifies "HDF4 library with F77 support" only (doesn't mention F9X).




0 Kudos
Ron_Green
Moderator
1,519 Views
Quoting - Rafael

Dear Ron,

Thank you for your reply. In fact I did follow the same instructions to build HDF5 as shown in the link. The code I am using requires HDF4, and I have been told that HDF5 and HDF4 have some compatibility issues. I noticed the files were not attached previously, so I added then now.

For ZLIB and JPEG libraires I used the following:
setenv CC icc
setenv CFLAGS '-O3 -xP -ip'

I don't recall setting F9X for HDF4, but the code I am trying to use specifies "HDF4 library with F77 support" only (doesn't mention F9X).





well, another thing to try: the -xP option assumes an Intel processor with a certain level of SSE support. If you have an older processor OR and AMD processor you'll want to remove that option or use -xHOST instead.

ron
0 Kudos
elenapo
Beginner
1,519 Views
Quoting - Rafael
Hi,

HDF4 does run on Linux x86_64 systems with the Intel C and Fortran compilers. Something is going wrong on the system you use.

It looks like libimf.so is not found for some reason (see check.out, hdiff errors). Please make sure that your LD_LIBRARY_PATH includes path to the Intel compiler libraries.

Elena Pourmal

The HDF Group

Hi,

I am trying to build HDF4 library in order to run my code. I have successfully installed ZLIB, JPEG libraries needed for HDF4 (no compiling errors, all tests passed).

Although I was able to build the HDF4 libraries at the end, some of the tests have failed (e.g., hdiff tests). This is pretty much what I did to install HDF4 (step-by-step):

(1) set environment variables
setenv CC icc
setenv CXX icpc
setenv F77 ifort

(2) ./configure --with-zlib=/home/rosolem/lib/zlib-1.2.3+ifort-10.1 --with-jpeg=/hom
e/rosolem/lib/jpeg-6b+ifort-10.1 --disable-netcdf --prefix=/home/rosolem/lib/hdf
4-2r4+ifort-10.1

(3) gmake >& gmake.out

(4) gmake check >& check.out

(5) gmake install

As I mentioned, when running gmake and gmake check, I got several different compiling warnings, although not errors. In addition, all hdiff tests have failed. I decided to try to install it anyway, and I got no errors. Is there a way to fix these warnings? I wonder if that may compromise my model simulations.

Has anyone had experience trying to build HDF4 with Intel compilers? I would appreciate to get some assistance.

Here is some information regarding machine, and compiler version:

Kernel: Linux
Mahcine: Intel Xeon CPU E5472 @ 3.00GHz
Processor: x86_64
OS: GNU/Linux
Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080801 Package ID: l_fc_p_10.1.018

Find attached the relevant files during the installation process

0 Kudos
Ron_Green
Moderator
1,519 Views
Quoting - elenapo


the HDF folks indicate your LD_LIBRARY_PATH is incorrectly set.

before you build and make you do need to source ifortvars.sh.

source /opt/intel/fc/10.1.018/bin/ifortvars.sh

AND I assume you are NOT using a batch system or 'sudo' for the make - correct? These may not inherit the LD_LIBRARY_PATH setting. And I assume your shell is bash - if it tcsh or csh you need to:

source /opt/intel/fc/10.1.018/bin/ifortvars.csh

check your shell with echo $0
echo dollar zero

before you do the build:

echo $LD_LIBRARY_PATH

to make sure your path is set for the Intel libraries.

ron
0 Kudos
Reply