Compiling hdf5-1.8.1 on Windows XP, using MinGW32-5.1.4 and MSYS-1.0.11

Hello,

My name is Darren Dale, I am a staff scientist at the Cornell High Energy
Synchrotron Source, a national research facility funded by the NSF. I am
evaluating HDF5 version 1.8, and was wondering if I could get a pointer on
compiling the library on Windows with MinGW.

I am attempting to build hdf5-1.8.1 on windows XP, using MinGW32-5.1.4 and
MSYS-1.0.11. I'm running into two problems when I run make:

make[1]: Entering directory `/home/darren/hdf5-1.8.1/test'
/bin/sh ../libtool --tag=CC --mode=link gcc -o testhdf5.exe testhdf5.o
tarray.o tattr.o tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o
tcoords.o theap.o tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o
tselect.o tskiplist.o tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o
libh5test.la ../src/libhdf5.la -lm
libtool: link: gcc -o .libs/testhdf5.exe testhdf5.o tarray.o tattr.o
tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o tcoords.o theap.o
tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o tselect.o tskiplist.o
tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o ./.libs/libh5test.a
../src/.libs/libhdf5.a
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd3d): undefined reference to
`WSAStartup@8'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd70): undefined reference to
`WSACleanup@0'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd83): undefined reference to
`WSACleanup@0'
collect2: ld returned 1 exit status
make[1]: *** [testhdf5.exe] Error 1
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [all-recursive] Error 1

I checked the contents of MinGW/include/winsock.h, which does include
WSAStartup and WSACleanup, so I'm having trouble identifying the source of
the problem. I modified the ifdefs in h5test.c to look for something sure to
not be defined (_WIN320 instead of _WIN32), and then make continues until it
gets to:

make[2]: Entering directory `/home/darren/hdf5-1.8.1/perform'
gcc -DHAVE_CONFIG_H -I. -I../src -I../src -I../test -I../tools/lib -DNDEBUG
-UH5_DEBUG_API -MT sio_engine.o -MD -MP -MF .deps/sio_engine.Tpo -c -o
sio_engine.o sio_engine.c
sio_engine.c: In function `sio_create_filename':
sio_engine.c:398: error: too many arguments to function `mkdir'
make[2]: *** [sio_engine.o] Error 1
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/perform'
make[1]: *** [all-local] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1'
make: *** [all-recursive] Error 1

I was able to work around this by modifing perform/sio_engine.c:

        #ifdef _WIN32
        if (mkdir(fullname) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif
        #ifndef _WIN32
        if (mkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif

and then make was able to finish. When I then run "make test", all the tests
pass until it attempts to testerror.sh:

Testing testerror.sh

···

============================
testerror.sh Test Log

Testing err_compat
*FAILED*
    Expected result differs from actual result
    *** ./testfiles/err_compat_1 Thu May 29 12:38:33 2008
    --- ./err_compat.out Sun Jul 27 14:28:03 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O
All error API tests passed.
         This program tests the Error API compatible with HDF5 version
(number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    --- 1,7 ----
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O
All error API tests passed.
         This program tests the Error API compatible with HDF5 version
(number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
Testing error_test
*FAILED*
    Expected result differs from actual result
    *** ./testfiles/error_test_1 Thu May 29 12:38:33 2008
    --- ./error_test.out Sun Jul 27 14:28:07 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O
All error API tests passed.
         This program tests the Error API. There're supposed to be some
error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    --- 1,11 ----
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O
*FAILED*
    ! at error_test.c:355 in test_long_desc()...
    ! *FAILED*
    ! at error_test.c:604 in main()...
    ! ***** ERROR TEST FAILED! *****
         This program tests the Error API. There're supposed to be some
error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    ***************
    *** 29,31 ****
    --- 33,46 ----
        #002: (file name) line (number) in H5Dwrite(): not a dataset
          major: Invalid arguments to routine
          minor: Inappropriate type
    + HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    + #000: (file name) line (number) in H5Ewalk2(): can't walk error
stack
    + major: Error API
    + minor: Unable to list node
    + #001: (file name) line (number) in H5E_walk(): can't walk error
stack
    + major: Error API
    + minor: Unable to list node
    + Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    + #002: (file name) line (number) in test_long_desc(): Testing very
long description string,
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
    + major: Error in test
    + minor: Error in subroutine
make[4]: *** [testerror.sh.chkexe_] Error 1
make[4]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[3]: *** [build-check-s] Error 2
make[3]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[2]: *** [test] Error 2
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [check-recursive] Error 1

I'm sorry for the excessive length of this report. Could anyone offer some
suggestions on how I can improve the compilation?

Thank you,
Darren

Hi,
I am wondering
1) What do I lose using just normal datasets for small data instead of hdf5 attributes (density, viscosity, etc.)?
2) What do I win using hdf5 attributes over a simple external easy-to-modify text file?
Thanks for any comments,
Dominik

···

--
Dominik Szczerba, Ph.D.
Biomedical Simulation Group
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

I think I ran into some of the testing errors when I tried 1.6.6 under MinGW. I believe the problem ended up being the line endings of the test files. MinGW thinks they should be Unix and the tests think they should be Windows. It's been a long time since I tried using the standard HDF5 build system.

I rewrote the HDF5 build system with CMake which helped solve some of the MinGW issues I was having and eventually was able to get all the tests to pass. I have NOT tried 1.8.1 yet as I am still working on the updated build system for my needs.

···

--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services

On Jul 27, 2008, at 2:46 PM, Darren Dale wrote:

Hello,

My name is Darren Dale, I am a staff scientist at the Cornell High Energy Synchrotron Source, a national research facility funded by the NSF. I am evaluating HDF5 version 1.8, and was wondering if I could get a pointer on compiling the library on Windows with MinGW.

I am attempting to build hdf5-1.8.1 on windows XP, using MinGW32-5.1.4 and MSYS-1.0.11. I'm running into two problems when I run make:

make[1]: Entering directory `/home/darren/hdf5-1.8.1/test'
/bin/sh ../libtool --tag=CC --mode=link gcc -o testhdf5.exe testhdf5.o tarray.o tattr.o tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o tcoords.o theap.o tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o tselect.o tskiplist.o tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o libh5test.la ../src/libhdf5.la -lm
libtool: link: gcc -o .libs/testhdf5.exe testhdf5.o tarray.o tattr.o tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o tcoords.o theap.o tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o tselect.o tskiplist.o tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o ./.libs/libh5test.a ../src/.libs/libhdf5.a
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd3d): undefined reference to `WSAStartup@8'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd70): undefined reference to `WSACleanup@0'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd83): undefined reference to `WSACleanup@0'
collect2: ld returned 1 exit status
make[1]: *** [testhdf5.exe] Error 1
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [all-recursive] Error 1

I checked the contents of MinGW/include/winsock.h, which does include WSAStartup and WSACleanup, so I'm having trouble identifying the source of the problem. I modified the ifdefs in h5test.c to look for something sure to not be defined (_WIN320 instead of _WIN32), and then make continues until it gets to:

make[2]: Entering directory `/home/darren/hdf5-1.8.1/perform'
gcc -DHAVE_CONFIG_H -I. -I../src -I../src -I../test -I../tools/lib -DNDEBUG -UH5_DEBUG_API -MT sio_engine.o -MD -MP -MF .deps/sio_engine.Tpo -c -o sio_engine.o sio_engine.c
sio_engine.c: In function `sio_create_filename':
sio_engine.c:398: error: too many arguments to function `mkdir'
make[2]: *** [sio_engine.o] Error 1
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/perform'
make[1]: *** [all-local] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1'
make: *** [all-recursive] Error 1

I was able to work around this by modifing perform/sio_engine.c:

        #ifdef _WIN32
        if (mkdir(fullname) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif
        #ifndef _WIN32
        if (mkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif

and then make was able to finish. When I then run "make test", all the tests pass until it attempts to testerror.sh:

Testing testerror.sh

testerror.sh Test Log

Testing err_compat *FAILED*
    Expected result differs from actual result
    *** ./testfiles/err_compat_1 Thu May 29 12:38:33 2008
    --- ./err_compat.out Sun Jul 27 14:28:03 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    --- 1,7 ----
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
Testing error_test *FAILED*
    Expected result differs from actual result
    *** ./testfiles/error_test_1 Thu May 29 12:38:33 2008
    --- ./error_test.out Sun Jul 27 14:28:07 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API. There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    --- 1,11 ----
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O *FAILED*
    ! at error_test.c:355 in test_long_desc()...
    ! *FAILED*
    ! at error_test.c:604 in main()...
    ! ***** ERROR TEST FAILED! *****
         This program tests the Error API. There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    ***************
    *** 29,31 ****
    --- 33,46 ----
        #002: (file name) line (number) in H5Dwrite(): not a dataset
          major: Invalid arguments to routine
          minor: Inappropriate type
    + HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    + #000: (file name) line (number) in H5Ewalk2(): can't walk error stack
    + major: Error API
    + minor: Unable to list node
    + #001: (file name) line (number) in H5E_walk(): can't walk error stack
    + major: Error API
    + minor: Unable to list node
    + Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    + #002: (file name) line (number) in test_long_desc(): Testing very long description string, ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
    + major: Error in test
    + minor: Error in subroutine
make[4]: *** [testerror.sh.chkexe_] Error 1
make[4]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[3]: *** [build-check-s] Error 2
make[3]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[2]: *** [test] Error 2
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [check-recursive] Error 1

I'm sorry for the excessive length of this report. Could anyone offer some suggestions on how I can improve the compilation?

Thank you,
Darren

Hi Darren,

We are aware of these issues with MinGW, and have a special document, INSTALL_MinGW.txt, which has instructions to address them. The document is provided in the source distribution, in the release_docs folder.

In general, the WSACleanup errors are presented because MinGW needs to be specifically linked with libws2_32.lib. The test errors are due to how msys treats paths passed on the command line, as Mike Jackson has pointed out.

Please make the changes described in the INSTALL_MinGW.txt document, and let me know if you still have any trouble.

Scott

Darren Dale wrote:

···

Hello,

My name is Darren Dale, I am a staff scientist at the Cornell High Energy Synchrotron Source, a national research facility funded by the NSF. I am evaluating HDF5 version 1.8, and was wondering if I could get a pointer on compiling the library on Windows with MinGW.

I am attempting to build hdf5-1.8.1 on windows XP, using MinGW32-5.1.4 and MSYS-1.0.11. I'm running into two problems when I run make:

make[1]: Entering directory `/home/darren/hdf5-1.8.1/test'
/bin/sh ../libtool --tag=CC --mode=link gcc -o testhdf5.exe testhdf5.o tarray.o tattr.o tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o tcoords.o theap.o tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o tselect.o tskiplist.o tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o libh5test.la <http://libh5test.la> ../src/libhdf5.la <http://libhdf5.la> -lm
libtool: link: gcc -o .libs/testhdf5.exe testhdf5.o tarray.o tattr.o tchecksum.o tconfig.o tfile.o tgenprop.o th5o.o th5s.o tcoords.o theap.o tid.o titerate.o tmeta.o tmisc.o trefer.o trefstr.o tselect.o tskiplist.o tsohm.o ttime.o ttst.o tunicode.o tvlstr.o tvltypes.o ./.libs/libh5test.a ../src/.libs/libhdf5.a
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd3d): undefined reference to `WSAStartup@8'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd70): undefined reference to `WSACleanup@0'
./.libs/libh5test.a(h5test.o):h5test.c:(.text+0xd83): undefined reference to `WSACleanup@0'
collect2: ld returned 1 exit status
make[1]: *** [testhdf5.exe] Error 1
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [all-recursive] Error 1

I checked the contents of MinGW/include/winsock.h, which does include WSAStartup and WSACleanup, so I'm having trouble identifying the source of the problem. I modified the ifdefs in h5test.c to look for something sure to not be defined (_WIN320 instead of _WIN32), and then make continues until it gets to:

make[2]: Entering directory `/home/darren/hdf5-1.8.1/perform'
gcc -DHAVE_CONFIG_H -I. -I../src -I../src -I../test -I../tools/lib -DNDEBUG -UH5_DEBUG_API -MT sio_engine.o -MD -MP -MF .deps/sio_engine.Tpo -c -o sio_engine.o sio_engine.c
sio_engine.c: In function `sio_create_filename':
sio_engine.c:398: error: too many arguments to function `mkdir'
make[2]: *** [sio_engine.o] Error 1
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/perform'
make[1]: *** [all-local] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1'
make: *** [all-recursive] Error 1

I was able to work around this by modifing perform/sio_engine.c:

        #ifdef _WIN32
        if (mkdir(fullname) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif
        #ifndef _WIN32
        if (mkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
            /* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
             * Default to PREFIX's original prefix value. */
            strcpy(fullname, prefix);
        }
        #endif

and then make was able to finish. When I then run "make test", all the tests pass until it attempts to testerror.sh:

Testing testerror.sh

testerror.sh Test Log

Testing err_compat *FAILED*
    Expected result differs from actual result
    *** ./testfiles/err_compat_1 Thu May 29 12:38:33 2008
    --- ./err_compat.out Sun Jul 27 14:28:03 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    --- 1,7 ----
      #############################
      Expected output for err_compat
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
Testing error_test *FAILED*
    Expected result differs from actual result
    *** ./testfiles/error_test_1 Thu May 29 12:38:33 2008
    --- ./error_test.out Sun Jul 27 14:28:07 2008
    ***************
    *** 1,7 ****
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O All error API tests passed.
         This program tests the Error API. There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    --- 1,11 ----
      #############################
      Expected output for error_test
      #############################
    ! Testing error API based on data I/O *FAILED*
    ! at error_test.c:355 in test_long_desc()...
    ! *FAILED*
    ! at error_test.c:604 in main()...
    ! ***** ERROR TEST FAILED! *****
         This program tests the Error API. There're supposed to be some error messages
      ********* Print error stack in HDF5 default way *********
      Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    ***************
    *** 29,31 ****
    --- 33,46 ----
        #002: (file name) line (number) in H5Dwrite(): not a dataset
          major: Invalid arguments to routine
          minor: Inappropriate type
    + HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
    + #000: (file name) line (number) in H5Ewalk2(): can't walk error stack
    + major: Error API
    + minor: Unable to list node
    + #001: (file name) line (number) in H5E_walk(): can't walk error stack
    + major: Error API
    + minor: Unable to list node
    + Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
    + #002: (file name) line (number) in test_long_desc(): Testing very long description string, ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
    + major: Error in test
    + minor: Error in subroutine
make[4]: *** [testerror.sh.chkexe_] Error 1
make[4]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[3]: *** [build-check-s] Error 2
make[3]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[2]: *** [test] Error 2
make[2]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/darren/hdf5-1.8.1/test'
make: *** [check-recursive] Error 1

I'm sorry for the excessive length of this report. Could anyone offer some suggestions on how I can improve the compilation?

Thank you,
Darren

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Dominik,

Hi,
I am wondering
1) What do I lose using just normal datasets for small data instead of hdf5 attributes (density, viscosity, etc.)?

  Well, attributes can be attached directly to any object in the file, which would have to be handled by some application-defined convention if datasets were used instead.

2) What do I win using hdf5 attributes over a simple external easy-to-modify text file?

  It depends on your eventual use, both might be appropriate in different situations. If you have multiple objects in your HDF5 file, attributes would make more sense. Also, if you use a separate file for some/all metadata, you would have to package, track and transfer twice as many files. You might consider using an HDF5 file with a "userblock" (H5Pset_userblock) as a way to have a block of text at the beginning of an HDF5 file.

  Quincey

···

On Jul 27, 2008, at 2:20 PM, Dominik Szczerba wrote:

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Quincey,

Hi,
I am wondering
1) What do I lose using just normal datasets for small data instead of hdf5 attributes (density, viscosity, etc.)?

    Well, attributes can be attached directly to any object in the file, which would have to be handled by some application-defined convention if datasets were used instead.

2) What do I win using hdf5 attributes over a simple external easy-to-modify text file?

    It depends on your eventual use, both might be appropriate in different situations. If you have multiple objects in your HDF5 file, attributes would make more sense. Also, if you use a separate file for some/all metadata, you would have to package, track and transfer twice as many files. You might consider using an HDF5 file with a "userblock" (H5Pset_userblock) as a way to have a block of text at the beginning of an HDF5 file.

The userblock sounds very interesting, thanks a lot for the hint.

-- Dominik

···

    Quincey

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

--
Dominik Szczerba, Ph.D.
Biomedical Simulation Group
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi