Ignore:
Timestamp:
06/12/18 14:21:57 (6 years ago)
Author:
yushan
Message:

add modif for workflow_cmip6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_reduce.cpp

    r1527 r1540  
    124124        } 
    125125 
    126         else if(datatype == MPI_UINT64_T) 
    127         { 
    128           assert(datasize == sizeof(uint64_t)); 
    129           for(int i=1; i<num_ep; i++) 
    130             reduce_max<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count); 
    131         } 
    132          
    133126        else if(datatype == MPI_LONG_LONG_INT) 
    134127        { 
     
    138131        } 
    139132 
    140         else printf("datatype Error\n"); 
    141  
    142       } 
    143  
    144       if(op == MPI_MIN) 
     133        else  
     134        { 
     135          printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 
     136          MPI_Abort(comm, 0); 
     137        } 
     138 
     139      } 
     140 
     141      else if(op == MPI_MIN) 
    145142      { 
    146143        if(datatype ==MPI_INT) 
     
    186183        } 
    187184 
    188         else if(datatype == MPI_UINT64_T) 
    189         { 
    190           assert(datasize == sizeof(uint64_t)); 
    191           for(int i=1; i<num_ep; i++) 
    192             reduce_min<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count); 
    193         } 
    194          
    195185        else if(datatype == MPI_LONG_LONG_INT) 
    196186        { 
     
    200190        } 
    201191 
    202         else printf("datatype Error\n"); 
    203  
    204       } 
    205  
    206  
    207       if(op == MPI_SUM) 
     192        else  
     193        { 
     194          printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 
     195          MPI_Abort(comm, 0); 
     196        } 
     197 
     198      } 
     199 
     200 
     201      else if(op == MPI_SUM) 
    208202      { 
    209203        if(datatype==MPI_INT) 
     
    247241          for(int i=1; i<num_ep; i++) 
    248242            reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 
    249         } 
    250  
    251         else if(datatype ==MPI_UINT64_T) 
    252         { 
    253           assert(datasize == sizeof(uint64_t)); 
    254           for(int i=1; i<num_ep; i++) 
    255             reduce_sum<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count); 
    256243        } 
    257244         
     
    263250        } 
    264251 
    265         else printf("datatype Error\n"); 
    266  
    267       } 
    268  
    269       if(op == MPI_LOR) 
     252        else  
     253        { 
     254          printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 
     255          MPI_Abort(comm, 0); 
     256        } 
     257 
     258      } 
     259 
     260      else if(op == MPI_LOR) 
    270261      { 
    271262        if(datatype != MPI_INT) 
     
    277268            reduce_lor<int>(static_cast<int*>(comm->my_buffer->void_buffer[i]), static_cast<int*>(recvbuf), count); 
    278269        } 
     270      } 
     271       
     272      else 
     273      { 
     274        printf("op type Error in ep_reduce : MPI_MAX, MPI_MIN, MPI_SUM, MPI_LOR\n"); 
     275        MPI_Abort(comm, 0); 
    279276      } 
    280277    } 
Note: See TracChangeset for help on using the changeset viewer.