comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Multiple threads
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Multiple threads [message #17267 is a reply to message #17130] Thu, 16 September 1999 00:00 Go to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <37E0FE2C.79095DC9@clinmed.gla.ac.uk>,
David Brennan <9147261b@clinmed.gla.ac.uk> wrote:
> My department is thinking of buying a new Sun system. We are considering
> buying a dual processor system. However, to take full advantage of this
> I need software that can be run as a multithread.
>
> 1. Can IDl be written to take advantage of multithread processing?

IDL is capable of some multiprocessing will appropriate call_externals
and link_images, but not multithreading. I've written some multiprocessing
code, but haven't ever published it, nor is it in a publishable state.
In order to do usable work you need the shared memory capabilities of
my VARRAY package (available at my web site). If you wan't I'll put my
routines somewhere where you can get to them. I haven't yet gotten any
good iplementations of IPCs beyond shared memory.

Here's a simple multiprocessing routine as an example of what I've done....

------------------------------------------------------------ ---------
function test
; create a 1024x1024 shared float array
a=VARRAY(float(0),1024,1024,/writable)
; process the [*,0:511] elements in the background
; process the [*,512:1023] elements in the foreground
if PROC_FORK() eq 0 then begin
a[*,0:511]=randomn(seed,1024,512)
PROC_EXIT
endif else begin
a[*,512:1023]=randomu(seed,1024,512)
PROC_WAIT
endelse
return,a
end
------------------------------------------------------------ -----------


> 2. If so, how is this accomplished, i.e does anyone have any example
> code?

Specialized libraries call the system code you need to make new processes.

Eric

--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href="http://sag-www.ssl.berkeley.edu/~korpela">Click for home page.</a>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Best,Fastest platform for IDL 5.2 (NT or UNIX)
Next Topic: reading in binary data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:36:43 PDT 2025

Total time taken to generate the page: 1.12444 seconds