Can the filespace size be greater than the limit set by
std::numeric_limits<int>::max()? I have a vector which is to be written to
H5 file. The size of the vector is 2195543407 while
std::numeric_limits<int>::max() = 2147483647. This error disappears when I
use long instead of int.

Suman


On Mon, Dec 17, 2012 at 1:32 PM, Suman Vajjala <[email protected]> wrote:

> Hi,
>
>  This is a part of the code which gives error:
>
>     hsize_t celldset_sz = ncells * gmaxbandwidth;
>     filespace = H5Screate_simple (1, &celldset_sz, NULL);
>     dset_id = H5Dcreate (file_id, "cellinfo", H5T_NATIVE_INT, filespace,
>                          H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
>     H5Sclose (filespace);
>     H5Dclose (dset_id);
>
>   celldset_sz = 2195543407
>
>   I've found out the error. Maximum limit addressed by int is 2147483647.
> Maybe this is why the code is raising an error.
>
>
> Regards
> Suman
>
>
>
> On Mon, Dec 17, 2012 at 12:41 PM, Elena Pourmal <[email protected]>wrote:
>
>> Hard to tell
>> Could you please provide a snippet of the source code?
>>
>> Sent from my iPhone
>>
>> On Dec 17, 2012, at 1:00 AM, Suman Vajjala <[email protected]> wrote:
>>
>> > Hi all,
>> >
>> >  I am writing a dataset to a H5 file and in the process getting this
>> error
>> >
>> >   #009: H5Dint.c line 1034 in H5D_create(): unable to construct layout
>> information
>> >     major: Dataset
>> >     minor: Unable to initialize object
>> >
>> > What does this error convey?
>> >
>> > Thanks
>> > Suman
>> > _______________________________________________
>> > Hdf-forum is for HDF software users discussion.
>> > [email protected]
>> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> [email protected]
>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>
>
>
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to