Changeset 23352
- Timestamp:
- 09/28/18 11:17:13 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h
r23280 r23352 18 18 #ifdef _HAVE_MPI_ 19 19 /*Include header files: {{{*/ 20 #if def _HAVE_AMPI_21 #if def _HAVE_ADJOINTMPI_20 #if defined(_HAVE_AMPI_) 21 #if defined(_HAVE_ADJOINTMPI_) 22 22 #include <ampi_tape.hpp> 23 24 #elif defined(_HAVE_MEDIPACK_) 25 #include "medi/medi.hpp" 26 using namespace medi; 27 #include "medi/codiMediPackTypes.hpp" 28 #if defined(_HAVE_CODIPACK_) 29 #define TOOL CoDiPackTool<IssmDouble> 30 #define AMPI_ADOUBLE TOOL::MPI_TYPE 31 #elif defined(_HAVE_ADOLC_) 32 #include "adolc/medipacksupport.h" 33 #define TOOL AdolcTool 34 #else 35 #error "don't know about AD tool" 36 #endif 37 23 38 #else 24 39 #include <ampi/ampi.h> … … 31 46 /*}}}*/ 32 47 /*MPI defines: *{{{*/ 48 33 49 // types 50 #if defined(_HAVE_MEDIPACK_) 51 typedef AMPI_Comm ISSM_MPI_Comm; 52 typedef AMPI_Datatype ISSM_MPI_Datatype; 53 typedef AMPI_Op ISSM_MPI_Op; 54 typedef AMPI_Status ISSM_MPI_Status; 55 #else 34 56 typedef MPI_Comm ISSM_MPI_Comm; 35 57 typedef MPI_Datatype ISSM_MPI_Datatype; 36 58 typedef MPI_Op ISSM_MPI_Op; 37 59 typedef MPI_Status ISSM_MPI_Status; 60 #endif 38 61 39 // data types 40 #define ISSM_MPI_CHAR MPI_CHAR 41 #if defined(_HAVE_AMPI_) 42 #define ISSM_MPI_DOUBLE AMPI_ADOUBLE // corresponds to IssmDouble 43 #else 44 #define ISSM_MPI_DOUBLE MPI_DOUBLE // corresponds to IssmDouble 62 #if defined(_HAVE_MEDIPACK_) 63 #define ISSM_MPI_CHAR AMPI_CHAR 64 #define ISSM_MPI_DOUBLE AMPI_ADOUBLE // corresponds to IssmDouble 65 #define ISSM_MPI_PDOUBLE AMPI_DOUBLE // corresponds to IssmPDouble 66 #define ISSM_MPI_INT AMPI_INT 67 68 // operations 69 #define ISSM_MPI_MAX AMPI_MAX 70 #define ISSM_MPI_MIN AMPI_MIN 71 #define ISSM_MPI_PROD AMPI_PROD 72 #define ISSM_MPI_SUM AMPI_SUM 73 74 // others 75 #define ISSM_MPI_COMM_WORLD AMPI_COMM_WORLD 76 #define ISSM_MPI_STATUS_IGNORE AMPI_STATUS_IGNORE 77 #define ISSM_MPI_ANY_TAG AMPI_ANY_TAG 78 #define ISSM_MPI_ANY_SOURCE AMPI_ANY_SOURCE 79 80 #else 81 #if defined(_HAVE_AMPI_) 82 #define ISSM_MPI_DOUBLE AMPI_ADOUBLE // corresponds to IssmDouble 83 #else 84 #define ISSM_MPI_DOUBLE MPI_DOUBLE // corresponds to IssmDouble 85 #endif 86 #define ISSM_MPI_PDOUBLE MPI_DOUBLE // corresponds to IssmPDouble 87 #define ISSM_MPI_INT MPI_INT 88 #define ISSM_MPI_CHAR MPI_CHAR 89 90 // operations 91 #define ISSM_MPI_MAX MPI_MAX 92 #define ISSM_MPI_MIN MPI_MIN 93 #define ISSM_MPI_PROD MPI_PROD 94 #define ISSM_MPI_SUM MPI_SUM 95 96 // others 97 #define ISSM_MPI_COMM_WORLD MPI_COMM_WORLD 98 #define ISSM_MPI_STATUS_IGNORE MPI_STATUS_IGNORE 99 #define ISSM_MPI_ANY_TAG MPI_ANY_TAG 100 #define ISSM_MPI_ANY_SOURCE MPI_ANY_SOURCE 45 101 #endif 46 #define ISSM_MPI_PDOUBLE MPI_DOUBLE // corresponds to IssmPDouble47 #define ISSM_MPI_INT MPI_INT48 49 // operations50 #define ISSM_MPI_MAX MPI_MAX51 #define ISSM_MPI_MIN MPI_MIN52 #define ISSM_MPI_PROD MPI_PROD53 #define ISSM_MPI_SUM MPI_SUM54 55 // others56 #define ISSM_MPI_COMM_WORLD MPI_COMM_WORLD57 #define ISSM_MPI_STATUS_IGNORE MPI_STATUS_IGNORE58 #define ISSM_MPI_ANY_TAG MPI_ANY_TAG59 #define ISSM_MPI_ANY_SOURCE MPI_ANY_SOURCE60 102 61 103 /*other include files: */
Note:
See TracChangeset
for help on using the changeset viewer.