MASON-INTEREST-L Archives

January 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 12 Jan 2016 14:54:32 +0100
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=windows-1252
From:
Axel Kowald <[log in to unmask]>
Parts/Attachments:
text/plain (25 lines)
Hi Sean,
okay, I converted now one of my simulations to run with ParallelSequence
and basically I can say:

It runs, but the single threaded version is twice as fast as the version
with four threads ! :-(
Maybe that's because I have many removals and insertions of agents. I
don't now.
I used setUsesSets(true), which makes things faster, but not as fast as
the single threaded version.

While doing this I also discovered a bug in loadStepsSet() of Sequence.
At the end of the method the line
steps = (Steppable[]) (stepsHash.toArray(steps));
has to be changed to something like
steps = (Steppable[]) (stepsHash.toArray(Arrays.copyOfRange(steps, 0, 1)));
because we must make sure that the size of the passed Steppable[] is
smaller than the number of elements in stepsHash, otherwise the length
of the new steps is wrong. What a mad behaviour of toArray()  !!

Anyway, I think for the future I will stick to single threaded
simulations :-)

axel

ATOM RSS1 RSS2