octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sparse matrices and error handling


From: Paul Kienzle
Subject: sparse matrices and error handling
Date: Sat, 16 Nov 2002 21:39:31 -0500
User-agent: Mutt/1.2.5.1i

Recent changes in Octave have changed the way critical errors are handled.
It use to be that when code encountered an unrecoverable error, it could
use jump_to_top_level to return to the octave prompt.  That is no longer
the case, so sparse matrix error handling will have to be revisited.  

I'll see to what extent I can turn it into error propogation code.  I may
have to use setjmp/longjmp to catch errors from deep within superlu.  Andy,
do you have any opinions on how this should be done?  I'm thinking of
changing the internal functions so that instead of returning matrices, they
take a matrix reference as a parameter and modify that, and return an
error flag.

John, does error() now throw an exception so that oct-files no longer
have to check for error_state after every operation?  This is a
rhetorical question, since I see from the code that error_state is
alive and well.  This business of propogating error_state is why I 
was looking at C++ exception handling a couple of years ago.  Between 
that and better memory recover, I'm almost convinced that C++ exceptions 
are a good idea.  Too bad they aren't integrated with posix signal 
handling in any meaningful way 8-(


Paul Kienzle
address@hidden

On Sun, Nov 17, 2002 at 01:26:33AM +0000, Ole J. Hagen wrote:
> Hi, again.
> 
> What does jump_to_top_level function do? And where is it declared? Couldn't 
> find it....But I found OCTAVE_JUMP_TO_TOP_LEVEL in either sighandler.h or 
> sighandler.cc file.....Do you have a explanation of that matter? Since it is 
> inside a sighandler file, is it a method in the signal-handler? But that 
> doesn't make sense either, since it could be found in util.h or util.cc......
> 
> 
> By the way; I have checked out the sparse-library and it 
> works.....YIPPI-KAY-AY
> 
> 
> Ole
> 
> On Sunday 17 November 2002 00:10, you wrote:
> > I already removed some jump_to_toplevel's.  It didn't occur to me to look
> > in a .h file.  They really have no business being in user functions.  It
> > is going to take some thought to remove them.
> >
> > - Paul
> >
> > On Sat, Nov 16, 2002 at 11:49:03PM +0000, Ole J. Hagen wrote:
> > > Hi again...
> > > It seems to me that the function  "jump_to_top_level" causes the
> > > problem.. I uncommented it from make_sparse.h! I believe
> > > jump_to_top_level has been removed from the CVS version of Octave, or is
> > > a conditional-step due to preprocessor in CVS version of Octave.
> > >
> > >
> > >
> > > Like this:
> > >
> > >
> > > #define SP_FATAL_ERR(str) { error("sparse: %s", str);  \
> > >  /*                           jump_to_top_level ();*/  \
> > >                             panic_impossible (); }
> > >
> > > When I did this change, it compiled successfully....Where can I find the
> > > definition of jump_to_top_level() ?
> > >
> > > Cheers,
> > >
> > > Ole
> > >
> > >
> > > Here is the error-message from SuperLU package...
> > >
> > > make[2]: Leaving directory `/home/olejh/Octave/octave-forge/main/signal'
> > > make[2]: Entering directory `/home/olejh/Octave/octave-forge/main/sparse'
> > > mkoctfile -DHAVE_OCTAVE_21 -s -v -c sparse_ops.cc -ISuperLU/SRC/
> > > -ISuperLU/CBLAS  -o sparse_ops.o
> > > g++ -c -fPIC -I/usr/include/octave-2.1.39
> > > -I/usr/include/octave-2.1.39/octave -I/usr/include -mieee-fp
> > > -march=pentium4 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer
> > > -ISuperLU/SRC/ -ISuperLU/CBLAS -DHAVE_OCTAVE_21 sparse_ops.cc -o
> > > sparse_ops.o
> > > cc1plus: warning: changing search order for system directory
> > > "/usr/include" cc1plus: warning:   as it has already been specified as a
> > > non-system directory sparse_ops.cc: In function `ColumnVector
> > > sparse_index_oneidx(SuperMatrix, idx_vector)':
> > > sparse_ops.cc:313: `jump_to_top_level' undeclared (first use this
> > > function) sparse_ops.cc:313: (Each undeclared identifier is reported only
> > > once for each function it appears in.)
> > > make[2]: *** [sparse_ops.o] Error 1
> > > make[2]: Leaving directory `/home/olejh/Octave/octave-forge/main/sparse'
> > > make[1]: *** [sparse/] Error 2
> > > make[1]: Leaving directory `/home/olejh/Octave/octave-forge/main'
> > > make: *** [main/] Error 2
> > >
> > > ______________________________________________________
> > > Se den nye Yahoo! Mail på http://no.yahoo.com/
> > > Nytt design, enklere å bruke, alltid tilgang til Adressebok, Kalender og
> > > Notisbok
> 
> ______________________________________________________
> Følg VM i fotball 2002 på http://fifaworldcup.yahoo.com
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]