Re: "Share data with external processes" [message #7768 is a reply to message #7762] |
Thu, 16 January 1997 00:00   |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <32DE6333.63EA@larc.nasa.gov>, Ken Stone <k.a.stone@larc.nasa.gov> writes:
|> Hello,
|>
|> Does anyone know of a fast way to transfer a large array (say
|> fltarr(2000)) from another process? My first thought was to write the
|> data to a file, and then read it back into IDL. But time is of
|> a critical nature in this case. Then I found CALL_EXTERNAL, but it
|> seems to only return a scalar (Is that true?). LINKIMAGE now looks
|> like the way to go. Has anyone had any luck using LINKIMAGE to pass
|> around arrays like this? What _is_ the best way to "share data with
|> external processes"? (I put that in quotes because it's in the RSI
|> advertisement for IDL. :-))
|>
|> Thanks,
|>
|> Ken
|>
As long as you allocate the arrays to store the result before the call,
you can use call_external to transfer large amounts of data
back and forth as well, i.e.:
transfer = fltarr(2000)
dummy = call_external(....,...,transfer)
plot,transfer
You should perhaps take a look at the IDL RPC (remote procedure call)
library as well - one advantage is that you can actually run your
external routines on a different machine, so you could in effect have
parallel processing as well! I've used this once to make IDL (run as
an RPC server process) visualize data while calculations were made by
a program on another machine.
I believe you can have IDL running as either a master or slave process,
though I've never tried the former.
Stein Vidar
|
|
|