Ignore:
Timestamp:
06/18/18 20:32:55 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1544

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/transformation/domain_algorithm_interpolate.cpp

    r1540 r1545  
    88 */ 
    99#include "domain_algorithm_interpolate.hpp" 
    10 #include <boost/unordered_map.hpp> 
     10#include <unordered_map> 
    1111#include "context.hpp" 
    1212#include "context_client.hpp" 
     
    406406  CContext* context = CContext::getCurrent(); 
    407407  CContextClient* client=context->client; 
    408   //int mykey; 
    409   //ep_lib::MPI_Comm_rank(client->intraComm, &mykey); 
    410408 
    411409  ep_lib::MPI_Comm poleComme = MPI_COMM_NULL; 
    412410  ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, 0, &poleComme); 
    413   //ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, mykey, &poleComme); 
    414   //if (!poleComme.is_null()) 
    415411  if (poleComme!=MPI_COMM_NULL) 
    416412  { 
     
    540536  TransformationWeightMap& transWeight = this->transformationWeight_[0]; 
    541537 
    542   boost::unordered_map<size_t,int> globalIndexOfDomainDest; 
     538  std::unordered_map<size_t,int> globalIndexOfDomainDest; 
    543539  int ni = domainDest_->ni.getValue(); 
    544540  int nj = domainDest_->nj.getValue(); 
     
    816812  WriteNetCdf *netCdfWriter; 
    817813 
    818 //  #pragma omp barrier 
    819 //  #pragma omp master 
     814 
    820815  MPI_Barrier_local(client->intraComm); 
    821816  if(my_rank_loc==0) 
     
    843838  } 
    844839   
    845 //  #pragma omp barrier 
     840 
    846841  MPI_Barrier_local(client->intraComm); 
    847842   
     
    863858  MPI_Barrier_local(client->intraComm); 
    864859   
    865 //  #pragma omp barrier 
    866   cout<<"end write weight info"<< endl; 
     860 
    867861} 
    868862 
     
    953947       renormalizationFactor=1 ; 
    954948     } 
    955       
     949 
    956950    if (firstPass) 
    957951    { 
     
    969963      else 
    970964      { 
    971         dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;    
     965        dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second; 
     966        allMissing(localIndex[idx].first) = allMissing(localIndex[idx].first) && false; // Reset flag to indicate not all data source are nan 
    972967      } 
    973968    } 
     
    999994      if (renormalizationFactor.numElements()>0) dataOut/=renormalizationFactor ; // In some case, process doesn't received any data for interpolation (mask) 
    1000995                                                                                 // so renormalizationFactor is not initialized 
    1001     }     
    1002   } 
    1003 } 
    1004  
    1005 } 
     996    } 
     997  } 
     998} 
     999 
     1000} 
Note: See TracChangeset for help on using the changeset viewer.