On 2007-08-16 18:52+0100 Andrew Ross wrote:

> This (PLPLOT ERROR not delivering a non-zero error code) is nothing to do 
> with python - a quick test with the C examples
> shows the same thing if you make zg all zeros in example 21 (this is
> what is returned by griddata in the faulty Numeric case). The reason
> appears to be that the PLPLOT ERROR is not actually treated like an
> error - the program continues regardless.
> If it really is an error then
> the programme would abort with an error code. It's the program error code
> that ctest picks up. If we decide it should continue in this case, then
> the error should be a warning.

I have now looked for PLPLOT ERROR in the code, and it appears you get that
message from both plabort and plexit. The "abort" in plabort stands for
aborting the operation not aborting PLplot itself so it really is a serious
warning not an error. From the code itself plabort is "Much the same as
plwarn(), but appends ", aborting operation" to the error message." So
plabort should be reserved for run-time issues that are more serious than
warnings because the operation must be aborted but not as serious as plexit
which corresponds to such a bad error that plplot itself must be terminated.
Note, plexit _does_ set a return code so would trigger a ctest failure.

I think this issue could be addressed in two ways:

(1) Change the plabort message to PLPLOT WARNING so it isn't confused with
the much more serious PLPLOT ERROR message delivered by plexit.

(2) (Possibly) use plexit more often.  The current error message we can
generate for Example 21 for zero zg is

*** PLPLOT ERROR ***
plw3d: Invalid axis range, aborting operation

This currently corresponds to a call to plabort.  I am not sure, but an
invalid axis range is pretty serious so a call to plexit from plw3d for this
case may be warranted.

Could I have comments here from our core developers (especially Geoffrey and
Maurice who set up this error system in the first place) on this issue of
"where we should draw the line" on using plabort (which is a serious warning
rather than an error) versus plexit (which is an error)?

Once we decide on a reasonably consistent policy for this and implement it
(the hard part) by reviewing and changing where necessary all the plabort
versus plexit calls in the code, then ctest results will reflect that policy
automatically; calls to plwarn or plabort are ignored by ctest while calls
to plexit generate a return code which is noticed by ctest.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to