swarm-support
[Top][All Lists]
Advanced

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

archiver questions:


From: Paul E. Johnson
Subject: archiver questions:
Date: Sun, 04 Jun 2000 14:49:54 -0500

1. What does this mean?  I tried in a ModelSwarm to archive parameters
with a simple:
{
  char buf[5 + DSIZE (unsigned) + 1];

  if (getCurrentTime() < 10) return self;
  sprintf (buf, "model%03u", (unsigned int) getCurrentTime());
  [archiver putShallow: buf object: self];
  return self;
}

and got this:

$ ./asm
BFParams init complete*** event raised for error: SaveError
*** function: insert_var(), file:
/usr/local/src/redhat/BUILD/swarm-2.1.1.20000523/src/defobj/HDF5Object.m,
line: 368
cannot store objects in compound types*** execution terminating due to
error
/usr/local/src/redhat/BUILD/swarm-2.1.1.20000523/src/defobj/Symbol.m:173
-[Error(c) _raiseEvent:]
Aborted (core dumped)

Please define "compound types".

I don't get this same error with the LispArchiver. it outputs #f for
classes and lists and such that aren't numbers, as in:
    (make-instance 'ASMModelSwarm #:internalZone #f #:syncType #f
#:activity #f #:numBFagents 30 #:initholding 1.000000F0 #:initialcash
10000.000000D0 #:minholding 0.000000D0 #:mincash 0.000000D0 #:intrate
0.100000D0 #:baseline 10.000000D0 #:mindividend 0.000050D0 #:maxdividend
100.000000D0 #:amplitude 0.141780D0 #:period 0 #:maxprice 500.000000D0
#:minprice 0.001000D0 #:taup 50.000000D0 #:exponentialMAs #t #:sptype 2
#:maxiterations 10 #:minexcess 0.010000D0 #:eta 0.000500D0 #:etamax
0.050000D0 #:etamin 0.000010D0 #:rea 9.000000D0 #:reb 2.000000D0
#:randomSeed 0 #:tauv 50.000000D0 #:lambda 0.300000D0 #:maxbid
10.000000D0 #:initvar 0.400021D0 #:maxdev 100.000000D0 #:warmupActions
#f #:periodActions #f #:warmupSchedule #f #:periodSchedule #f
#:startupSchedule #f #:initPeriodSchedule #f #:agentList #f #:specialist
#f #:dividendProcess #f #:world #f #:output #f #:setOutputForData #f
#:archiver #f))


Since I don't know how to program in Lisp, my idea was to output this
same thing to an hdf5 program, and then save it in text format from
there in the way I need it to go into other programs. Bad idea?

2. How can I select which IVARS get written by the HDF5Archiver--i.e.,
exclude the compound types?

3. I can't understand why the SwarmDocs have no protocol called
"HDF5Archiver" but it is used in swarmapps.

4. Since the swarm kernel creates the global object "hdf5Archiver" why
would one want to create more instances of that object in their own
classes?

5. There is nothing wrong, is there, with having several classes
archivers write into the same data file? (suppose you just want a record
of parameters for model runs and parameters are spread across many
classes).

6. Can you tell me something about how the OutputStream class is used? 
I don't remember noticing it before.  I have a feeling it is what I
ought to use instead of archiver, since I can just pick which variables
to output.  I also need to know if stderr is a possible value for stream
in the methods of the various Archiver classes like this one:   

- lispOutShallow: (id <OutputStream>)stream 

It would be nice to use stderr sometimes...
-- 
Paul E. Johnson                         email: address@hidden
Dept. of Political Science              http://lark.cc.ukans.edu/~pauljohn
University of Kansas                    Office: (785) 864-9086
Lawrence, Kansas 66045                  FAX: (785) 864-5700

                  ==================================
   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.



reply via email to

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