Difference between Memspace/Filespace

Hello everyone,

Can someone please inform me what the difference is between memspace and
filespace? I am looking at H5Dread which is defined as:

*herr_t *H5Dread( *hid_t *dataset_id, *hid_t* mem_type_id, *hid_t*
mem_space_id, *hid_t* file_space_id, *hid_t* xfer_plist_id, *void ** buf )

For everything I've done so far I've just set the file_space_id to H5S_ALL.
The API description discusses a little bit about file and memspace but I
don't understand what the difference between them is. Thanks.

Regards,

···

--
*Landon Clipp*

National Center for Supercomputing Applications
BS Computer Engineering Student
University of Illinois Urbana-Champaign

Hi Landon,

Is Section 7.4, Dataspaces and Data Transfer, in the HDF5 User's Guide helpful to you?

Binh-Minh

···

________________________________
From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of Landon Clipp <clipp2@illinois.edu>
Sent: Wednesday, March 22, 2017 11:38 AM
To: HDF Users Discussion List
Subject: [Hdf-forum] Difference between Memspace/Filespace

Hello everyone,

Can someone please inform me what the difference is between memspace and filespace? I am looking at H5Dread which is defined as:

herr_t H5Dread( hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void * buf )

For everything I've done so far I've just set the file_space_id to H5S_ALL. The API description discusses a little bit about file and memspace but I don't understand what the difference between them is. Thanks.

Regards,
--
Landon Clipp

National Center for Supercomputing Applications
BS Computer Engineering Student
University of Illinois Urbana-Champaign

Think in terms of src and dst args in a move operation...

In a *read* operation, file_space represents the source data (size and shape) _selection_ and mem_space the destination data (size and shape).

Here is a detailed description...

http://davis.lbl.gov/Manuals/HDF5-1.8.7/UG/12_Dataspaces.html

"Hdf-forum on behalf of Landon Clipp" wrote:

Hello everyone,
Can someone please inform me what the difference is between memspace and filespace? I am looking at H5Dread which is defined as:

herr_t H5Dread( hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void * buf )
For everything I've done so far I've just set the file_space_id to H5S_ALL. The API description discusses a little bit about file and memspace but I don't understand what the difference between them is. Thanks.
Regards,

···

--
Landon Clipp

National Center for Supercomputing Applications
BS Computer Engineering Student
University of Illinois Urbana-Champaign