swarm-modeling
[Top][All Lists]
Advanced

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

Re: parallelism


From: Darren Schreiber
Subject: Re: parallelism
Date: Mon, 27 Mar 2000 23:19:29 -0800

In my voting model, I've implemented a virtual parallelism (let me know if
this is actually concurrency, since I'm unclear of the difference) though I
don't yet know enough to make it actual.

Agents do the following:
  1. I look for my closest neighboring agent in the issue space
  2. Report my identity to my closest agent
  3. Form a coalition if I am my closest agent's closest agent

Since each agent can implement each action in each time step with only the
knowledge of the other agent's actions in the previous time step, the code
is virtually parallel.

I know it is simple, but it might be illustrative to others who haven't
seen ways to conceptually parallelism their models.  Also, since there is
plenty of reason to be concerned about who does what when and potential
artifacts that arise from such scheduling issues, I thought it worthwhile
to describe one solution.

I also wonder if the command structure [agentList doSomething] doesn't lure
the beginning Swarm programmer into thinking that the code is somehow
executing in parallel?  For a beginner, it is far from obvious that these
instructions are implemented sequentially.

Since we are on the topic... I recently put together a parallel processing
demo in about _10 minutes_ with the MacOS.  All you need is two or more G3
or G4 computers and an ethernet cable.  It worked great and cost about $7
in parts (I borrowed my girlfriend's iBook).  The Message-Passing Interface
(MPI) with MacOS looks really easy to use.

You can get the info and instructions at:
http://exodus.physics.ucla.edu/appleseed/appleseed.html

If you have a couple of Macs, it is definitely worth the effort.  However,
I'm not ready to abandon Swarm and try to rewrite my own code in the MacOS.


        Darren


>At 01:07 AM 3/28/00 +0100, you wrote:
>>Does any capacity for parallel processing exist in Swarm at
>>the moment?  Surely the ability to execute schedules
>>concurrently enables some degree of parallelism?
>
>Yep!  You're right!  Swarm is at least as parallelizable as any
>C program.  All one need do is wrap up some socket calls or some
>thread primitives, or use MPI or PVM to distribute runs.
>
>The concurrency of the Activity library does help in this
>regard because it helps the modeler *think* concurrently, which
>would help in parallelization of a model.  (But, you have to
>realize that just because our interface claims concurrency, does
>not mean that we're claiming parallelism.  In fact, by telling
>two actions to run concurrently, you're only saying that they
>aren't dependent on each other....you're not actually specifying
>how their sequentiality.... only their dependency.)
>
>But, that's as far as we go, yet, to help the modeler write a
>parallel model.  And many of our users, don't have the
>programming or systems background that allows them to use
>the underlying features of C to parallelize their models.
>
>So, when we talk about "adding parallelism", we're really talking
>about adding higher level functionality to assist our community
>in writing parallel models.  So, the proper way to say it is
>that "We don't yet *support* parallelism beyond the logical
>model of concurrency."
>
>glen
>
>--
>glen e. p. ropella =><= The front line is everywhere. Hail Eris!
>Home: http://forager.swarm.com/~gepr              (505) 424-0448
>Work: http://www.swarm.com                        (505) 995-0818
>
>
>                  ==================================
>   Swarm-Modelling is for discussion of Simulation and Modelling techniques
>   esp. using Swarm.  For list administration needs (esp. [un]subscribing),
>   please send a message to <address@hidden> with "help" in the
>   body of the message.
>                  ==================================


_____________________________________________

                 Darren Schreiber
                  Attorney at Law
                 Graduate Student
             Political Science, UCLA
                address@hidden
        http://www.bol.ucla.edu/~dschreib


                  ==================================
   Swarm-Modelling is for discussion of Simulation and Modelling techniques
   esp. using Swarm.  For list administration needs (esp. [un]subscribing),
   please send a message to <address@hidden> with "help" in the
   body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]