bugGNU Octave - Bugs: bug #63896, ichol failed test will flood stdio


bug #63896: ichol failed test will flood stdio

Submitter:  Dmitri A. Sergatskov <dasergatskov>
Submitted:  Wed 08 Mar 2023 07:47:13 PM UTC
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 09 Mar 2023 10:09:53 PM UTC, comment #5: 

seems like a reasonable request. especially for non-interactive calls to test

Nicholas Jankowski <nrjank>
Group Member
Thu 09 Mar 2023 09:38:11 PM UTC, comment #4: 

I do not see 900x900 matrix echoed even if it is used.
May be it should be a feature request not to echo variables by default and use a special command to display them on error?


Dmitri A. Sergatskov <dasergatskov>
Thu 09 Mar 2023 09:34:50 PM UTC, comment #3: 

It seems any failure after declaring the shared variables will echo the shared variables, even if they weren't used in that test. doesn't exactly answer your question but  I've gotten into the habit of a blank %!shared line after the last test using them so that it avoids echoing them for subsequent failures.

Nicholas Jankowski <nrjank>
Group Member
Thu 09 Mar 2023 08:56:31 PM UTC, comment #2: 

Here is an example:

$ cat t1.m

%!shared A
%! A = magic(5);

%! assert(1, 2);

octave:1> test t1
***** test
 assert(1, 2);
!!!!! test failed
ASSERT errors for:  assert (1,2)

  Location  |  Observed  |  Expected  |  Reason
     ()           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     A =

       17   24    1    8   15
       23    5    7   14   16
        4    6   13   20   22
       10   12   19   21    3
       11   18   25    2    9

Some of the sparse-matrix-functions tests have a fairly large test matrices (in ichol() A2 is 900x900). So failing test floods the log and e.g. here
https://buildbot.octave.org/#/builders/21/builds/278/steps/7/logs/stdio breaks the Internet :)

Is there a way to suppress output of the display of (shared) variables like that?


Dmitri A. Sergatskov <dasergatskov>
Thu 09 Mar 2023 12:04:52 PM UTC, comment #1: 

To avoid this issue, it is important to properly handle any error messages produced by the "ichol" function in the code. This can be done by using try-catch blocks or error handling functions to catch any errors and handle them appropriately. For example, if the "ichol" function fails, you could print an error message to the console or log file, and then exit the program gracefully.

   L = ichol(A);
catch err
   fprintf('Error: %s\n', err.message);
   % handle the error appropriately, e.g. by exiting the program

Wed 08 Mar 2023 07:47:13 PM UTC, original submission:  

If (some?) ichol test fails, it would print on stdout contents of all the matrices involved. Some of them (A2) are fairly large
(900 x 900) sparse matrix that printed on stdio 1 element per line. This is not very manageable.


Dmitri A. Sergatskov <dasergatskov>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by priyanshu (Posted a comment)
  • -email is unavailable- added by dasergatskov (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-12ab.
    Corresponding source code