[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Test Program
From: |
Marcus G. Daniels |
Subject: |
Re: Test Program |
Date: |
26 Mar 2000 08:39:32 -0800 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "D3" == Doug Donalson <address@hidden> writes:
D3> It starts with 0 individuals and should increase linearly over
D3> time with a slope of 10. Each time the event is executed it
D3> increments a counter which is shown on the BLT graph. It also
D3> prints a message on the console each time teh event is executed.
This is what I get with the current swarm.dll at
ftp://ftp.swarm.org/pub/swarm/binaries/w32/2.1-fixes/swarm.dll.gz
(I'm not implying there is an intended fix since fixing that leak.)
D3> What I see with the original Swarm.dll: Linear increase with
D3> slope=10. With new swarm.dll: The event is executed twice and
D3> then it isn't visited again.
I tried this on sparc-sun-solaris2.7, Windows NT 4 and 98, and I get
a line with slope 10. The only thing printed is "Individual created"
over and over again.
D3> Last, make sure
D3> you know which version of swarm.dll you are using, otherwise you
D3> could spend a bit of time wondering why the bug fixed itself! (As
D3> there are no removals from the schedule, the origional 2.1 works
D3> for this test case.)
Yes, I get the same behavior from both 2.1 and the DLLs from last night...
With 2.1 on Windows, I compiled like so:
$ make EXTRACPPFLAGS=-I/Swarm-2.1/include/kaffe EXTRAOBJCFLAGS=-Wno-error
With the new DLL, and the Action.h patch, like so:
$ make EXTRAOBJCFLAGS=-Wno-error
Finally, here are some changes I made to avoid warnings (the need for the
"EXTRAOBJCFLAGS=-Wno-error")
Did I misunderstand you?
diff -w -c -r mussel-orig/MusselModelSwarm.h mussel/MusselModelSwarm.h
*** mussel-orig/MusselModelSwarm.h Sat Mar 25 19:56:04 2000
--- mussel/MusselModelSwarm.h Sun Mar 26 09:01:12 2000
***************
*** 39,45 ****
- buildObjects;
- buildActions;
- activateIn: swarmContext;
- - (void) step;
- (void) dummy;
@end
--- 39,44 ----
diff -w -c -r mussel-orig/MusselModelSwarm.m mussel/MusselModelSwarm.m
*** mussel-orig/MusselModelSwarm.m Sat Mar 25 19:58:16 2000
--- mussel/MusselModelSwarm.m Sun Mar 26 09:01:01 2000
***************
*** 21,27 ****
getchar();
}
subSchedTime=[self makeSystemTime: time scheduleTime: &schedTime];
! subSchedId=[eventSchedule insertGroup: (id) schedTime];
[subSchedId at: subSchedTime createActionTo: self message:
M(addNewMussel)];
// printf("TIME=%f\n",time);
// printf("time=%d\n",schedTime);
--- 21,27 ----
getchar();
}
subSchedTime=[self makeSystemTime: time scheduleTime: &schedTime];
! subSchedId=[eventSchedule insertGroup: schedTime];
[subSchedId at: subSchedTime createActionTo: self message:
M(addNewMussel)];
// printf("TIME=%f\n",time);
// printf("time=%d\n",schedTime);
***************
*** 37,43 ****
-(double)getSystemTime
{
! timeval_t timeOfAction,actionAtTime;
double presentTime;
id index,groupIndex;
timeval_t nextSuperEvent,nextSubEvent;
--- 37,44 ----
-(double)getSystemTime
{
! timeval_t timeOfAction;
! id actionAtTime;
double presentTime;
id index,groupIndex;
timeval_t nextSuperEvent,nextSubEvent;
***************
*** 61,67 ****
if( counter > 0 )
{
nextSuperEvent=timeOfAction;
! nextSubEvent=[groupIndex getKey];
[groupIndex drop];
[index drop];
presentTime=(double)timeOfAction+(double)((double)nextSubEvent/precison);
--- 62,68 ----
if( counter > 0 )
{
nextSuperEvent=timeOfAction;
! nextSubEvent=(timeval_t) [groupIndex getKey];
[groupIndex drop];
[index drop];
presentTime=(double)timeOfAction+(double)((double)nextSubEvent/precison);
***************
*** 72,78 ****
}
else
{
! printf( "at time: %u action is: %0#8x\n",timeOfAction,actionAtTime
);
}
}
return -1.0;
--- 73,79 ----
}
else
{
! printf( "at time: %lu action is: %p\n",timeOfAction, actionAtTime);
}
}
return -1.0;
***************
*** 145,151 ****
id subSchedId;
timeval_t subSchedTime,schedTime;
double time;
- id index;
id concGroupType;
--- 146,151 ----
***************
*** 162,168 ****
[eventSchedule setConcurrentGroupType: concGroupType];
eventSchedule = [eventSchedule createEnd];
! subSchedId=[eventSchedule insertGroup: (id) 0];
[subSchedId at: 0 createActionTo: self message: M(dummy)];
--- 162,168 ----
[eventSchedule setConcurrentGroupType: concGroupType];
eventSchedule = [eventSchedule createEnd];
! subSchedId=[eventSchedule insertGroup: 0];
[subSchedId at: 0 createActionTo: self message: M(dummy)];
***************
*** 174,180 ****
getchar();
}
subSchedTime=[self makeSystemTime: time scheduleTime: &schedTime];
! subSchedId=[eventSchedule insertGroup: (id) schedTime];
[subSchedId at: subSchedTime createActionTo: self message:
M(addNewMussel)];
return self;
}
--- 174,180 ----
getchar();
}
subSchedTime=[self makeSystemTime: time scheduleTime: &schedTime];
! subSchedId=[eventSchedule insertGroup: schedTime];
[subSchedId at: subSchedTime createActionTo: self message:
M(addNewMussel)];
return self;
}
diff -w -c -r mussel-orig/MusselObserverSwarm.m mussel/MusselObserverSwarm.m
*** mussel-orig/MusselObserverSwarm.m Sat Mar 25 16:45:54 2000
--- mussel/MusselObserverSwarm.m Sun Mar 26 09:01:25 2000
***************
*** 26,32 ****
- buildObjects
{
- int i;
[super buildObjects];
--- 26,31 ----
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Test Program, Doug Donalson, 2000/03/25
- Re: Test Program,
Marcus G. Daniels <=