Re: [Hdf-forum] C# and HDF5

2013-04-09 Thread Konrad Hinsen
--On 8 avril 2013 16:06:37 -0500 Rob Latham r...@mcs.anl.gov wrote: I presume you've already found http://hdf5.net/ That page mentions C++/CLI, so I suppose HDF5.net does not work under Mono. Has anyone considered a portable binding? Konrad.

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Mitchell, Scott - IS
With the string/Chararray fix, I think things will work. String is probably screwing up the offset of the rest of the fields. I think if you had an int/float/etc. first that one would work, but all after the string go 'bad'. Perhaps you need to add a [StructLayout(LayoutKind.Sequential)] to

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Insane
Maybe, I am misunderstanding smth. I used this code [StructLayout(LayoutKind.Sequential)] public unsafe struct Chararray { private double* recordedText; //an initializer to get and set the char* since it is unsafe public double* RecordedText

[Hdf-forum] h5ls cores

2013-04-09 Thread Slava Mazur
Greetings, I cannot reach a group within my hdf. I tried h5ls and it cores. The file is rather big, so I cannot attach it. Below is the log from gdb. It provides some info re program arguments and a version. The only unusual thing about this group is that it contains a vector attribute with

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Mitchell, Scott - IS
[StructLayout(LayoutKind.Sequential)] should be at the head of your metadata struct not Chararray. So, [StructLayout(LayoutKind.Sequential)] struct metadata { public Chararray a; public int b; public float c; public float d; public Chararray f;

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Mitchell, Scott - IS
Also I'm not sure why you're using a double* in Chararray. It should be a char* and is only used as a replacement for string. This is what I use: /// summary /// Chararray is a helper struct to marshal the strings into/out of unmanaged HDF. /// /summary

Re: [Hdf-forum] h5ls cores

2013-04-09 Thread Peter Cao
Hi Slava, Thank you for reporting the problem. We need the file to reproduce the problem. Could you run h5ls file_name/object_path to identify which object (group or dataset) crashes? If you identify the object, could copy the object to a separate file (use h5copy) and send it to us? or you

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Insane
Sorry,what do you mean by And define your strings within the HDF dataType as C_S1 and H5T.setVariableSize(). ? I got the dataType this way: var dataType = H5D.getType(datasetID); -- View this message in context:

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Mitchell, Scott - IS
In my code I build the dataset via brute force to write the data. So I build out the H5T struct(s) that I use. -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Tuesday, April 09, 2013 4:46 PM To: hdf-forum@hdfgroup.org Subject:

Re: [Hdf-forum] c# read different datatypes

2013-04-09 Thread Insane
I still can't get the idea ,what is not correct,where and how u define the datatype If i get the datatype from the dataset, what for should we make strict definition? Btw,are there any examples with method? -- View this message in context: