[Developers] memory error in src/main/Parameter.c's GetBaseName()
Thomas Radke
tradke at aei.mpg.de
Fri Feb 29 05:09:31 CST 2008
David Rideout wrote:
> Hi,
>
> I have a code which runs fine in serial, but seg faults while freeing
> grid arrays when run in parallel. When I run it with memory checking
> in ddt, it shows an error at the malloc() call in GetBaseName()
> (src/main/Parameters.c line 2374):
>
> Processes 0-1:
> Memory error detected: "a previous write overwrote the reserved memory
> after the end of a memory allocation"
>
> This call to GetBaseName() arises from a call to CCTK_ParameterData()
> during BASEGRID, to get the size of an array parameter.
>
> Any ideas??
I can't see anything wrong in the calling stack CCTK_ParameterData() ->
ParameterFind() -> GetBaseName().
Like Erik, I would suspect a memory corruption earlier in the run. Do
your grid arrays maybe have a size of 0 on some processors, and there is
code not checking for that ?
--
Cheers, Thomas.
More information about the Developers
mailing list