[ADMB Users] Non-matching analytic and numeric derivatives

dave fournier davef at otter-rsch.com
Tue Oct 21 06:58:49 PDT 2014


  A few issues.

    I did not intend to present a "final solution" to your
    problem.

    What I did intend to do was to illustrate how overall
    stability of the model could be improved by modifying
    the objective function in phases.  Then I hoped that
    you and others could incorporate the techniques into
    their bag of tricks.  So for example one could use 3
    phases and add an even smaller offset in the third phase.

     As for buffer sizes there are two issues.  One is
     specifying the offset into a >2GB buffer.  That has
     to be a type > 32 bits. In 64 bit windows it seems that
     a long int is only 32 bits and mingw64 has followed this
     for windows compatibility.  A long long int will do the
     job but there are other types which can be used. I always
     forget what they are.

     Then there is the question of writing the buffer to the
     disk when it is full. I used a low level unbuffered
     write function, assuming at the time that it would be
     the fastest method.  However the amount that can be
     written in one write operation is limited.  On my Linux
     system it appears to be 2GB.  So one can either split up
     the write operations or switch to higher level fwrites.
     For the model in question here I used a buffer > 3.5 GB
     which was large enough that nothing needed to be written
     to the disk. This works because in 64 bit Linux a long
     int is 64 bits.





More information about the Users mailing list