Changeset 2663


Ignore:
Timestamp:
10/25/24 08:59:55 (3 months ago)
Author:
jderouillat
Message:

Fix the ordering of the interpolation's weights to ensure reproductibilty of interpolation between compute or read modes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS2/trunk/src/transformation/domain_algorithm_interpolate.cpp

    r2511 r2663  
    579579    }       
    580580  }       
     581 
     582  std::map<int, std::vector<double> > transWeightOrdered(transWeight.begin(), transWeight.end()); 
     583  transWeight.clear(); 
     584  std::map<int, std::vector<double> >::const_iterator itWeightO = transWeightOrdered.begin(); 
     585  for(; itWeightO!=transWeightOrdered.end() ; ++itWeightO) { 
     586      transWeight[itWeightO->first] = itWeightO->second; 
     587  } 
     588 
     589  std::map<int, std::vector<int> > transMapOrdered(transMap.begin(), transMap.end()); 
     590  transMap.clear(); 
     591  std::map<int, std::vector<int> >::const_iterator itMapO = transMapOrdered.begin(); 
     592  for(; itMapO!=transMapOrdered.end() ; ++itMapO) { 
     593      transMap[itMapO->first] = itMapO->second; 
     594  } 
    581595} 
    582596CATCH 
     
    790804  } 
    791805   
     806  std::map<int, std::vector<double> > transWeightOrdered(transWeight.begin(), transWeight.end()); 
     807  transWeight.clear(); 
     808  std::map<int, std::vector<double> >::const_iterator itWeightO = transWeightOrdered.begin(); 
     809  for(; itWeightO!=transWeightOrdered.end() ; ++itWeightO) { 
     810      transWeight[itWeightO->first] = itWeightO->second; 
     811  } 
     812 
     813  std::map<int, std::vector<int> > transMapOrdered(transMap.begin(), transMap.end()); 
     814  transMap.clear(); 
     815  std::map<int, std::vector<int> >::const_iterator itMapO = transMapOrdered.begin(); 
     816  for(; itMapO!=transMapOrdered.end() ; ++itMapO) { 
     817      transMap[itMapO->first] = itMapO->second; 
     818  } 
     819   
    792820  MPI_Waitall(sendRequest.size(), &sendRequest[0], MPI_STATUS_IGNORE); 
    793821 
Note: See TracChangeset for help on using the changeset viewer.