Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 files would have been platform independent.

I wrote a code that writes out hdf5 files with certain information in there. I ported the files over to my desktop and ran another code to read the information out of it so that I cold manipulate them. But it doesnt seem to read them correctly on my machine, Is that possible? or am I probably making a mistake the my original code where I write out stuff.

Any ideas.

Thanks in advance

Abhilash.

···

____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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.

AFAIK, they are platform independent unless you use the opaque data
structures. You can check to make sure the file is being written
correctly using h5dump or HDFView.

Dave McCloskey

···

-----Original Message-----
From: abhilash chandy [mailto:abhilash_chandy@yahoo.com]
Sent: Friday, March 07, 2008 3:55 PM
To: hdf forum
Subject: Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 files would
have been platform independent.

I wrote a code that writes out hdf5 files with certain information in
there. I ported the files over to my desktop and ran another code to
read the information out of it so that I cold manipulate them. But it
doesnt seem to read them correctly on my machine, Is that possible? or
am I probably making a mistake the my original code where I write out
stuff.

Any ideas.

Thanks in advance

Abhilash.

________________________________________________________________________
____________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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.

----------------------------------------------------------------------
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,
  Thanks for that. I am sorry, but I am not sure if I understand what an opaque data structure is and what is not.

But the output of h5dump looks fine to me. All the information is in the file for sure. Also, I could read the information off of the file on the original platform in which the file was created, but not on this new platform...so I dont know what is going on.

Can anyone please help

···

----- Original Message ----
From: "McCloskey, David L." <McClosDL@westinghouse.com>
To: hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 3:56:44 PM
Subject: RE: Are hdf5 files platform dependent?

AFAIK, they are platform independent unless you use the opaque data
structures. You can check to make sure the file is being written
correctly using h5dump or HDFView.

Dave McCloskey

-----Original Message-----
From: abhilash chandy [mailto:abhilash_chandy@yahoo.com]
Sent: Friday, March 07, 2008 3:55 PM
To: hdf forum
Subject: Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 files would
have been platform independent.

I wrote a code that writes out hdf5 files with certain information in
there. I ported the files over to my desktop and ran another code to
read the information out of it so that I cold manipulate them. But it
doesnt seem to read them correctly on my machine, Is that possible? or
am I probably making a mistake the my original code where I write out
stuff.

Any ideas.

Thanks in advance

Abhilash.

________________________________________________________________________
____________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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.

----------------------------------------------------------------------
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.

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

----------------------------------------------------------------------
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.

Abhilash,

Please make sure that you are using correct datatype in H5Dread call; don't use datatype returned by H5Dget_type since this will be a datatype that describes data IN THE FILE. H5Dread call needs datatype that describes data in memory (i.e. that describes the buffer you are reading into)

As a rule of thumb one should use *NATIVE* types to read data back. Please see
http://www.hdfgroup.org/HDF5/doc/RM/PredefDTypes.html for available NATIVE datatypes.

You may also look at H5Tget_native_type function
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetNativeType to get an appropriate memory datatype for more complex types.

Elena

···

At 3:53 PM -0800 3/7/08, abhilash chandy wrote:

Hi,
  Thanks for that. I am sorry, but I am not sure if I understand what an opaque data structure is and what is not.

But the output of h5dump looks fine to me. All the information is in the file for sure. Also, I could read the information off of the file on the original platform in which the file was created, but not on this new platform...so I dont know what is going on.

Can anyone please help

----- Original Message ----
From: "McCloskey, David L." <McClosDL@westinghouse.com>
To: hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 3:56:44 PM
Subject: RE: Are hdf5 files platform dependent?

AFAIK, they are platform independent unless you use the opaque data
structures. You can check to make sure the file is being written
correctly using h5dump or HDFView.

Dave McCloskey

-----Original Message-----
From: abhilash chandy [mailto:abhilash_chandy@yahoo.com]
Sent: Friday, March 07, 2008 3:55 PM
To: hdf forum
Subject: Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 files would
have been platform independent.

I wrote a code that writes out hdf5 files with certain information in
there. I ported the files over to my desktop and ran another code to
read the information out of it so that I cold manipulate them. But it
doesnt seem to read them correctly on my machine, Is that possible? or
am I probably making a mistake the my original code where I write out
stuff.

Any ideas.

Thanks in advance

Abhilash.

________________________________________________________________________
____________
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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.

----------------------------------------------------------------------
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.

____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

----------------------------------------------------------------------
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.

--

------------------------------------------------------------
Elena Pourmal
The HDF Group
1901 So First ST.
Suite C-2
Champaign, IL 61820

epourmal@hdfgroup.org
(217)333-0238 (office)
(217)333-9049 (fax)
------------------------------------------------------------

That did it. Thanks. It was the whole little endian-big endian thing. So instead of reading the data type from the file, I just created a new datatype since I knew beforehand what data type it would be.

thanks again

···

----- Original Message ----
From: Elena Pourmal <epourmal@hdfgroup.org>
To: abhilash chandy <abhilash_chandy@yahoo.com>; hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 7:11:14 PM
Subject: Re: Are hdf5 files platform dependent?

<!--

blockquote, dl, ul, ol, li {padding-top:0;padding-bottom:0;}
-->Re: Are hdf5 files platform
dependent?Abhilash,

Please make sure that you are using correct datatype in H5Dread
call; don't use datatype returned by H5Dget_type since this will be
a datatype that describes data IN THE FILE. H5Dread call needs
datatype that describes data in memory (i.e. that describes the buffer
you are reading into)

As a rule of thumb one should use *NATIVE* types to read data
back. Please see
http://www.hdfgroup.org/HDF5/doc/RM/PredefDTypes.html for available NATIVE datatypes.

You may also look at H5Tget_native_type function
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetNativeType to get an appropriate memory datatype for morecomplex types.

Elena

At 3:53 PM -0800 3/7/08, abhilash chandy wrote:
Hi,
  Thanks for that. I am sorry, but I am not sure if I understandwhat an opaque data structure is and what is not.

But the output of h5dump looks fine to me. All the information is inthe file for sure. Also, I could read the information off of the fileon the original platform in which the file was created, but not onthis new platform...so I dont know what is going on.

Can anyone please help

----- Original Message ----
From: "McCloskey, David L."<McClosDL@westinghouse.com>
To: hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 3:56:44 PM
Subject: RE: Are hdf5 files platform dependent?

AFAIK, they are platform independent unless you use the opaquedata
structures. You can check to make sure the file is beingwritten
correctly using h5dump or HDFView.

Dave McCloskey

-----Original Message-----
From: abhilash chandy [mailto:abhilash_chandy@yahoo.com]
Sent: Friday, March 07, 2008 3:55 PM
To: hdf forum
Subject: Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 fileswould
have been platform independent.

I wrote a code that writes out hdf5 files with certain informationin
there. I ported the files over to my desktop and ran another codeto
read the information out of it so that I cold manipulate them. Butit
doesnt seem to read them correctly on my machine, Is that possible?or
am I probably making a mistake the my original code where I writeout
stuff.

Any ideas.

Thanks in advance
Abhilash.

________________________________________________________________________
____________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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 tohdf-forum-unsubscribe@hdfgroup.org.

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

     ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

--

------------------------------------------------------------
Elena Pourmal
The HDF Group
1901 So First ST.
Suite C-2
Champaign, IL 61820

epourmal@hdfgroup.org
(217)333-0238 (office)
(217)333-9049 (fax)
------------------------------------------------------------

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

That did it. Thanks. It was the whole little endian-big endian thing. So instead of reading the data type from the file, I just created a new datatype since I knew beforehand what data type it would be.

thanks again

···

----- Original Message ----
From: Elena Pourmal <epourmal@hdfgroup.org>
To: abhilash chandy <abhilash_chandy@yahoo.com>; hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 7:11:14 PM
Subject: Re: Are hdf5 files platform dependent?

<!--

blockquote, dl, ul, ol, li {padding-top:0;padding-bottom:0;}
-->Re: Are hdf5 files platform
dependent?Abhilash,

Please make sure that you are using correct datatype in H5Dread
call; don't use datatype returned by H5Dget_type since this will be
a datatype that describes data IN THE FILE. H5Dread call needs
datatype that describes data in memory (i.e. that describes the buffer
you are reading into)

As a rule of thumb one should use *NATIVE* types to read data
back. Please see
http://www.hdfgroup.org/HDF5/doc/RM/PredefDTypes.html for available NATIVE datatypes.

You may also look at H5Tget_native_type function
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetNativeType to get an appropriate memory datatype for morecomplex types.

Elena

At 3:53 PM -0800 3/7/08, abhilash chandy wrote:
Hi,
  Thanks for that. I am sorry, but I am not sure if I understandwhat an opaque data structure is and what is not.

But the output of h5dump looks fine to me. All the information is inthe file for sure. Also, I could read the information off of the fileon the original platform in which the file was created, but not onthis new platform...so I dont know what is going on.

Can anyone please help

----- Original Message ----
From: "McCloskey, David L."<McClosDL@westinghouse.com>
To: hdf forum <hdf-forum@hdfgroup.org>
Sent: Friday, March 7, 2008 3:56:44 PM
Subject: RE: Are hdf5 files platform dependent?

AFAIK, they are platform independent unless you use the opaquedata
structures. You can check to make sure the file is beingwritten
correctly using h5dump or HDFView.

Dave McCloskey

-----Original Message-----
From: abhilash chandy [mailto:abhilash_chandy@yahoo.com]
Sent: Friday, March 07, 2008 3:55 PM
To: hdf forum
Subject: Are hdf5 files platform dependent?

Hello,
  This might be a stupid question, but I thought that hdf5 fileswould
have been platform independent.

I wrote a code that writes out hdf5 files with certain informationin
there. I ported the files over to my desktop and ran another codeto
read the information out of it so that I cold manipulate them. Butit
doesnt seem to read them correctly on my machine, Is that possible?or
am I probably making a mistake the my original code where I writeout
stuff.

Any ideas.

Thanks in advance
Abhilash.

________________________________________________________________________
____________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

----------------------------------------------------------------------
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 tohdf-forum-unsubscribe@hdfgroup.org.

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

     ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

--

------------------------------------------------------------
Elena Pourmal
The HDF Group
1901 So First ST.
Suite C-2
Champaign, IL 61820

epourmal@hdfgroup.org
(217)333-0238 (office)
(217)333-9049 (fax)
------------------------------------------------------------

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping