[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Seg fault after 2 days of simulation
From: |
Jan Kreft |
Subject: |
Re: Seg fault after 2 days of simulation |
Date: |
Fri, 15 Oct 1999 14:53:13 +0100 (BST) |
Tried to send this off yesterday, but didn't get through somehow. Second
try now. Apologies if you got this already.
Dear Marcus,
On 13 Oct 1999, Marcus G. Daniels wrote:
> >>>>> "JK" == Jan Kreft <address@hidden> writes:
>
> JK> BTW, would be better as an array of BOOL instead of char, does
> JK> anyone know if that's possible?
>
> You'd have to use bit shift operations and masking to do that, e.g.
> "value |= (1 << offset)", "value &= ~(1 << offset)". It's usually not
> worth it unless the sequences are really big. If the sequences have
> *known* top-end size, you can allocate an ivar of sequence-size / 8 or
> use the ": size" bitfield syntax.
>
> Btw, I really want to get away from use of raw memory in Swarm. These
> nasty consequences to unexpected allocation requirements are way too
> nasty. Even with a lot of experience and good tools, debugging memory
> corruption problems can be a big time sink that ends up teaching you
> nothing (except the benefits of obsessive behavior). This bug
> wouldn't have occurred if you were using the Java layer, because you'd
> have used automatically sized and garbage collected Strings.
I would love such automatically sized strings. But, and this is a long
but, my sims already run for about 2 days, and I plan to go to 3D next
year, probably slowing them down to a standstill. Or possibly include
hydrodynamics. In other words, soon I'll have to use some sort of
supercomputer to run my models, and that will mean going to pure C rather
than Java from Objective C. Preemptively, I have made this years
additions to BacSim as close to C as I could within the limits imposed by
the existing code. Not that I'm proud of it, but I see no other way. I
looked around for something like Java for Cray, but all I found was very
experimental support for SMP in Java, and certainly no Java for Cray. HP
Fortran would be even better, I suppose, but I've never used Fortran, so
that's above my league. Given the current focus of Swarm development, I
doubt Swarm on Cray will be ready when I would need it.
Cheers, Jan.
==================================
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.
- Re: Seg fault after 2 days of simulation, Jan Kreft, 1999/10/13
- Re: Seg fault after 2 days of simulation,
Jan Kreft <=
- Re: Seg fault after 2 days of simulation, Marcus G. Daniels, 1999/10/17
- Swarm Performance Topics (was Re: Seg fault after 2 days of simulation, Paul Johnson, 1999/10/18
- Re: Swarm Performance Topics (was Re: Seg fault after 2 days of simulation, Marcus G. Daniels, 1999/10/18
- SSTRDUP & memory management; file i/o tests and related, William S. Shu, 1999/10/18
- Re: SSTRDUP & memory management; file i/o tests and related, Marcus G. Daniels, 1999/10/18
- Re: SSTRDUP & memory management; file i/o tests and related, William S. Shu, 1999/10/18
- Re: Seg fault after 2 days of simulation, Jan Kreft, 1999/10/18
- Re: Seg fault after 2 days of simulation, Marcus G. Daniels, 1999/10/18