Changeset 23281


Ignore:
Timestamp:
09/13/18 11:56:29 (7 years ago)
Author:
Mathieu Morlighem
Message:

NEW: CoDiPack now works with 1 cpu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/controladm1qn3_core.cpp

    r23268 r23281  
    241241        #elif defined(_HAVE_CODIPACK_)
    242242        auto& tape_codi = IssmDouble::getGlobalTape();
     243        codi_global.input_indices.clear();
    243244        if(my_rank==0){
    244245                for (int i=0;i<intn;i++) {
     
    280281        /*Go through our dependent variables, and compute the response:*/
    281282        dependents=xNew<IssmPDouble>(num_dependents);
     283        #if defined(_HAVE_CODIPACK_)
     284        codi_global.output_indices.clear();
     285        #endif
    282286        for(int i=0;i<dependent_objects->Size();i++){
    283287                DependentObject* dep=(DependentObject*)dependent_objects->GetObjectByOffset(i);
     
    385389                auto in_size = codi_global.input_indices.size();
    386390                for(size_t i = 0; i < in_size; ++i) {
     391                        _assert_(i<num_independents);
    387392                        weightVectorTimesJac[i] = tape_codi.getGradient(codi_global.input_indices[i]);
    388393                }
Note: See TracChangeset for help on using the changeset viewer.