Changeset 448


Ignore:
Timestamp:
Jan 11, 2014 1:51:31 PM (6 years ago)
Author:
kulshres
Message:

save all the final adoubles in store when finishing tracing

this is required because any adouble that isn't overwritten does
not save its taylor buffer, and the reverse sweep will give wrong
results if the taylors are wrong. Overwriting of all intermediates
is really not guarenteed.

Normally this problem didn't occur because in most examples the allocated
adouble in user code are deleted after trace_off() but if they are
all deleted before trace_off() the final state of the store will be
lost.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/taping.c

    r441 r448  
    635635    ADOLC_OPENMP_THREAD_NUMBER;
    636636    ADOLC_OPENMP_GET_THREAD_NUMBER;
    637     /* if we have adoubles in use */
    638     if (ADOLC_GLOBAL_TAPE_VARS.numLives > 0) {
     637    /* save all the final adoubles when finishing tracing */
    639638        locint loc2 = ADOLC_GLOBAL_TAPE_VARS.storeSize - 1;
    640639
     
    652651            } while (loc2-- > 0);
    653652        }
    654     }
    655653    ADOLC_CURRENT_TAPE_INFOS.traceFlag = 0;
    656654    return ADOLC_GLOBAL_TAPE_VARS.storeSize;
Note: See TracChangeset for help on using the changeset viewer.