help-octave
[Top][All Lists]
Advanced

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

Re: exit


From: Paul Kienzle
Subject: Re: exit
Date: Fri, 25 Apr 2003 00:08:49 -0400
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212

branganj wrote:

Hello,
I'm trying to modify the octave source code with mpi.
For this I need to have MPI_Finalize(); at the end of the code.
But I'm having difficulty find the end of the code.
So far the exits I can see are exit(), clean_up_and_exit().

exit() is a libc function, which is why you can't find it.

If you wrap MPI_Finalize() in a DLD-FUNCTION, you can
register it with a call to the octave function atexit so that it
will be called when octave exits.  This you can do from your
initialization code so hopefully you don't have to modify
octave to get it to work.

If your initialization is happening in a DLD-FUNCTION,
then you will need to call atexit using something like the
following:

   octave_value_list atexitargs;
   atexitargs(0) = "MPI_Finalize";
   feval("atexit", atexitargs, 0);

Paul Kienzle
address@hidden




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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