source: issm/oecreview/Archive/21724-22754/ISSM-22582-22583.diff@ 22755

Last change on this file since 22755 was 22755, checked in by Mathieu Morlighem, 7 years ago

CHG: added 21724-22754

File size: 1.4 KB
RevLine 
[22755]1Index: ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h
2===================================================================
3--- ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h (revision 22582)
4+++ ../trunk-jpl/src/c/toolkits/mpi/issmmpi.h (revision 22583)
5@@ -84,13 +84,17 @@
6 #define ISSM_MPI_ANY_TAG 2
7 #define ISSM_MPI_ANY_SOURCE 3
8 /*}}}*/
9-# endif
10+#endif
11
12+/*Dynamically return ISSM_MPI type from variable type */
13 template <class T> ISSM_MPI_Datatype TypeToMPIType(){assert(false);};
14 template <> inline ISSM_MPI_Datatype TypeToMPIType<IssmDouble>(){return ISSM_MPI_DOUBLE;};
15+#ifdef _HAVE_ADOLC_
16 template <> inline ISSM_MPI_Datatype TypeToMPIType<IssmPDouble>(){return ISSM_MPI_PDOUBLE;};
17+#endif
18 template <> inline ISSM_MPI_Datatype TypeToMPIType<int>(){return ISSM_MPI_INT;};
19 template <> inline ISSM_MPI_Datatype TypeToMPIType<char>(){return ISSM_MPI_CHAR;};
20+
21 template <class T> int ISSM_MPI_Bcast(T *buffer, int count,int root, ISSM_MPI_Comm comm){ /*{{{*/
22
23 int rc=0;
24@@ -117,7 +121,6 @@
25 #endif
26 return rc;
27 }/*}}}*/
28-
29 /* interfaces {{{*/
30 int ISSM_MPI_Allgather(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcount, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm);
31 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);
Note: See TracBrowser for help on using the repository browser.