Changeset 17669


Ignore:
Timestamp:
04/08/14 10:29:27 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removing template that makes AD mpi off crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h

    r17665 r17669  
    8989template <> inline ISSM_MPI_Datatype TypeToMPIType<int>(){return ISSM_MPI_INT;};
    9090template <> inline ISSM_MPI_Datatype TypeToMPIType<char>(){return ISSM_MPI_CHAR;};
    91 template <class T> ISSM_MPI_Datatype ISSM_MPI_Reduce(T *sendbuf,T *recvbuf,int count,ISSM_MPI_Op op, int root, ISSM_MPI_Comm comm){ /*{{{*/
    92 
    93         /*Get MPI type*/
    94         ISSM_MPI_Datatype datatype = TypeToMPIType<T>();
    95 
    96         int rc=0;
    97 #ifdef _HAVE_MPI_
    98 # ifdef _HAVE_AMPI_
    99         rc=AMPI_Reduce(sendbuf,
    100                                 recvbuf,
    101                                 count,
    102                                 datatype,
    103                                 op,
    104                                 root,
    105                                 comm);
    106 # else
    107         rc=MPI_Reduce(sendbuf,
    108                                 recvbuf,
    109                                 count,
    110                                 datatype,
    111                                 op,
    112                                 root,
    113                                 comm);
    114 # endif
    115 #else
    116 # ifdef _HAVE_ADOLC_
    117         if (datatype==ISSM_MPI_DOUBLE) {
    118                 IssmDouble* activeSendBuf=(IssmDouble*)sendbuf;
    119                 IssmDouble* activeRecvBuf=(IssmDouble*)recvbuf;
    120                 for(int i=0;i<count;++i) activeRecvBuf[i]=activeSendBuf[i];
    121         }
    122         else
    123 # endif
    124          memcpy(recvbuf,sendbuf,sizeHelper(datatype)*count);
    125 #endif
    126         return rc;
    127 }/*}}}*/
    12891template <class T> int ISSM_MPI_Bcast(T *buffer, int count,int root, ISSM_MPI_Comm comm){  /*{{{*/
    12992
Note: See TracChangeset for help on using the changeset viewer.