octave-maintainers
[Top][All Lists]
Advanced

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

Re: Patching Octave-MPI


From: JD Cole
Subject: Re: Patching Octave-MPI
Date: Thu, 21 Nov 2002 09:41:43 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

Andy Jacobson wrote:

"Paul" == Paul Kienzle <address@hidden> writes:

   Paul> There are a variety of approaches to parallelism which have
   Paul> been done in matlab m-files and mex-files.  E.g.,

Alex Verstak raised an interesting point last year: he said that the
MPI standard requires that MPI_Init() be fed the *original* argv and
argc.  (Yes, it is arguably a silly requirement.)  With at least MPICH
apparently, MPI_Init() would not work from a .oct file.  See:

http://www.octave.org/mailing-lists/help-octave/2001/141

Later however, Alex apparently did get it running:

http://www.octave.org/mailing-lists/help-octave/2001/218

So perhaps a .oct solution will work.

Note however that the parallelized Matlab solutions all are guided by
two facts: (1) they cannot modify the source code so the
parallelization has to work via .mex/.m files, and (2) due to the cost
of multiple Matlab licenses, there may be implicit assumptions about
how many instances are running in a given MPI application.  There may
be hidden performance issues.

It should a pretty trivial matter to determine whether or not the user
wants a parallel or traditional application when she starts octave.
Perhaps something as simple as "octave --mpi-server" or "octave
--mpi-client".  Then we call MPI_Init() (and later MPI_Finalize()) as
appropriate.  That is just about all that is required from the main
code; the rest could naturally be moved to .oct.

       Regards,

              Andy

I just created mpi_init.oct and mpi_finalize.oct, under LAM, mpi_init seems to initialize fine, however when I call the second function, mpi_finalize, I get a failure message telling me that a function has been called without a call to MPI_Init. This result is consistent with what Andy described above, however, in the LAM man page for MPI_Init it reads:

MPI mandates that the same thread must call MPI_Init or MPI_Init_thread and MPI_Finalize

This leads me to the question: Do all octave DLD functions execute in the same thread?

JD




reply via email to

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