Disabling error printing

Hi all

I am trying to disable error printing in a multithreaded version of HDF5.
Setting H5Eset_auto to NULL will only disable error printing for the current
error stack and not completely, which means that calling this function once
and handle errors at will does not work like in the single threaded version.
Unless error printing is globally disabled, this means that functions built
on top of the multithreaded HDF5 need a function call to disable it in every
function. I'd rather avoid that, therefore I am asking if there's another
way to do that.

Tahnks a lot!

-- dimitris

Hi Dimitris,

···

On Feb 12, 2010, at 3:04 AM, Dimitris Servis wrote:

Hi all

I am trying to disable error printing in a multithreaded version of HDF5. Setting H5Eset_auto to NULL will only disable error printing for the current error stack and not completely, which means that calling this function once and handle errors at will does not work like in the single threaded version. Unless error printing is globally disabled, this means that functions built on top of the multithreaded HDF5 need a function call to disable it in every function. I'd rather avoid that, therefore I am asking if there's another way to do that.

  Hmm, there's no current way to do that. I wonder if we should amend the API calls that interact with the error reporting function to take another parameter to indicate whether the error reporting function change is local (per-thread) or global (for all threads). What do people think?

  Quincey

Hi,

Hmm, there's no current way to do that. I wonder if we should amend the API
calls that interact with the error reporting function to take another
parameter to indicate whether the error reporting function change is local
(per-thread) or global (for all threads). What do people think?
Quincey

I think we discussed this on the list once before... this would be
useful for me as well. The really important thing would be not only
to be able to set the callback for all threads, but also to set a
*default* callback for new threads. This is because my application
doesn't have control over thread creation.

Right now my solution is to call H5Eset_auto at the beginning of every
single function/method.

Andrew

Hi Quincey

thanks for the response. I assumed there's no such option for the moment. My
favorite solution would be to have one function that turns printing on and
off globally. It is easier and cleaner to implement and will not break
existing code. I think a major reason why someone would like to turn
printing off is that when running for example integration tests, HDF5
produces so many error messages that it is impossible to read any other
messages at all. Now, if I would be looking for a specific problem with
threads, I would try on a smaller unit test. Such a function can serve
another purpose: switch printing to some file for all threads. Consider the
case of debugging a remote multithreaded application. It makes more sense to
redirect all HDF5 messages to a file or the logging system on the remote
machine rather than anything else. Like this if something that cannot be
easily reproduced goes wrong, all the information needed can be logged.

Best Regards

Dimitris

···

2010/2/16 Quincey Koziol <koziol@hdfgroup.org>

Hi Dimitris,

On Feb 12, 2010, at 3:04 AM, Dimitris Servis wrote:

Hi all

I am trying to disable error printing in a multithreaded version of HDF5.
Setting H5Eset_auto to NULL will only disable error printing for the
current error stack and not completely, which means that calling this
function once and handle errors at will does not work like in the single
threaded version. Unless error printing is globally disabled, this means
that functions built on top of the multithreaded HDF5 need a function call
to disable it in every function. I'd rather avoid that, therefore I am
asking if there's another way to do that.

Hmm, there's no current way to do that. I wonder if we should amend the
API calls that interact with the error reporting function to take another
parameter to indicate whether the error reporting function change is local
(per-thread) or global (for all threads). What do people think?

Quincey

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org