Changeset 1339
- Timestamp:
- 11/21/17 13:42:35 (7 years ago)
- Location:
- XIOS/dev/branch_openmp
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/remap/src/mapper.cpp
r1338 r1339 243 243 int *nbRecvElement = new int[mpiSize]; 244 244 MPI_Alltoall(nbSendElement, 1, MPI_INT, nbRecvElement, 1, MPI_INT, communicator); 245 245 246 246 247 /* communicate indices of source elements on other ranks whoes value and gradient we need (since intersection) */ … … 315 316 MPI_Issend(sendValue[rank], nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]); 316 317 nbSendRequest++; 317 MPI_Issend(sendArea[rank], nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);318 MPI_Issend(sendArea[rank], nbRecvElement[rank], MPI_DOUBLE, rank, 1, communicator, &sendRequest[nbSendRequest]); 318 319 nbSendRequest++; 319 320 if (order == 2) 320 321 { 321 MPI_Issend(sendGrad[rank], 3*nbRecvElement[rank]*(NMAX+1), MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);322 MPI_Issend(sendGrad[rank], 3*nbRecvElement[rank]*(NMAX+1), MPI_DOUBLE, rank, 2, communicator, &sendRequest[nbSendRequest]); 322 323 nbSendRequest++; 323 MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank]*(NMAX+1), MPI_INT, rank, 0, communicator, &sendRequest[nbSendRequest]);324 MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank]*(NMAX+1), MPI_INT, rank, 3, communicator, &sendRequest[nbSendRequest]); 324 325 //ym --> attention taille GloId 325 326 nbSendRequest++; … … 327 328 else 328 329 { 329 MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank], MPI_INT, rank, 0, communicator, &sendRequest[nbSendRequest]);330 MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank], MPI_INT, rank, 4, communicator, &sendRequest[nbSendRequest]); 330 331 //ym --> attention taille GloId 331 332 nbSendRequest++; … … 336 337 MPI_Irecv(recvValue[rank], nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]); 337 338 nbRecvRequest++; 338 MPI_Irecv(recvArea[rank], nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);339 MPI_Irecv(recvArea[rank], nbSendElement[rank], MPI_DOUBLE, rank, 1, communicator, &recvRequest[nbRecvRequest]); 339 340 nbRecvRequest++; 340 341 if (order == 2) 341 342 { 342 MPI_Irecv(recvGrad[rank], 3*nbSendElement[rank]*(NMAX+1), MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);343 MPI_Irecv(recvGrad[rank], 3*nbSendElement[rank]*(NMAX+1), MPI_DOUBLE, rank, 2, communicator, &recvRequest[nbRecvRequest]); 343 344 nbRecvRequest++; 344 MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank]*(NMAX+1), MPI_INT, rank, 0, communicator, &recvRequest[nbRecvRequest]);345 MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank]*(NMAX+1), MPI_INT, rank, 3, communicator, &recvRequest[nbRecvRequest]); 345 346 //ym --> attention taille GloId 346 347 nbRecvRequest++; … … 348 349 else 349 350 { 350 MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank], MPI_INT, rank, 0, communicator, &recvRequest[nbRecvRequest]);351 MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank], MPI_INT, rank, 4, communicator, &recvRequest[nbRecvRequest]); 351 352 //ym --> attention taille GloId 352 353 nbRecvRequest++; -
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_alltoall.cpp
r1295 r1339 59 59 delete[] tmp_sendbuf; 60 60 } 61 62 MPI_Barrier(comm); 61 63 62 64 return 0; -
XIOS/dev/branch_openmp/inputs/REMAP/iodef.xml
r1338 r1339 58 58 <field field_ref="dst_field_2D_regular_pole" name="field_dst_regular_2" enabled=".TRUE."/> 59 59 <field field_ref="dst_field_2D_clone" name="field_dst_regular_3" detect_missing_value=".false." default_value="100000" enabled=".FALSE."/> 60 <field field_ref="dst_field_2D_extract" name="field_dst_regular_4" enabled=". FALSE."/>60 <field field_ref="dst_field_2D_extract" name="field_dst_regular_4" enabled=".TRUE."/> 61 61 </file> 62 62 <file id="output_3D" name="output_3D" enabled=".TRUE."> … … 68 68 <file id="output_4D" name="output_4D" enabled=".TRUE."> 69 69 <field field_ref="src_field_4D" name="field_4D" /> 70 <field field_ref="dst_field_4D_extract" name="field_4D_extract" enabled=". FALSE."/>70 <field field_ref="dst_field_4D_extract" name="field_4D_extract" enabled=".TRUE."/> 71 71 </file> 72 72 </file_group> -
XIOS/dev/branch_openmp/src/transformation/Functions/reduction.cpp
r1328 r1339 9 9 10 10 CReductionAlgorithm::CallBackMap* CReductionAlgorithm::reductionCreationCallBacks_ = 0; 11 //std::map<StdString,EReductionType> CReductionAlgorithm::ReductionOperations = std::map<StdString,EReductionType>();12 11 std::map<StdString,EReductionType> *CReductionAlgorithm::ReductionOperations_ptr = 0; 13 12 … … 52 51 53 52 //bool CReductionAlgorithm::_dummyInit = CReductionAlgorithm::initReductionOperation(CReductionAlgorithm::ReductionOperations); 54 bool CReductionAlgorithm::_dummyInit = CReductionAlgorithm::initReductionOperation();53 //bool CReductionAlgorithm::_dummyInit = CReductionAlgorithm::initReductionOperation(); 55 54 56 55 CReductionAlgorithm* CReductionAlgorithm::createOperation(EReductionType reduceType) -
XIOS/dev/branch_openmp/src/transformation/Functions/reduction.hpp
r1331 r1339 16 16 namespace xios { 17 17 18 /*! 18 /*! 19 19 \class CReductionAlgorithm 20 20 Interface for all reduction alogrithms. -
XIOS/dev/branch_openmp/src/transformation/axis_algorithm_extract_domain.cpp
r1328 r1339 13 13 #include "grid.hpp" 14 14 #include "grid_transformation_factory_impl.hpp" 15 #include "reduction.hpp"16 15 17 16 namespace xios { … … 62 61 63 62 pos_ = algo->position; 64 //reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 63 if(CReductionAlgorithm::ReductionOperations_ptr == 0) 64 { 65 CReductionAlgorithm::initReductionOperation(); 66 } 65 67 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations_ptr->at(op)); 66 68 } -
XIOS/dev/branch_openmp/src/transformation/axis_algorithm_extract_domain.hpp
r1328 r1339 13 13 #include "transformation.hpp" 14 14 15 #include "reduction.hpp" 15 16 namespace xios { 16 17 … … 25 26 Extract a domain to an axis 26 27 */ 27 class CAxisAlgorithmExtractDomain : public CAxisAlgorithmTransformation 28 class CAxisAlgorithmExtractDomain : public CAxisAlgorithmTransformation, public CReductionAlgorithm 28 29 { 29 30 public: -
XIOS/dev/branch_openmp/src/transformation/axis_algorithm_reduce_domain.cpp
r1328 r1339 13 13 #include "grid.hpp" 14 14 #include "grid_transformation_factory_impl.hpp" 15 #include "reduction.hpp"16 15 17 16 namespace xios { … … 70 69 71 70 dir_ = (CReduceDomainToAxis::direction_attr::iDir == algo->direction) ? iDir : jDir; 72 //reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 71 if(CReductionAlgorithm::ReductionOperations_ptr == 0) 72 { 73 CReductionAlgorithm::initReductionOperation(); 74 } 73 75 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations_ptr->at(op)); 74 76 } -
XIOS/dev/branch_openmp/src/transformation/axis_algorithm_reduce_domain.hpp
r1328 r1339 12 12 #include "axis_algorithm_transformation.hpp" 13 13 #include "transformation.hpp" 14 #include "reduction.hpp" 14 15 15 16 namespace xios { … … 24 25 Reduce a domain to an axis 25 26 */ 26 class CAxisAlgorithmReduceDomain : public CAxisAlgorithmTransformation 27 class CAxisAlgorithmReduceDomain : public CAxisAlgorithmTransformation, public CReductionAlgorithm 27 28 { 28 29 public: -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_extract_axis.cpp
r1328 r1339 14 14 #include "grid_transformation_factory_impl.hpp" 15 15 16 #include "reduction.hpp"17 16 18 17 namespace xios { … … 49 48 StdString op = "extract"; 50 49 pos_ = algo->position; 51 //reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 50 if(CReductionAlgorithm::ReductionOperations_ptr == 0) 51 { 52 CReductionAlgorithm::initReductionOperation(); 53 } 52 54 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations_ptr->at(op)); 53 55 } -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_extract_axis.hpp
r1328 r1339 12 12 #include "scalar_algorithm_transformation.hpp" 13 13 #include "transformation.hpp" 14 #include "reduction.hpp" 14 15 15 16 namespace xios { … … 24 25 Extract a scalar from an axis 25 26 */ 26 class CScalarAlgorithmExtractAxis : public CScalarAlgorithmTransformation 27 class CScalarAlgorithmExtractAxis : public CScalarAlgorithmTransformation, public CReductionAlgorithm 27 28 { 28 29 public: -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_reduce_axis.cpp
r1334 r1339 13 13 #include "grid.hpp" 14 14 #include "grid_transformation_factory_impl.hpp" 15 #include "reduction.hpp"16 15 17 16 namespace xios { … … 73 72 } 74 73 74 if(CReductionAlgorithm::ReductionOperations_ptr == 0) 75 { 76 CReductionAlgorithm::initReductionOperation(); 77 } 78 75 79 //if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op)) 76 if ( CReductionAlgorithm::ReductionOperations_ptr->end() == CReductionAlgorithm::ReductionOperations_ptr->find(op))80 if ((*CReductionAlgorithm::ReductionOperations_ptr).end() == (*CReductionAlgorithm::ReductionOperations_ptr).find(op)) 77 81 ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToScalar* algo)", 78 82 << "Operation '" << op << "' not found. Please make sure to use a supported one" … … 81 85 82 86 //reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 83 reduction_ = CReductionAlgorithm::createOperation( CReductionAlgorithm::ReductionOperations_ptr->at(op));87 reduction_ = CReductionAlgorithm::createOperation((*CReductionAlgorithm::ReductionOperations_ptr)[op]); 84 88 } 85 89 -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_reduce_axis.hpp
r1328 r1339 12 12 #include "scalar_algorithm_transformation.hpp" 13 13 #include "transformation.hpp" 14 #include "reduction.hpp" 14 15 15 16 namespace xios { … … 24 25 Reducing an axis to a scalar 25 26 */ 26 class CScalarAlgorithmReduceAxis : public CScalarAlgorithmTransformation 27 class CScalarAlgorithmReduceAxis : public CScalarAlgorithmTransformation, public CReductionAlgorithm 27 28 { 28 29 public: -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_reduce_domain.cpp
r1328 r1339 14 14 #include "grid_transformation_factory_impl.hpp" 15 15 16 #include "reduction.hpp"17 16 18 17 namespace xios { … … 69 68 } 70 69 71 // if(CReductionAlgorithm::ReductionOperations_ptr == 0) 72 // CReductionAlgorithm::initReductionOperation(); 70 if(CReductionAlgorithm::ReductionOperations_ptr == 0) 71 { 72 CReductionAlgorithm::initReductionOperation(); 73 } 73 74 74 75 //if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op)) -
XIOS/dev/branch_openmp/src/transformation/scalar_algorithm_reduce_domain.hpp
r1328 r1339 12 12 #include "scalar_algorithm_transformation.hpp" 13 13 #include "transformation.hpp" 14 #include "reduction.hpp" 14 15 15 16 namespace xios { … … 24 25 Reducing an DOMAIN to a scalar 25 26 */ 26 class CScalarAlgorithmReduceDomain : public CScalarAlgorithmTransformation 27 class CScalarAlgorithmReduceDomain : public CScalarAlgorithmTransformation, public CReductionAlgorithm 27 28 { 28 29 public:
Note: See TracChangeset
for help on using the changeset viewer.