Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-09-17 Thread Michael Povolotskyi
Thank you, It worked out perfectly. Michael. On 09/16/2015 12:57 PM, Roy Stogner wrote: > > On Wed, 16 Sep 2015, Michael Povolotskyi wrote: > >> after some break I got again to the code debugging. >> The only solution to avoid calling libmesh handler > > If you're debugging, wouldn't it be easy to

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-09-16 Thread Roy Stogner
On Wed, 16 Sep 2015, Michael Povolotskyi wrote: > after some break I got again to the code debugging. > The only solution to avoid calling libmesh handler If you're debugging, wouldn't it be easy to set a breakpoint at the libmesh handler? > was to use > std::set_terminate(NULL) after libmesh i

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-09-16 Thread Michael Povolotskyi
Hello again, after some break I got again to the code debugging. The only solution to avoid calling libmesh handler was to use std::set_terminate(NULL) after libmesh initialization. With this the MPI_Abort is not called anymore, which is good, but the standard handler of Intel C++ compiler is not

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-31 Thread Roy Stogner
On Mon, 31 Aug 2015, Michael Povolotskyi wrote: > Why do you put the error handler inside the library? As with every other "Why do you put X inside libmesh?" question, it's a combination of good sense (useful stuff should go in *some* library to get reused) and laziness (error handling isn't FEM

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-31 Thread Michael Povolotskyi
Hello, still I have a question. Why do you put the error handler inside the library? Imagine that my application has many libraries, each of them has its own handler, how this should work together? It is convenient that libmesh throws exceptions that explain what went wrong. Still I'd like to ca

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-27 Thread John Peterson
On Thu, Aug 27, 2015 at 11:10 AM, John Peterson wrote: > > > On Thu, Aug 27, 2015 at 9:53 AM, Michael Povolotskyi > wrote: > >> Another thought. >> In your error handler you call MPI_Abort. >> I think this is causing problem for my application. >> In my application I use both real and complex ve

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-27 Thread John Peterson
On Thu, Aug 27, 2015 at 9:53 AM, Michael Povolotskyi wrote: > Another thought. > In your error handler you call MPI_Abort. > I think this is causing problem for my application. > In my application I use both real and complex versions of PETSc, so I > initialize MPI myself, then initialize PETSC,

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-27 Thread Michael Povolotskyi
Another thought. In your error handler you call MPI_Abort. I think this is causing problem for my application. In my application I use both real and complex versions of PETSc, so I initialize MPI myself, then initialize PETSC, then initialize libmesh. Can I still have libmesh throwing exceptions

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread Michael Povolotskyi
Thank you, I will try this. On 8/26/2015 7:13 PM, Paul T. Bauman wrote: > > > On Wed, Aug 26, 2015 at 6:53 PM, John Peterson > wrote: > > On Wed, Aug 26, 2015 at 4:23 PM, Michael Povolotskyi > mailto:mpovo...@purdue.edu>> > wrote: > > Now, when your ha

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread Paul T. Bauman
On Wed, Aug 26, 2015 at 6:53 PM, John Peterson wrote: > On Wed, Aug 26, 2015 at 4:23 PM, Michael Povolotskyi > wrote: > > Now, when your handler is called the depth has been increased up to 100 > > levels and somehow I got into destructors of my objects. Doing "up" > command > > many times I was

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread John Peterson
On Wed, Aug 26, 2015 at 4:23 PM, Michael Povolotskyi wrote: > What happens is as follows: > I use the gdb editor. > Ah, so it's a debugging issue, not a runtime issue... > I run the code there until the exception is thrown. Since it is not caught > inside the code, the code stops and I use g

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread Michael Povolotskyi
What happens is as follows: I use the gdb editor. I run the code there until the exception is thrown. Since it is not caught inside the code, the code stops and I use gdb command "up" and "print" for debugging. Usually my stack depth is less than 10, so this is easy. Now, when your handler is ca

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread John Peterson
On Wed, Aug 26, 2015 at 3:12 PM, Michael Povolotskyi wrote: > The problem is that the handler of yours causes execution of some class > destructors of my code, which I do not want to happen. This happens if I > build my code in DEBUG mode when I do not want any exception catching. > The libmesh

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread Michael Povolotskyi
The problem is that the handler of yours causes execution of some class destructors of my code, which I do not want to happen. This happens if I build my code in DEBUG mode when I do not want any exception catching. I'm not sure why this happens. Solution of Paul helped me. Michael. On 08/26/

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-26 Thread John Peterson
On Tue, Aug 25, 2015 at 11:29 AM, Michael Povolotskyi wrote: > Dear Libmesh developers, > recently I saw a problem with libmesh_terminate_handler > < > http://libmesh.github.io/doxygen/namespacelibMesh.html#ac42cc9a668f69fbf3514c2585986dcbe > >() > Somehow it conflicts with my code when an except

Re: [Libmesh-users] LIBMESH_ENABLE_EXCEPTIONS

2015-08-25 Thread Paul T. Bauman
On Tue, Aug 25, 2015 at 1:29 PM, Michael Povolotskyi wrote: > > How this can be done during configuration? > Pass `--disable-exceptions` during configure. For future reference, all configure options can be printed out by doing `configure --help`. HTH, Paul -