
                          HDF 4.2 Release 4  
                          =================
                          January 25, 2009

INTRODUCTION

This document describes the differences between HDF 4.2r3 and HDF 4.2r4
It is written for people who are familiar with previous releases of HDF 
and wish to migrate to HDF 4.2r4

The HDF 4.2r4 documentation can be found on the The HDF Group's FTP server:

     ftp://ftp.hdfgroup.org/HDF/Documentation/

First-time HDF users are encouraged to read the HDF FAQ, which can be
reached from the HDF product home page:
  
     http://hdfgroup.org/products/hdf4/

If you have any questions or comments, please see the HDF Support page:

     http://hdfgroup.org/services/support.html

CONTENTS

- New features and changes
  -- Configuration
  -- Library
  -- Utilities
- Support for new platforms and compilers
- Bugs fixed since HDF4.2r3
  -- Utilities
  -- Library
  -- Configuration
- Documentation
- Platforms tested
- Known problems


New features and changes
========================
    Configuration
    ============= 
        - Automake 1.10.1 used to generate Makefile.in files, and 
          Autoconf 2.61 used to generate configure script. MAM - 2008/10/09
        - Libtool support (2.2.6a) has been added, and HDF4 shared C 
          libraries can now be built. To build, use the --enable-shared 
          configuration flag. This needs to be used in conjunction with 
          the --disable-fortran flag, as Fortran shared libraries are not 
          supported. Shared libraries are disabled by default. 
          MAM - 2008/10/09
        - Added SZIP information to end of configure summary, which indicates
          whether SZIP is present and, if SZIP is present, whether the SZIP
          encoder is present.  MAM - 2008/10/06

    Library
    ========= 
        - Added new API SDgetdatasize to retrieve the compressed and original
          sizes of an SDS' data.  Its limitation is listed in the "Known 
          problems" section at the end of this document.
          intn SDgetdatasize(int32 sdsid, int32* comp_size, int32* orig_size)
                sdsid     - IN: dataset ID
                comp_size - OUT: size of compressed data
                orig_size - OUT: size of original data 
          BMR - 2008/10/15

        - The following Fortran APIs were added in this release:
                sfgetname
                sfgetnamelen
                sfgmaxopenf
                sfgnumopenf
                sfrmaxopenf
                sfidtype
                sfgnvars_byname
                sfn2indices
          Please see HDF Reference Manual for functions description.
          Note: These APIs are not available on Windows.

    Utilities
    ========= 
        - hrepack output now includes dataset compression ratios.
          PVN - 2008/10/30
        - hdp now displays various parameters of Gzip, Szip, and Skipping
          Huffman compressions when a dataset is compressed. (Bugzilla 1202)
          BMR - 2008/10/03


Support for new platforms and compilers
=======================================
        Linux 2.6.27 x86_64 Fedora 10 with GNU C and gfortran
                            Ubuntu 8.10 with GNU C and gfortran
                            OpenSuse 11.1 with GNU C and gfortran

        Mac Intel with GNU C, gfortran, g95 and Intel 10.1 32-bit 
        C and Fortran compilers

          Note: Only the 32-bit version of the Intel compiler is supported. 

          One has to run configuration scripts, which can be found under 
          the bin directories in the Intel compiler installation directory 
          tree (e.g., /opt/intel/cc/10.1.006/bin/iccvars.csh and 
          /opt/intel/fc/10.1.006/bin/ifortvars.csh), to enable the
          32-bit version of the compiler before configuring and building HDF4.

          Known problems: 
          Due to a known bug in the Intel 10.1 icc compiler, one has to use
          -no-multibyte-chars flag with icc. O0 flag with ifort is required
          to build Fortran APIs and tests. This restriction is probably due
          to very old Fortran code and will be lifted for future releases.  
        

Bugs fixed since HDF4.2r3
=========================
    Utilities
    ========= 
        - hrepack previously failed to preserve unlimited dataset dimensions; 
          they are now preserved.  PVN - 2008/11/19

    Library
    ========= 
        - SDreaddata now checks for out-of-range values in the parameter 
          'stride' and fails when invalid values are given (Bugzilla 150.)  
          This bug was actually fixed right before the HDF4.2r2 release.  
          BMR - 2008/07/14
        - Reading a record variable using nc API fills the buffer with fill
          values up to the maximum number of records of all unlimited
          dimension variables in the file, as in netCDF.  It used to fail
          before (Bugzilla 1378.) - BMR 2009/01/21
        - When the file name is too long, some SD APIs caused a segmentation 
          fault (Bugzilla 1331.)  This problem is now fixed. - BMR 2009/01/23

    Configuration
    ============= 
        - hdiff_array.c now gets linked against libm.a library. 

Documentation
==============
The updated HDF Reference Manual is now available in HTML format.

Platforms tested
================

HDF 4.2 Release 4 has been tested on the following platforms:

    FreeBSD 6.3-STABLE i386       gcc 3.4.6 [FreeBSD] 20060305
    (duty)                        g++ 3.4.6 [FreeBSD] 20060305
                                  f77 (gcc) 3.4.6
                                  gcc 4.2.5 20080702
                                  g++ 4.2.5 20080702
                                  gfortran 4.2.5 20080702

    FreeBSD 6.3-STABLE amd64      gcc 3.4.6 [FreeBSD] 20060305
    (liberty)                     g++ 3.4.6 [FreeBSD] 20060305
                                  f77 (gcc) 3.4.6
                                  gcc 4.2.5 20080702
                                  g++ 4.2.5 20080702
                                  gfortran 4.2.5 20080702

    IRIX64 6.5                    MIPSpro cc 7.4.4m
    (ucar mop1 64 & n32)          F90 MIPSpro 7.4.4m


    Linux 2.6.18-92.1.22.el5xen   gcc (GCC) 4.1.2 20071124
         #1 SMP i686 i686 i386    gG95 (GCC 4.0.3 (g95 0.92!) July 1 2008)
    (jam)                         g77 (GCC) 3.4.6 20060404
                                  PGI C, Fortran, C++ 7.2-5 32-bit
                                  Intel(R) C Compiler for 32-bit
                                      applications, Version 10.1.018
                                  Intel(R) Fortran Compiler for 32-bit
                                      applications, Version 10.1.018

    Linux 2.6.9-42.0.10.ELsmp #1  gcc (GCC) 3.4.6
         SMP i686 i386            g++ (GCC) 3.4.6
    (kagiso)                      G95 (GCC 4.0.3 (g95 0.92!) April 18 2007)

    Linux 2.6.16.46-0.12-debug #1 Intel(R) C Compiler Version 10.0.025
        SMP ia64 GNU/Linux        Intel(R) Fortran Itanium(R) Version 10.0.025
    (ucar hir1)

    Linux 2.6.16.46-0.14-smp #1   gcc (GCC) 4.1.2 20070115 (SUSE Linux)
        SMP x86_64 GNU/Linux      G95 (GCC 4.0.3 (g95 0.92!) July 1 2008)
    (smirom)                      Intel(R) C Compiler for Intel(R) EM64T Ver.
10.1.013
                                  Intel(R) Fortran Intel(R) EM64T Ver.
10.1.013
                                  PGI C, Fortran Version 7.2-1
                                         for 64-bit target on x86-64

    Linux 2.6.16.54-0.2.5 #1      Intel(R) C Compiler Version 10.1.017
        Altix SMP ia64            Intel(R) Fortran Itanium(R) Version 10.1.017
    (cobalt)                      SGI MPI 1.16

    SunOS 5.10 32- and 64-bit     Sun WorkShop 6 update 2 C 5.8
                                  Patch 121015-06
    (linew)                       Sun WorkShop 6 update 2 Fortran 95 8.2
                                  Patch 121019-09

    Xeon Linux 2.6.18-92.1.10.el5_lustre.1.6.6smp-perfctr
         #2 SMP x86_64            Intel(R) C Compiler Version 10.0.026
    (abe)                         Intel(R) Fortran Compiler Version 10.0.026

    IA-64 Linux 2.4.21.SuSE_292.til1
        ia64
    (NCSA tg-login)               Intel(R) C Compiler Version 8.1.037
                                  Intel(R) Fortran Compiler Version 8.1.033


    Windows XP                    Visual Studio 6.0
                                  Visual Studio .NET (with Intel Fortran 9.1)
                                  Visual Studio 2005 (with Intel Fortran 9.1/10.1)
                                  Visual Studio 2008 (with Intel Fortran 10.1)
                                  cygwin (gcc 3.4.4 and g95 0.90!)

    Windows XP(64 bit)            Visual Studio 2005 (with Intel Fortran 9.1/10.1)
                                  Visual Studio 2008 (with Intel Fortran 10.1)
                                  
    Windows Vista                 Visual Studio 2008 (with Intel Fortran 10.1)
                                  cygwin (gcc 3.4.4 and g95 0.90!)
                                  
    Windows Vista(64 bit)         Visual Studio 2008 (with Intel Fortran 10.1)
                                  
    MAC OS X Intel                Darwin 9.4.0
                                  i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
                                  G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008)
                                  gfortran GNU Fortran (GCC) 4.3.0 20070810
                                  Intel 10.1 32-bit version

    Linux 2.6.27.9-159.fc10.x86_64 #1 SMP 
        x86_64 GNU/Linux          gcc (GCC) 4.3.2
     (Fedora 10)                  gfortran GNU Fortran (GCC) 4.3.2 20081105 
                                                       (Red Hat 4.3.2-7)
    Linux 2.6.27-9-generic #1 SMP 
        x86_64 GNU/Linux          gcc (GCC) 4.3.2
     (Ubuntu 8.10)                gfortran GNU Fortran (GCC) 4.3.2 
                                                       
    Linux 2.6.27.7-9-default #1 SMP 
        x86_64 GNU/Linux          gcc (GCC) 4.3.2
     (OpenSuse 11.1)              gfortran GNU Fortran (GCC) 4.3.2 


Known problems
==============

o  Existing data written by an HDF4 Library prior to HDF 4.2r2:
   When a one-dimensional SDS and a dimension scale were created with
   the same name, subsequent accesses to the dimension scale or to the
   SDS might corrupt the data.

   HDF4 Library Releases 4.2r2 and later do not allow this conflict to
   occur.  On the other hand, recent libraries are also unable to detect
   such conflicts that already exist in a file.  It is therefore STRONGLY
   recommended to check for such name duplication before working with data 
   created with a pre-4.2r2 library. 

   The functions SDgetnumvars_byname and SDnametoindices are provided
   to help detect such name conflicts and select the correct object to
   access, respectively; see the HDF Reference Manual entries for 
   further details.

o  This release does not support VMS systems.

o  N-Bit compression is not supported with Fortran APIs.

o  Using both fill-value and compression on SD datasets does not work.

o  When using PGI compilers, make sure that the JPEG library is also compiled 
   with a PGI C compiler; linking with a JPEG library built with gcc causes 
   JPEG library tests to fail.  To bypass the problem:

       x Set LIBS flag to $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
         where $PGI_JPEG_INSTALL_DIR points to the installation directory
         for the PGI-compiled JPEG library:

         setenv LIBS $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a

       x Use the --with-jpeg=$PGI_JPEG_INSTALL_DIR configure flag to 
         configure with the PGI-compiled JPEG library:

         ./configure --with-jpeg=$PGI_JPEG_INSTALL_DIR --with-zlib....

o  In order for the new API SDgetdatasize to get the correct compressed size
   of the data, the dataset needs to be closed (SDendaccess) or read
   (SDreaddata), after being written and before SDgetdatasize is called.

o  On a fedora x86_64 GNU/Linux machine with gfortran 4.3.2, the flag
   -fno-range-check needs to be used to work around old code.
   
o  On Windows with Visual Studio .NET 2003, a minor bug in the hdfnctest test
    causes it to fail.  The failure is non-critical, and so the test has been
    disabled by default for all Windows compilers.
   
