Ignore:
Timestamp:
10/06/17 13:56:33 (4 years ago)
Author:
yushan
Message:

EP update all

File:
1 edited

Legend:

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

    r1289 r1295  
    55namespace ep_lib 
    66{ 
    7  
    8  
    97 
    108  int MPI_Comm_free(MPI_Comm *comm) 
     
    4139        Debug("comm is EP, mpi_comm_ptr != NULL\n"); 
    4240 
    43         if(comm->my_buffer != NULL) 
    44         { 
    45           if(comm->my_buffer->buf_int != NULL) delete[] comm->my_buffer->buf_int; Debug("buf_int freed\n"); 
    46           if(comm->my_buffer->buf_float != NULL) delete[] comm->my_buffer->buf_float; Debug("buf_float freed\n"); 
    47           if(comm->my_buffer->buf_double != NULL) delete[] comm->my_buffer->buf_double; Debug("buf_double freed\n"); 
    48           if(comm->my_buffer->buf_long != NULL) delete[] comm->my_buffer->buf_long; Debug("buf_long freed\n"); 
    49           if(comm->my_buffer->buf_ulong != NULL) delete[] comm->my_buffer->buf_ulong; Debug("buf_ulong freed\n"); 
    50           if(comm->my_buffer->buf_char != NULL) delete[] comm->my_buffer->buf_char; Debug("buf_char freed\n"); 
    51         } 
     41        delete comm->my_buffer; 
     42 
    5243 
    5344        if(comm->ep_barrier != NULL) 
     
    10899      Debug("comm is EP, mpi_comm_ptr != NULL\n"); 
    109100 
    110       if(comm->my_buffer != NULL) 
    111       { 
    112         if(comm->my_buffer->buf_int != NULL) delete[] comm->my_buffer->buf_int; Debug("buf_int freed\n"); 
    113         if(comm->my_buffer->buf_float != NULL) delete[] comm->my_buffer->buf_float; Debug("buf_float freed\n"); 
    114         if(comm->my_buffer->buf_double != NULL) delete[] comm->my_buffer->buf_double; Debug("buf_double freed\n"); 
    115         if(comm->my_buffer->buf_long != NULL) delete[] comm->my_buffer->buf_long; Debug("buf_long freed\n"); 
    116         if(comm->my_buffer->buf_ulong != NULL) delete[] comm->my_buffer->buf_ulong; Debug("buf_ulong freed\n"); 
    117         if(comm->my_buffer->buf_char != NULL) delete[] comm->my_buffer->buf_char; Debug("buf_char freed\n"); 
    118       } 
    119101 
    120102      if(comm->ep_barrier != NULL) 
Note: See TracChangeset for help on using the changeset viewer.