Passing an array from IDL to MPI [message #28858] |
Sun, 13 January 2002 23:47  |
Miska Le Louarn
Messages: 8 Registered: December 1995
|
Junior Member |
|
|
Hi all IDL / parallel computing experts !
I am trying to integrate a piece of MPI-code written in C into my IDL
program.
I have a cube of data produced in the IDL code, which needs to be
Fourier transformed. So I want to write a little MPI program (in C)
which uses several CPUs to compute the FFT of each plane in the cube.
My problem is that I need to pass the data cube to the MPI program. This
would not a problem with a plain C program (a simple call_external would
do the trick), but MPI likes to be lauched with the "mpirun" command
which initializes all the parallel stuff.
Any ideas ?
Of course I could write the data cube to a file from IDL. I could then
spawn the mpirun process from IDL and have the MPI code read the file.
But I think there is a significant loss of time doing that. Plus it's
not very elegant...
I hope someone has an idea...
Thanks in advance !
Miska
PS: I am using MPICH under Linux. The C code uses FFTW.
--
* Miska Le Louarn Phone: (49) 89 320 06 908 *
* European Southern Observatory FAX : (49) 89 320 23 62 *
* Karl Schwarzschild Str. 2 e-mail: lelouarn@eso.org *
* D-85748 Garching http://www.eso.org/~lelouarn *
* Germany
*
|
|
|
|
Re: Passing an array from IDL to MPI [message #29065 is a reply to message #28858] |
Sun, 27 January 2002 20:03  |
bruhwile
Messages: 4 Registered: July 2001
|
Junior Member |
|
|
Hi Miska,
At Tech-X, we have developed prototype software that enables
parallel computing with IDL, using MPI. You can find a little
information at URL http://www.techxhome.com/products/mpidl
In our approach, you launch a light-weight application using
mpirun (or whatever script your MPI implementation uses).
Then each instance of your application brings in IDL as a
shared object, via the "callable IDL" mechanism. Processor
0 gives you an interactive IDL prompt, while the other
processors invoke IDL in a background mode.
The multiple IDL instances can now invoke IDL scripts
that call out to the MPI library of your choice, using
IDL-friendly routines that wrap the usual MPI functions
through a dynamically loadable module. We've used MPICH
under Linux and also Compaq's native MPI implementation
under Tru64 Unix.
This is perhaps a bit more than you were asking for, but
our approach will allow you to write a fully parallel
application entirely in IDL.
We have prototyped this approach under a short-term gov't
grant and shown that it works. We're now looking at
parallelizing some IDL visualization features. A supported
product won't be available for a year or so -- and then
only if we get the second phase of funding. However, if
you are interested in beta testing, then you can send a
message to mpidl-users@txcorp.com and we'll discuss it.
Cheers,
David
Miska Le Louarn <lelouarn@eso.org> wrote in message news:<3C428D26.1080405@eso.org>...
> Hi all IDL / parallel computing experts !
>
> I am trying to integrate a piece of MPI-code written in C into my IDL
> program.
> I have a cube of data produced in the IDL code, which needs to be
> Fourier transformed. So I want to write a little MPI program (in C)
> which uses several CPUs to compute the FFT of each plane in the cube.
> My problem is that I need to pass the data cube to the MPI program. This
> would not a problem with a plain C program (a simple call_external would
> do the trick), but MPI likes to be lauched with the "mpirun" command
> which initializes all the parallel stuff.
>
> Any ideas ?
> Of course I could write the data cube to a file from IDL. I could then
> spawn the mpirun process from IDL and have the MPI code read the file.
> But I think there is a significant loss of time doing that. Plus it's
> not very elegant...
>
> I hope someone has an idea...
>
> Thanks in advance !
>
> Miska
>
>
> PS: I am using MPICH under Linux. The C code uses FFTW.
|
|
|