swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hdf5 problem


From: gepr
Subject: hdf5 problem
Date: Tue, 6 Aug 2002 20:32:01 -0700

Hello my fellow drones,

So, when trying to upgrade from an anoncvs version of swarm I 
checked out about a month or two ago (which uses the HDF5Archiver),
I encountered the following two problems:

Problem 1:
----------------------------------------------------------------
HDF5-DIAG: Error detected in HDF5 library version: 1.4.2 thread 0.  Back trace 
follows.
  #000: ../../../src/H5S.c line 515 in H5Sclose(): not a data space
    major(01): Function arguments
    minor(03): Inappropriate type
*** event raised for error: SaveError
*** function: _i_HDF5_c__drop(), file: HDF5Object.m, line: 2345
Failed to close vector space*** execution terminating due to error
Symbol.m:187 -[Error(c) _raiseEvent:]
Aborted
------------------------------------------------------------------

Problem 2:
------------------------------------------------------------------
HDF5-DIAG: Error detected in HDF5 library version: 1.4.2 thread 0.  Back trace 
follows.
  #000: ../../../src/H5D.c line 394 in H5Dclose(): not a dataset
    major(01): Function arguments
    minor(03): Inappropriate type
*** event raised for error: SaveError
*** function: _i_HDF5_c__drop(), file: HDF5Object.m, line: 2336
Failed to close HDF5 dataset*** execution terminating due to error
Symbol.m:187 -[Error(c) _raiseEvent:]
Aborted
------------------------------------------------------------------


Problem 1 seems to have been caused by code in the
HDF5Object.m::drop() method that H5SCloses the data space twice.  The
first close is successful (obviously), but doesn't reset the pointer.
So, when it gets to the second H5SClose() function, it fails.

Problem 2 seems to be a problem with the changes in the way we use
HDF5.  The HDF5Archiver used to have to drop the dataset manually;
but, now it is dropped within the hdf5OutShallow() method.  So,
obviously, dropping it again would cause a failure.

The attached patch file seems to fix these two problems.  Would anyone
be willing to apply the patch (to the current cvs HEAD), evaluate
my code and recommend for or against its check-in?

-- 
glen e. p. ropella              =><=                           Hail Eris!
H: 831.335.4950                              http://www.ropella.net/~gepr
M: 831.247.7901

--- swarm-2002-08-05/src/defobj/HDF5Archiver.m  2002-08-06 07:36:36.000000000 
-0700
+++ swarm-2002-08-06/src/defobj/HDF5Archiver.m  2002-08-06 20:09:02.000000000 
-0700
@@ -149,8 +149,8 @@
               [app drop];
               [file drop];
             }
-          //else
-          [hdf5Obj drop];
+          else
+            [hdf5Obj drop];
         }
     }
   hdf5Obj = [[[[[HDF5 createBegin: getZone (self)]
@@ -191,7 +191,6 @@
   if (!dataset)
     abort ();
   [object hdf5OutShallow: dataset];
-  [dataset drop];
 }
 
 - getWithZone: aZone key: (const char *)key 
--- swarm-2002-08-05/src/defobj/HDF5Object.m    2002-04-14 03:02:58.000000000 
-0700
+++ swarm-2002-08-06/src/defobj/HDF5Object.m    2002-08-06 20:06:40.000000000 
-0700
@@ -2304,9 +2304,12 @@
       if (compoundType)
         {
           if (c_sid != psid)
-            if (H5Sclose (c_sid) < 0)
-              raiseEvent (InvalidArgument, "Failed to close (compound) space");
-
+            {
+              if (H5Sclose (c_sid) < 0)
+                raiseEvent (InvalidArgument, 
+                            "Failed to close (compound) space");
+              else c_sid = -1;
+            }
           if (H5Dclose (loc_id) < 0)
             raiseEvent (SaveError, "Failed to close (compound) dataset");
           
@@ -2344,6 +2347,7 @@
         {
           if (H5Sclose (c_sid) < 0)
             raiseEvent (SaveError, "Failed to close vector space"); 
+          else c_sid = -1;
         }
     }
   hdf5InstanceCount--;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]