Closed ax3l closed 8 years ago
Just implemented is_open() as well as boolean cast functions (nonzero and bool) for adios file.
Jong Youl Choi Scientific Data Group Computer Science and Math Division Oak Ridge National Laboratory Homepage: http://www.ornl.gov/~jyc/
On Jul 6, 2016, at 10:05 AM, Axel Huebl notifications@github.com<mailto:notifications@github.com> wrote:
@yyallihttps://github.com/yyalli currently it is not possible to query if a adios.File object is still open.
One way would be to implement a cast of adios.File to bool (as h5py does it) which leads True if the internal fp is != NULL and False otherwise.
Alternatively, an f.ishttp://f.is_open() call could be implemented with the same behaviour.
This is necessary to finish our HDFCompass pull request (HDFGroup/hdf-compass#155https://github.com/HDFGroup/hdf-compass/issues/155).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ornladios/ADIOS/issues/73, or mute the threadhttps://github.com/notifications/unsubscribe/ADfdB_LxFIFTb7dWtYZDL7zMsnXBlWePks5qS7YcgaJpZM4JGHPL.
Hi Jong, that's awesome and quick! We will try it tomorrow, thank you so much.
wonderful, I tested it and it works! b1038dea0145e46474b610163a184c000c371566
ccing @michaelsippel
@yyalli currently it is not possible to query if a
f=adios.File
object is still open (e.g., after a call to.close()
).One way would be to implement a cast of
adios.File
tobool
(ash5py
does it) which leadsTrue
if the internalf.fp
is!= NULL
andFalse
otherwise.Alternatively, an
f.is_open()
call could be implemented with the same behaviour.This is necessary to finish our HDFCompass pull request (https://github.com/HDFGroup/hdf-compass/issues/155).