[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Compiling a model on Swarm 2.2 [Pietro Terna's CD ve
From: |
Marcus G. Daniels |
Subject: |
Re: [Swarm-Support] Compiling a model on Swarm 2.2 [Pietro Terna's CD version] |
Date: |
Tue, 10 Aug 2004 07:46:02 -0600 |
User-agent: |
Mozilla Thunderbird 0.7.3 (Windows/20040803) |
Gary Polhill wrote:
On Swarm 2.1.1 (Windows 2K) and Swarm 2.2 (Windows XP) I have an issue with
message forwarding, which I used in one of my classes (subclassed from Swarm).
I have fixed this by reimplementing all the methods and not using forwarding at
all, but it would be useful to hear some confirmation that I shouldn't expect
message forwarding to work in these environments.
In the source distribution, the file tests/defobj/forwarding.m gives an
example of how it should work. I think it has worked no the past.
Java models rely on it for a variety of things. There have been
portability problems with supporting `mframe' code on various
platforms. mframe may get replaced with code from GNUstep to avoid
these problems, but that hasn't been done yet.
On Swarm 2.2 (Windows XP) I was calling a class method of a subclass of the
Object class before initSwarm() gets called in main.m. I then got a core dump
with the error message:
assertion "__objc_class_hash" failed: file "/src/Swarm/swarm/libobjc/class.c"
line 130
Moving the class method call to after initSwarm() is called fixed this. It
would be useful to have confirmation that it's not a good idea to do any method
calls before calling initSwarm() (or one of its variations).
For MacOS X, the initialization sequence of the Objective C runtime was
modified to have two phases, and this will indeed happen if you do
Objective C things before initSwarm.
From gdb, it was clear that this was choking on a piece of code in the
parameters.scm file that said:
#:winnerCoord <2,2>
You could code your serialization methods to use
'(2,2)
..that would be more Lispy.
and (ii) is there any chance the error messages could be a bit more helpful? I
spent ages trying to track down this problem!
Some of those aborts are in general purpose subfunctions, so code would
have to be restructured to return error codes (and all of the callers
changed to provide context-dependent messages). I guess if I were to
work on this code I'd add new serialization code to do XML. At the time
the Lisp stuff was written, XML hadn't really caught-on yet. Also, you
could try using the HDF5 code. It tends to have more diagnostic code
and error messages. To use it to manage parameter settings, it's
necessary to use another program like R (or smaller Swarm-based
programs) to handle reading and writing of the HDF5 files.
Btw, you might want to try the new Cygwin installer for Swarm:
http://www.santafe.edu/projects/swarm/cygwin/setup.exe
This doesn't put things in /Swarm-2.2 anymore, but in /usr. The build
is from newer Swarm code and using newer Cygwin tools. However, it does
not yet have Java support.