[ADMB Users] Error reading -- should _ be got _
CHRIS GRANDIN
cgrandin at shaw.ca
Fri Sep 14 08:26:41 PDT 2012
Mollie, this is caused by the following code which is found in three different ADMB source files,
/df1b2-separable/df1b2f10.cpp, /df1b2-separable/df1b2f13.cpp, and /df1b2-separable/df1b2f14.cpp \
// get the record size
::read(fp,&nbytes,sizeof(int));
if (nbytes>bufsize)
{
cerr << "Error -- record size in file seems to be larger than"
" the buffer it was created from " << endl
<< " buffer size is " << bufsize << " record size is supposedly "
<< nbytes << endl;
ad_exit(1);
}
// now read the record into the buffer
unsigned int nr=::read(fp,buffer,nbytes);
if (nr != nbytes)
{
cerr << "Error reading -- should be " << nbytes << " got " << nr << endl;
exit(1);
}
where fp is a 'file pointer'. Without knowing details I suggest you search the files (records) and see if you can find the value 2431504288, this is what the function expected to read in (and the value itself is read in by the function) but the actual data only amounted to 1647288308. Not sure how to fix this, but it should get you headed in the right direction.
Chris
Chris Grandin
Pacific Biological Station,
Nanaimo, BC
Canada
----- Original Message -----
From: "Mollie Brooks" <mbrooks at ufl.edu>
To: "users at admb-project.org Group" <users at admb-project.org>
Sent: Thursday, September 13, 2012 9:14:11 AM
Subject: [ADMB Users] Error reading -- should _ be got _
Hi ADMB users,
I'm encountering an error that I don't know how to debug.
Error reading -- should be 2431504288 got 1647288308
It happened in a random effects model shortly after the first output of
Inner f = 24.4191
Newton raphson 1
I ran the model again and got the exact same numbers "should be 2431504288 got 1647288308" so I don't think they're garbage.
Can anyone tell me what to do about this?
thanks,
Mollie
Mollie Brooks
Postdoctoral Researcher, Ponciano Lab
Biology Department, University of Florida
http://people.biology.ufl.edu/mbrooks
_______________________________________________
Users mailing list
Users at admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
More information about the Users
mailing list