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

Re: IDL with multiple processors



In article <3667038C.1474744F@lanl.gov>,
David M. Schmidt <dschmidt@lanl.gov> wrote:
>We recently tested the speed of a non-graphical, numerical IDL code run
>on two different Linux systems.  The system with 2 350 MHz processors
>and SDRAM was about the same speed or a bit slower than the system with
>1 233 MHz processor and EDORAM.

IDL is pretty much single threaded.  If you've got two processors, it's up
to you to use 'em.  You'd be suprised what you can do if you try.....
This works under sunos... (you need to write your own kill proceedure,
though.  That's not too hard.)

pid=call_external("/usr/lib/libc.so.1.9","_fork") ; your libc name may vary
if pid then begin
  do some processing
  kill,pid
endif else begin
  do some other processing
  dummy=call_external("/usr/lib/libc.so.1.9","_wait")
endelse

You can even use the "varray" package at my web site for interprocess
communication. (Otherwise changes to variables in one process do not
affect the other process.)  

I don't suppose RSI would be willing to add fork, kill, and wait to the
language. :)  It's also probably illegal to use fork on a machine with
a floating license.

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>