Re: Gadget-2.0.5?

From: Volker Springel <volker_at_MPA-Garching.MPG.DE>
Date: Mon, 08 Mar 2010 21:09:41 +0100

On 03/06/2010 03:00 AM, Chris Orban wrote:
>
> Hi,
> Does anyone understand the justification for the slight change
> between Gadget-2.0.4 and Gadget-2.0.5? As far as I can tell
> pm_periodic.c is the only file that's changed.
>
> diff pm_periodic.c ../../Gadget-2.0.3/Gadget2/pm_periodic.c
> 548c548
> < slab_z < meshmax_list[3 * recvTask + 2] + 4; slab_z++)
> ---
>> slab_z <= meshmax_list[3 * recvTask + 2] + 4; slab_z++)
> 1056c1056
> < slab_z < meshmax_list[3 * recvTask + 2] + 4; slab_z++)
> ---
>> slab_z <= meshmax_list[3 * recvTask + 2] + 4; slab_z++)
>
>

Hi Chris,

this was actually a bug fix (based on a typo). The "<" is correct in
this loop, without it, one superfluous element beyond the end of the
forcegrid[] is copied. Under special conditions this can cause a crash
of the code.

Actually, I had fixed this bug already in 2005 in all versions of
gadget, but for inexplicable reasons I somehow managed to not include it
(or overwrite it again) in the distribution file of gadget2.

Volker
Received on 2010-03-08 21:09:46

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST