swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] crash at odd timestep


From: Paul Johnson
Subject: Re: [Swarm-Support] crash at odd timestep
Date: Tue, 12 Feb 2008 17:18:26 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Corinne Coen wrote:
Dear paul,
Your suggestion to use gdb (with a short explanation) was very helpful.
Although I had to use a few commands other commands before I could call
bt
(e.g., file ./bug, run, bt), I was able to successful find the list that
was
emptying in GUI mode.  Problem fixed.

Unfortunately, I have been unable to do the same for my batch mode.
Despite
going through BatchSwarm.m carefully, I cannot find any list or array
that
doesn't function.  I cannot figure out how to use a "batch" command in
gdb.
(Gdb does not recognize "batch").

Any suggestions?
Corinne

YES.

run gdb as usual,

# gdb ./myprogram

after it starts, then you add the command line options with the set args

> set args -b

for example will give only the -b option.

Note well, if there is some randomness in your design, then it is probably wise to fix the random seed so the model runs the same every time. If lists are getting shuffled, you are screwed.

You can do that by the command line option -S 234234, so you'd need

> set args -b -S234w234

Then, before you type "run", also set some break points at lines in your code that seem like good check points

> break BatchSwarm.m:55

to stop at line 55.

After that, when you type "run", then you use "n" or "s" or "c" as usually, and you can use the usual print commands to examine objects.

pj

--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

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