Ignore:
Timestamp:
06/06/17 15:12:34 (7 years ago)
Author:
yushan
Message:

test_remap OK with openmp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/transformation/scalar_algorithm_reduce_axis.cpp

    r1153 r1155  
    1313#include "grid.hpp" 
    1414#include "grid_transformation_factory_impl.hpp" 
    15 #include "reduction.hpp" 
    16  
    17 #include "reduction.hpp" 
    1815 
    1916namespace xios { 
     17 
     18//extern std::map<StdString,EReductionType> *CReductionAlgorithm::ReductionOperations_ptr;  
     19//#pragma omp threadprivate(CReductionAlgorithm::ReductionOperations_ptr) 
     20 
    2021CGenericAlgorithmTransformation* CScalarAlgorithmReduceAxis::create(CGrid* gridDst, CGrid* gridSrc, 
    2122                                                                     CTransformation<CScalar>* transformation, 
     
    7576  } 
    7677   
    77   //if ((*CReductionAlgorithm::ReductionOperations_ptr).end() == (*CReductionAlgorithm::ReductionOperations_ptr).find(op)) 
    78   //  if ((CReductionAlgorithm::ReductionOperations_ptr)->end() == (CReductionAlgorithm::ReductionOperations_ptr)->find(op)) 
    79   //  ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToScalar* algo)", 
    80   //     << "Operation '" << op << "' not found. Please make sure to use a supported one" 
    81   //     << "Axis source " <<axisSource->getId() << std::endl 
    82   //     << "Scalar destination " << scalarDestination->getId()); 
     78  if(CReductionAlgorithm::ReductionOperations_ptr == 0)  
     79    CReductionAlgorithm::initReductionOperation(); 
     80   
     81  if ((*CReductionAlgorithm::ReductionOperations_ptr).end() == (*CReductionAlgorithm::ReductionOperations_ptr).find(op)) 
     82    ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToScalar* algo)", 
     83       << "Operation '" << op << "' not found. Please make sure to use a supported one" 
     84       << "Axis source " <<axisSource->getId() << std::endl 
     85       << "Scalar destination " << scalarDestination->getId()); 
    8386 
    8487  reduction_ = CReductionAlgorithm::createOperation((*CReductionAlgorithm::ReductionOperations_ptr)[op]); 
Note: See TracChangeset for help on using the changeset viewer.