Re: Passing an array from IDL to MPI [message #28852] |
Mon, 14 January 2002 06:03  |
Mark Rivers
Messages: 49 Registered: February 2000
|
Member |
|
|
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.
You might want to consider another solution to obtain rapid 2-D FFTs taking
advantage of multiple CPUs. This is to use the Intel Math Kernal Library
(MKL) routines. These are free, highly optimized for Intel CPUs, and take
advantage of multiple CPUs if they are present. I have written tomography
reconstruction code that is accessed via CALL_EXTERNAL from IDL, and uses
this library. The MKL speeded things up a factor of 3-4 compared to non-MKL
FFT routines. The latest version of the MKL is available for Linux as well
as Windows.
Mark Rivers
|
|
|
|
Re: Passing an array from IDL to MPI [message #28962 is a reply to message #28855] |
Mon, 21 January 2002 07:41  |
Miska Le Louarn
Messages: 8 Registered: December 1995
|
Junior Member |
|
|
> I have written an IDL interface to PVM (another parallel processing system)
> so it is possible to do. PVM must also be initialized with a function call
> that returns some parameters. You then spawn off the child processes with
> these parameters as part of the call.
>
> What this means is that you have to write a multi-function dll that contains
> all the interface routines that you need.
Hmm, this looks interesting...
Could you give a 2 line example on how to do this ? :-)
For the moment, I know how to use call externals and spawns. What is, in
this case, the big advantage of using DLLs ?
Thanks !
Miska
--
* 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 #28963 is a reply to message #28852] |
Mon, 21 January 2002 07:38  |
Miska Le Louarn
Messages: 8 Registered: December 1995
|
Junior Member |
|
|
>
> You might want to consider another solution to obtain rapid 2-D FFTs taking
> advantage of multiple CPUs. This is to use the Intel Math Kernal Library
> (MKL) routines. These are free, highly optimized for Intel CPUs, and take
> advantage of multiple CPUs if they are present. I have written tomography
> reconstruction code that is accessed via CALL_EXTERNAL from IDL, and uses
> this library. The MKL speeded things up a factor of 3-4 compared to non-MKL
> FFT routines. The latest version of the MKL is available for Linux as well
> as Windows.
>
Yes, that is a solution. Another one is to use IDL 5.5 which includes
some parallel processing support (FFT is threaded).
MKL is also nice but not really portable. Even AMD processors (which
provide a cheaper way to build fairly fast machines) are not MKL
compatible...
However, these approaches allow "only" a gain of a factor of 2 with
"cheap architectures". More than 2 CPUs on one motherboard is usually
really expensive.
I was planning to use 5-10 CPUs, so threading is not really an option.
Thanks for your help thought.
Miska
--
* 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
*
|
|
|