Close file without flushing?

Hello!

I'm using temporary HDF5 files to store intermediate processing results. When finished, I'd like to just discard the file, i.e. close the file without flushing (flushing takes some time).

However, http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Close says:
"H5Fclose terminates access to an HDF5 file by flushing all data to storage and terminating access to the file through file_id."

Also, the file can be closed indirectly when the last object handle is released. It's unclear how to tell HDF5 library that no flushing should occur in this case.

But maybe there is still a way to close HDF5 file without flushing?

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Hi Andrey

so what you mean is that you simply wantto discard everything in the file?

dimitris

···

2014-08-20 8:15 GMT+02:00 Андрей Парамонов <paramon@acdlabs.ru>:

Hello!

I'm using temporary HDF5 files to store intermediate processing results.
When finished, I'd like to just discard the file, i.e. close the file
without flushing (flushing takes some time).

However, http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Close says:
"H5Fclose terminates access to an HDF5 file by flushing all data to
storage and terminating access to the file through file_id."

Also, the file can be closed indirectly when the last object handle is
released. It's unclear how to tell HDF5 library that no flushing should
occur in this case.

But maybe there is still a way to close HDF5 file without flushing?

Best wishes,
Andrey Paramonov

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-
forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

20.08.2014 10:30, Dimitris Servis пишет:

Hi Andrey

so what you mean is that you simply wantto discard everything in the file?

Yes.

If needed I'll be sure to use H5Ocopy to some other file, prior to that :wink:

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Big data or small data?

Did you try storing everything under a single group and unlinking it from
the root before closing? This *might* prevent HDF5 from wanting to flush
anything.

···

2014-08-20 8:34 GMT+02:00 Андрей Парамонов <paramon@acdlabs.ru>:

20.08.2014 10:30, Dimitris Servis пишет:

Hi Andrey

so what you mean is that you simply wantto discard everything in the
file?

Yes.

If needed I'll be sure to use H5Ocopy to some other file, prior to that :wink:

Best wishes,
Andrey Paramonov

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-
forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

20.08.2014 10:37, Dimitris Servis пишет:

Big data or small data?

I don't know if 1M..1G qualifies as big or small :wink:
I just feel that several-second delay when closing temp. data files is very stupid.

Did you try storing everything under a single group and unlinking it
from the root before closing? This *might* prevent HDF5 from wanting to
flush anything.

"Might" is not what I'm expecting from the software :wink:
So, I guess there is no way to discard file, deterministically?

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Big is what will not fit in RAM in an ordinary use case. If it would easily
fit in memory use a memory file.

Not sure what you're expecting from the software, I expect developers to
try :wink:

Note, HDF5 is normally used for permanent storage not ephemeral. Another
way would be to write a special terminal VFD driver that does exactly what
you want.

···

2014-08-20 8:43 GMT+02:00 Андрей Парамонов <paramon@acdlabs.ru>:

20.08.2014 10:37, Dimitris Servis пишет:

Big data or small data?

I don't know if 1M..1G qualifies as big or small :wink:
I just feel that several-second delay when closing temp. data files is
very stupid.

Did you try storing everything under a single group and unlinking it

from the root before closing? This *might* prevent HDF5 from wanting to
flush anything.

"Might" is not what I'm expecting from the software :wink:
So, I guess there is no way to discard file, deterministically?

Best wishes,
Andrey Paramonov

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-
forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

20.08.2014 10:56, Dimitris Servis пишет:

Big is what will not fit in RAM in an ordinary use case. If it would
easily fit in memory use a memory file.

Right, but in my case the data won't often fit in memory.

Not sure what you're expecting from the software, I expect developers to
try :wink:

Note, HDF5 is normally used for permanent storage not ephemeral. Another
way would be to write a special terminal VFD driver that does exactly
what you want.

I do if fact have one. Is it possible to implement discard feature with VFD hooks?

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Never tried it, but for sure there is a trick ,for example, what if you
write a function that gets the VFD handle and marks it for discard?

···

2014-08-20 9:02 GMT+02:00 Андрей Парамонов <paramon@acdlabs.ru>:

20.08.2014 10:56, Dimitris Servis пишет:

Big is what will not fit in RAM in an ordinary use case. If it would

easily fit in memory use a memory file.

Right, but in my case the data won't often fit in memory.

Not sure what you're expecting from the software, I expect developers to

try :wink:

Note, HDF5 is normally used for permanent storage not ephemeral. Another
way would be to write a special terminal VFD driver that does exactly
what you want.

I do if fact have one. Is it possible to implement discard feature with
VFD hooks?

Best wishes,
Andrey Paramonov

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-
forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

> Big is what will not fit in RAM in an ordinary use case. If it would
> easily fit in memory use a memory file.

Right, but in my case the data won't often fit in memory.

If you have a rather simple space problem and the data
can be organized in some simple fashion without HDF,
then why not think about just memory mapped files
or simply rely on system's paging capabilities.

(Probably you really want to do it using HDF...)

Regards, Alex.

20.08.2014 15:58, Stohr, Alexander пишет:

Big is what will not fit in RAM in an ordinary use case. If it would
easily fit in memory use a memory file.

Right, but in my case the data won't often fit in memory.

If you have a rather simple space problem and the data
can be organized in some simple fashion without HDF,
then why not think about just memory mapped files
or simply rely on system's paging capabilities.

(Probably you really want to do it using HDF...)

Yes, I do. I really like HDF5 query abilities, transparent compression. But most importantly, I can H5Ocopy data to permanent storage!

Best wishes,
Andrey Paramonov

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.