Ignore:
Timestamp:
09/04/21 18:06:05 (4 years ago)
Author:
Mathieu Morlighem
Message:

CHG: working on integrating CoDiPack 2.0, still not working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/IoModel.cpp

    r26253 r26432  
    20652065                                scalar=pscalar;
    20662066                        }
    2067                         auto& tape_codi = IssmDouble::getGlobalTape();
     2067                        auto& tape_codi = IssmDouble::getTape();
    20682068                        tape_codi.registerInput(scalar);
    2069                         codi_global.input_indices.push_back(scalar.getGradientData());
     2069                        codi_global.input_indices.push_back(scalar.getIdentifier());
    20702070                #else
    20712071                        if(X){
     
    21382138                        #if defined(_HAVE_CODIPACK_)
    21392139                                // FIXME codi here we just assign instead of using "operator <<="
    2140                                 auto& tape_codi = IssmDouble::getGlobalTape();
     2140                                auto& tape_codi = IssmDouble::getTape();
    21412141                                if(X){
    21422142                                        for (int i=0;i<M*N;i++) {
    21432143                                                matrix[i]=X[Xcount+i];
    21442144                                                tape_codi.registerInput(matrix[i]);
    2145                                                 codi_global.input_indices.push_back(matrix[i].getGradientData());
     2145                                                codi_global.input_indices.push_back(matrix[i].getIdentifier());
    21462146                                        }
    21472147                                }
     
    21502150                                                matrix[i]=buffer[i];
    21512151                                                tape_codi.registerInput(matrix[i]);
    2152                                                 codi_global.input_indices.push_back(matrix[i].getGradientData());
     2152                                                codi_global.input_indices.push_back(matrix[i].getIdentifier());
    21532153                                        }
    21542154                                }
     
    29632963                 * -> These parameters are not read for the CoDiPack ISSM version!
    29642964                 */
    2965                 auto& tape_codi = IssmDouble::getGlobalTape();
     2965                auto& tape_codi = IssmDouble::getTape();
    29662966                tape_codi.setActive();
    29672967                #if _AD_TAPE_ALLOC_
     
    29762976                /*
    29772977                std::stringstream out_s;
    2978                 IssmDouble::getGlobalTape().printStatistics(out_s);
     2978                IssmDouble::getTape().printStatistics(out_s);
    29792979                _printf0_("StartTrace::Tape Statistics     : TapeAlloc count=[" << codi_allocn << "]\n" << out_s.str());
    29802980                */
Note: See TracChangeset for help on using the changeset viewer.