Ignore:
Timestamp:
12/08/17 11:48:59 (4 years ago)
Author:
yushan
Message:

unify type : MPI_Op

Location:
XIOS/dev/branch_openmp/extern/src_ep_dev
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_declaration.cpp

    r1365 r1368  
    9595ep_lib::MPI_Datatype MPI_UNSIGNED_CHAR = &MPI_UNSIGNED_CHAR_STD; 
    9696 
    97 ep_lib::MPI_Op MPI_SUM = MPI_SUM_STD; 
    98 ep_lib::MPI_Op MPI_MAX = MPI_MAX_STD; 
    99 ep_lib::MPI_Op MPI_MIN = MPI_MIN_STD; 
     97ep_lib::MPI_Op MPI_SUM = &MPI_SUM_STD; 
     98ep_lib::MPI_Op MPI_MAX = &MPI_MAX_STD; 
     99ep_lib::MPI_Op MPI_MIN = &MPI_MIN_STD; 
    100100 
    101101ep_lib::MPI_Comm MPI_COMM_WORLD(&MPI_COMM_WORLD_STD); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_intercomm_kernel.cpp

    r1365 r1368  
    524524    } 
    525525 
    526     MPI_Allreduce(&new_bcast_root_0, &new_bcast_root, 1, MPI_INT, static_cast< ::MPI_Op>(MPI_SUM), *newintercomm); 
     526    MPI_Allreduce(&new_bcast_root_0, &new_bcast_root, 1, MPI_INT, MPI_SUM, *newintercomm); 
    527527 
    528528 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp

    r1365 r1368  
    243243MPI_Op to_mpi_op(ep_lib::MPI_Op op) 
    244244{ 
    245   return static_cast< MPI_Op >(op); 
     245  return *static_cast< MPI_Op* >(op); 
    246246} 
    247247 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.hpp

    r1365 r1368  
    1111namespace ep_lib 
    1212{ 
    13 //#ifdef _intelmpi 
    1413  typedef void* MPI_Datatype; 
    15   typedef int MPI_Op; 
    16 //  #define EP_ANY_SOURCE -2  
    17 //  #define EP_ANY_TAG -1  
    18 //#elif _openmpi 
    19 //  typedef void* MPI_Datatype; 
    20 //  typedef void* MPI_Op; 
    21 //  #define EP_ANY_SOURCE -1  
    22 //  #define EP_ANY_TAG -1  
    23 //#endif 
     14  typedef void* MPI_Op; 
    2415 
    2516  int MPI_Init_thread(int* argc, char*** argv, int required, int*provided); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib_collective.hpp

    r1365 r1368  
    44namespace ep_lib 
    55{ 
    6   #ifdef _intelmpi 
    7   typedef void* MPI_Datatype; 
    8   typedef int MPI_Op; 
    9   #elif _openmpi 
     6 
    107  typedef void* MPI_Datatype; 
    118  typedef void* MPI_Op; 
    12   #endif 
     9 
    1310 
    1411  int MPI_Barrier(MPI_Comm comm); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib_intercomm.hpp

    r1365 r1368  
    44namespace ep_lib 
    55{ 
    6   #ifdef _intelmpi 
    7   typedef void* MPI_Datatype; 
    8   typedef int MPI_Op; 
    9   #elif _openmpi 
     6 
    107  typedef void* MPI_Datatype; 
    118  typedef void* MPI_Op; 
    12   #endif 
     9 
    1310   
    1411  int MPI_Comm_dup_intercomm(MPI_Comm comm, MPI_Comm *newcomm); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib_local.hpp

    r1365 r1368  
    44namespace ep_lib 
    55{ 
    6   #ifdef _intelmpi 
    7   typedef void* MPI_Datatype; 
    8   typedef int MPI_Op; 
    9   #elif _openmpi 
     6 
    107  typedef void* MPI_Datatype; 
    118  typedef void* MPI_Op; 
    12   #endif 
     9 
    1310 
    1411  int MPI_Reduce_local       (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int local_root, MPI_Comm comm); 
Note: See TracChangeset for help on using the changeset viewer.