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/domain.cpp

    r2386 r2388  
    17701770   CATCH_DUMP_ATTR 
    17711771 
    1772    int CDomain::computeAttributesHash( MPI_Comm comm ) 
    1773    { 
    1774      int domain_hash = 0; 
    1775       
     1772   size_t CDomain::computeAttributesHash( MPI_Comm comm ) 
     1773   { 
    17761774     // Compute the hash of distributed attributs (value ...) 
    17771775     int globalSize = this->ni_glo.getValue()*this->nj_glo.getValue(); 
     
    17881786     // Compute the distributed hash (v0) of the element 
    17891787     // it will be associated to the default element name (= map key), and to the name really written 
    1790      int localHash = 0; 
     1788     size_t localHash = 0; 
    17911789     for (int iloc=0; iloc<localSize ; iloc++ ) localHash+=globalIndex(iloc)*lon_distributedValue(iloc)*lat_distributedValue(iloc); 
    1792      int distributedHash = 0; 
    1793      MPI_Allreduce( &localHash, &distributedHash, 1, MPI_INT, MPI_SUM, comm  ); 
     1790     size_t distributedHash = 0; 
     1791     MPI_Allreduce( &localHash, &distributedHash, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm  ); 
    17941792      
    17951793     // Compute the hash of global attributs (unit, prec ...) 
     
    18141812     excludedAttr.insert(excludedAttr.end(), { "bounds_lonvalue_unstructured_read_from_file", "bounds_latvalue_unstructured_read_from_file" }); 
    18151813      
    1816      int globalHash = this->computeGlobalAttributesHash( excludedAttr ); 
     1814     size_t globalHash = this->computeGlobalAttributesHash( excludedAttr ); 
    18171815 
    18181816     return distributedHash + globalHash; 
Note: See TracChangeset for help on using the changeset viewer.