[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
outfile
From: |
Doug Donalson |
Subject: |
outfile |
Date: |
Mon, 20 Apr 1998 23:59:18 -0700 |
Hi Guys,
I just put together my batch swarm addition and I came up with a
couple
of problems/solutions. To save file space I changes the double fprint
so that it didn't print 10,000 zeros. (All right, a slight
exaggeration.)
It occured to me that it would be nice if the Active Graph file output
matched
the type of the calling function. I thought about this briefly but the
solution is
not simple. Maybe I'll work on it later.
A wish higher on the list is an fflush() on the file buffer. This gives
the simulatee
a window into the progress of the sim when not using graphics. Right
now
at least to 10K the buffer doesn't dump until simulation termination.
I stuck a fflush() in as seen below but got a very supprising result.
All the displays started flashing at a high rate and the program
basically
quit running. Now I have used fflush() in many other programs, and a
high
calling rate might slow the program down, but never anything like this.
Any suggestions? (I know, a little knowledge is dangerous.)
Cheers,
D3
- putDouble: (double)aDouble
{
//fprintf(theFile, "%+24.16e", aDouble);
fprintf(theFile, "%5.3f", aDouble);
//fflush(theFile);
return self;
}
==================================
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.
==================================
- outfile,
Doug Donalson <=