In comp.soft-sys.ptolemy, Kai Below <[EMAIL PROTECTED]> writes:

> Hi hackers,
> 
> is it possible to use more than one processor with Ptolemy for DE
> simulations?
> 
> If so, how can I do it?

In general, Ptolemy 0.x will only utilize one processor of a
multiprocessor machine.  Below are a few exceptions. 

* The PN domain uses threads, but I don't think that those threads will
utilize more than one processor

* There are a few CGC demos that use multiple processors connected via
the network, but these demos use SDF semantics and in general have
somewhat disappointing performance.  The CGC Networks of Workstations
(NOW) demos are the most recent demos.  It turns out that splitting a
simulation up so that it runs efficiently is tricky.  Also, the
latency of the network can cause problems, in general, each machine
should have a fairly large task to complete that does not require
communication with other machines.

* If you have a two processor machine, then vem and pigiRpc might end up
on their own process, though this is up to the OS.


Ptolemy II, which uses Java will run on multiple processors where that
is supported by the JDK providing native or kernel threads.

Most JDKs have green threads, which is a simple thread package
included in the JDK that does not support multiple processors.

I've been looking into this a little since Tcl Blend (the Tcl/Java
interface) requires native threads.  

I've found the following JDKs support native threads:
  JavaSoft's JDKs for Solaris
  JavaSoft's JDK for Windows seems to support native threads, but
     I'm not that up on Windows multiprocessing so I can be sure.
  Digital's JDK for Digital Unix 4.0

The following JDK's are said to support native threads, though
I have not tried them:
  Blackdown's JDK1.1.l.7 for Linux
  HP's JDK for HPUX 11. The HP JDK for HPUX 10 does _not_ support
     native threads

The ability to use multiple processors in a fairly platform
independent fashion is one of the things that got us interested in 
Java.

So you might ask where is Ptolemy II?  We are still hacking furiously
on it.  Currently, the kernel and the infrastructure that supports the 
domains is fairly stable.  Lukito Muliadi has been creating DE
applets that use the Ptolemy II infrastructure.  Steve Neuendorffer,
John Reekie and others are working hard on the GUI.  The GUI
is a large task that needs to be done right.  The rest of the group
have been working hard on their pieces as well.

I'm hoping to release a version of Ptolemy II that consists of the
just the kernel and support code in a week or two.  No domains will be
shipped at that time.

A full release is planned for mid December, it is unclear if we will
make that deadline or not, I'm working under the assumption that we
will make the deadline :-)

In the short term, you may want to try profiling your DE simulation
and look for bottlenecks.  If your DE simulation runs for a long time,
you may want to run it from within ptcl so that you lose the overhead
of the window system event loop.  You may also want to check that
you are not running out of memory and paging or swapping to disk.


-Christopher

-- 
Christopher Hylands, Ptolemy Project Manager  University of California
[EMAIL PROTECTED]                         US Mail: 558 Cory Hall #1770
ph: (510)643-9841 fax:(510)642-2739           Berkeley, CA 94720-1770
home: (510)526-4010 (if busy -4068)           (Office: 493 Cory)

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to