Changeset 2388 for XIOS3/trunk/src/node
- Timestamp:
- 07/27/22 09:47:30 (2 years ago)
- Location:
- XIOS3/trunk/src/node
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/node/axis.cpp
r2386 r2388 304 304 } 305 305 306 int CAxis::computeAttributesHash( MPI_Comm comm ) 307 { 308 int axis_hash = 0; 309 306 size_t CAxis::computeAttributesHash( MPI_Comm comm ) 307 { 310 308 // Compute the hash of distributed attributs (value ...) 311 309 int globalSize = this->n_glo.getValue(); … … 319 317 gridTransformConnector->transfer(this->value, distributedValue ); 320 318 321 int localHash = 0;319 size_t localHash = 0; 322 320 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 ); 325 323 326 324 // Compute the hash of global attributs (unit, prec ...) … … 338 336 excludedAttr.push_back("mask"); // ??? 339 337 340 int globalHash = this->computeGlobalAttributesHash( excludedAttr );338 size_t globalHash = this->computeGlobalAttributesHash( excludedAttr ); 341 339 342 340 return distributedHash + globalHash; -
XIOS3/trunk/src/node/axis.hpp
r2386 r2388 130 130 void resetGeometricAttributes(void) ; 131 131 132 int computeAttributesHash( MPI_Comm comm );132 size_t computeAttributesHash( MPI_Comm comm ); 133 133 134 134 size_t getGlobalWrittenSize(void) ; -
XIOS3/trunk/src/node/domain.cpp
r2386 r2388 1770 1770 CATCH_DUMP_ATTR 1771 1771 1772 int CDomain::computeAttributesHash( MPI_Comm comm ) 1773 { 1774 int domain_hash = 0; 1775 1772 size_t CDomain::computeAttributesHash( MPI_Comm comm ) 1773 { 1776 1774 // Compute the hash of distributed attributs (value ...) 1777 1775 int globalSize = this->ni_glo.getValue()*this->nj_glo.getValue(); … … 1788 1786 // Compute the distributed hash (v0) of the element 1789 1787 // 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; 1791 1789 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 ); 1794 1792 1795 1793 // Compute the hash of global attributs (unit, prec ...) … … 1814 1812 excludedAttr.insert(excludedAttr.end(), { "bounds_lonvalue_unstructured_read_from_file", "bounds_latvalue_unstructured_read_from_file" }); 1815 1813 1816 int globalHash = this->computeGlobalAttributesHash( excludedAttr );1814 size_t globalHash = this->computeGlobalAttributesHash( excludedAttr ); 1817 1815 1818 1816 return distributedHash + globalHash; -
XIOS3/trunk/src/node/domain.hpp
r2386 r2388 91 91 bool checkAttributes_done_ = false ; 92 92 93 int computeAttributesHash( MPI_Comm comm );93 size_t computeAttributesHash( MPI_Comm comm ); 94 94 95 95 //////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.