Index: ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h =================================================================== --- ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h (revision 22582) +++ ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h (revision 22583) @@ -84,13 +84,17 @@ #define ISSM_MPI_ANY_TAG 2 #define ISSM_MPI_ANY_SOURCE 3 /*}}}*/ -# endif +#endif +/*Dynamically return ISSM_MPI type from variable type */ template ISSM_MPI_Datatype TypeToMPIType(){assert(false);}; template <> inline ISSM_MPI_Datatype TypeToMPIType(){return ISSM_MPI_DOUBLE;}; +#ifdef _HAVE_ADOLC_ template <> inline ISSM_MPI_Datatype TypeToMPIType(){return ISSM_MPI_PDOUBLE;}; +#endif template <> inline ISSM_MPI_Datatype TypeToMPIType(){return ISSM_MPI_INT;}; template <> inline ISSM_MPI_Datatype TypeToMPIType(){return ISSM_MPI_CHAR;}; + template int ISSM_MPI_Bcast(T *buffer, int count,int root, ISSM_MPI_Comm comm){ /*{{{*/ int rc=0; @@ -117,7 +121,6 @@ #endif return rc; }/*}}}*/ - /* interfaces {{{*/ int ISSM_MPI_Allgather(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcount, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm); int ISSM_MPI_Allgatherv(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm);