This discussion is archived
2 Replies Latest reply: Jul 4, 2011 7:05 AM by 872226 RSS

HDF-4 : make check fails

872226 Newbie
Currently Being Moderated
Good evening,

I have been trying for a little while to compile a bunch of scientific software with Solaris Studio on Linux. Most compile and check out fine, some have little issues, and the most annoying one I've found for now is HDF-4: []

HDF-4 version: 4.2.6 (latest one)
System: CentOS release 5.5 (Final)
SolStudio: Sun C 5.11 Linux_i386 2010/08/13
CFLAGS="-m64 -xO4 -xtarget=native -traceback"
FFLAGS="-m64 -xO4 -xtarget=native -traceback -dalign"
-xtarget=native expands to: -xchip=nehalem -xcache=32/64/8:256/64/8:8192/64/16 -xarch=sse4_2

The issue is: it compiles fine, but ALWAYS fails its tests, quite early and at the same place every time. "make -k check" shows that after that pretty much every other test fails. I have tried building it static and shared, fortran enabled or disabled, with or without szlib (just in case), with or without the NetCDF2 interface (idem), I even built my own libjpeg at some point as I read that in some rare cases PGI compilers had issues with gcc-built libjpegs (I was really desperate), and I have played with every compiler option I could think of but it didn't make any difference. I don't know what else to do at that point.

Typical configure options are (shared and fortran are mutually exclusive):
./configure --prefix=${PREFIXDIR} disable-static enable-shared disable-fortran disable-netcdf --with-szlib=${PREFIXDIR}
./configure --prefix=${PREFIXDIR} enable-static disable-shared enable-fortran disable-netcdf --with-szlib=${PREFIXDIR}

The very same code passes its tests with gfortran 4.4 and ifort 11.1 without anything special.

Any idea from Oracle people?


Edited by: 869223 on Jul 1, 2011 2:47 PM
  • 1. Re: HDF-4 : make check fails
    800381 Explorer
    Currently Being Moderated
    Does it work with no optimizations at all?

    Offhand, that mixed "-dalign" seems problematical to me. I can see there being all kinds of issues if different portions of the final binary get compiled with different alignment constraints.
  • 2. Re: HDF-4 : make check fails
    872226 Newbie
    Currently Being Moderated

    No, it doesn't work with no optimization either. Same behaviour all the way. I've just double checked with:

    CFLAGS="-m64 -traceback"
    ./configure --prefix=${PREFIXDIR} enable-static enable-shared --disable-fortran

    So safe mode, no Fortran, no external library, nothing, and it still fails.

    Regarding the -dalign, the SolStudio documentation says that on x86 platforms this option is silently ignored. I had tried before without it, just in case, and it failed. I compiled quite a few other Fortran codes with -dalign, and it mostly works (I say mostly because I have a couple of other issues, but that will wait until after this one).


  • Correct Answers - 10 points
  • Helpful Answers - 5 points