[ADMB Users] Memory Dump while running an admb program
dave fournier
davef at otter-rsch.com
Thu Jan 6 03:43:01 PST 2011
Jared Blashka wrote:
You are walking out of the array LogKi at the line
dvar_vector LogKisel=LogKi(dset);
in your program. The safe version of the function
dvar_vector dvar_vector::operator ()(_CONST ivector& u)
in the function at the top of the file fvar_a32.cpp does not check for
this.
It should be changed to soemthing like
dvar_vector dvar_vector::operator ()(_CONST ivector& u)
{
{
dvar_vector tmp(u.indexmin(),u.indexmax());
# if (defined(OPT_LIB))
for (int i=u.indexmin();i<=u.indexmax();i++)
{
tmp.elem_value(i)=elem_value(u(i));
}
# else
for (int i=u.indexmin();i<=u.indexmax();i++)
{
value(tmp(i))=value((*this)(u(i)));
}
# endif
etc.
> I've tried compiling it both ways, safe and not, both give me the same
> issue. Here's the cpp file.
>
> Jared
More information about the Users
mailing list