Ignore:
Timestamp:
07/27/22 09:47:30 (2 years ago)
Author:
jderouillat
Message:

Manage hash values with size_t in hash tables of elements associated to output files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/node/axis.cpp

    r2386 r2388  
    304304   } 
    305305 
    306    int CAxis::computeAttributesHash( MPI_Comm comm ) 
    307    { 
    308      int axis_hash = 0; 
    309       
     306   size_t CAxis::computeAttributesHash( MPI_Comm comm ) 
     307   { 
    310308     // Compute the hash of distributed attributs (value ...) 
    311309     int globalSize = this->n_glo.getValue(); 
     
    319317     gridTransformConnector->transfer(this->value, distributedValue ); 
    320318         
    321      int localHash = 0; 
     319     size_t localHash = 0; 
    322320     for (int iloc=0; iloc<localSize ; iloc++ ) localHash+=globalIndex(iloc)*distributedValue(iloc); 
    323      int distributedHash = 0; 
    324      MPI_Allreduce( &localHash, &distributedHash, 1, MPI_INT, MPI_SUM, comm  ); 
     321     size_t distributedHash = 0; 
     322     MPI_Allreduce( &localHash, &distributedHash, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm  ); 
    325323 
    326324     // Compute the hash of global attributs (unit, prec ...) 
     
    338336     excludedAttr.push_back("mask"); // ??? 
    339337 
    340      int globalHash = this->computeGlobalAttributesHash( excludedAttr ); 
     338     size_t globalHash = this->computeGlobalAttributesHash( excludedAttr ); 
    341339 
    342340     return distributedHash + globalHash; 
Note: See TracChangeset for help on using the changeset viewer.