Objet : Developers list for StarPU
Archives de la liste
- From: Cyril Roelandt <cyril.roelandt@inria.fr>
- To: starpu-devel@lists.gforge.inria.fr
- Subject: [Starpu-devel] Error handling in StarPU.
- Date: Mon, 26 Mar 2012 12:20:47 +0200
- List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
- List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
Hi,
We tend to use a lot of assertions in StarPU, and I think we may want to be more flexible. Some errors could probably be handled by users, rather than crash their programs. For instance, I believe that starpu_data_acquire() should return -EINVAL when the handle provided by the user is NULL or already partitioned.
We may encounter more critical errors, requiring us to crash. We currently have two different macros defined for that purpose : STARPU_ASSERT(expr) and STARPU_ABORT(). Do we want to use only one, or do they really have different meanings ? I recently wrote in README.dev that STARPU_ABORT() should be used for catastrophic errors ("this worker is not a CPU, not a CUDA device, not an OpenCL device, not something we know...") and STARPU_ASSERT() for running more common checks ("task->cl must not be NULL"), but, well, maybe that's not the right thing to do.
So, in a nutshell:
- should we try to let users handle more errors themselves (and yes, they __must__ check the return values of the functions they use) ?
- should we use STARPU_WARN_UNUSED_RESULT (defined for clang and gcc users) more often ?
- when should we use STARPU_ABORT() and STARPU_ASSERT() ?
Cyril.
- [Starpu-devel] Error handling in StarPU., Cyril Roelandt, 26/03/2012
- Re: [Starpu-devel] Error handling in StarPU., Ludovic Courtès, 26/03/2012
- <Suite(s) possible(s)>
- Re: [Starpu-devel] Error handling in StarPU., Samuel Thibault, 26/03/2012
- Re: [Starpu-devel] Error handling in StarPU., Cyril Roelandt, 29/03/2012
Archives gérées par MHonArc 2.6.19+.