[NeXus-code-tickets] [NeXusCode] #6: Java API - makedata cannot create an unlimted dimension array for HDF5 files

NeXus Data Format Library and Applications noreply at nexusformat.org
Wed Jun 13 16:04:28 BST 2007


#6: Java API - makedata cannot create an unlimted dimension array for HDF5
files
------------------------------+---------------------------------------------
  Reporter:  Freddie Akeroyd  |       Owner:  Mark Koennecke
      Type:  defect           |      Status:  reopened      
  Priority:  major            |   Milestone:                
 Component:  applications     |     Version:                
Resolution:                   |    Keywords:                
------------------------------+---------------------------------------------
Changes (by Stuart Campbell):

  * status:  closed => reopened
  * resolution:  fixed =>
  * component:  => applications

Old description:

> Reported by Stuart Campbell <s.i.campbell at diamond.ac.uk>
>
> Using the following in the Java API to create some data...
>
> int iDim[] = new int[1];
> iDim[0] = 0;
> nf.makedata("data", NexusFile.NX_FLOAT64, 1, iDim);
>
> produces the error:
>
> ERROR: Creating chunked dataset failed!
>
> when working with a HDF5 file, but works fine for a HDF4 file.

New description:



Comment:

 Mark,

 If I use NexusFile.NX_UNLIMITED to denote the unlimited dimension array
 length then it works fine for HDF4 but not HDF5.  Looking at the code, the
 value of NX_UNLIMITED is 0.

 If I pass either 0 (HDF4) or -1 (HDF5) explicitly then everything works
 ok.

 I'm not sure of what the best thing to do is.  We could either be clever
 and try and see what sort of file is being used and then search modify the
 iDims[] on the makedata() calls or maybe just have
 a couple of statics, one for HDF4 and one for HDF5 (e.g. NX_UNLIMITED5, or
 something).

 Stu

-- 
Ticket URL: <http://trac.nexusformat.org/code/ticket/6#comment:2>
NeXus Data Format Library and Applications <http://www.nexusformat.org/>
NeXus Data Format Library and Applications



More information about the NeXus-code-tickets mailing list