Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a non-existing MPI_2LONG datatype to handle some corner cases in fortran
authorAugustin Degomme <augustin.degomme@imag.fr>
Mon, 7 Jul 2014 15:09:11 +0000 (17:09 +0200)
committerAugustin Degomme <augustin.degomme@imag.fr>
Mon, 7 Jul 2014 15:46:18 +0000 (17:46 +0200)
include/smpi/smpi.h
src/smpi/smpi_mpi_dt.c

index 5270ed3..330e947 100644 (file)
@@ -225,6 +225,7 @@ XBT_PUBLIC_DATA(MPI_Datatype) MPI_2INT;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_LONG_DOUBLE_INT;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_2FLOAT;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_2DOUBLE;
+XBT_PUBLIC_DATA(MPI_Datatype) MPI_2LONG;//only for compatibility with Fortran
 //for now we only send int values at max
 #define MPI_Count int
 #define MPI_COUNT MPI_INT
index bfd4b03..90572e7 100644 (file)
@@ -51,6 +51,10 @@ typedef struct {
   float value;
   float index;
 } float_float;
+typedef struct {
+  long value;
+  long index;
+} long_long;
 typedef struct {
   double value;
   double index;
@@ -114,6 +118,7 @@ CREATE_MPI_DATATYPE(MPI_SHORT_INT, short_int);
 CREATE_MPI_DATATYPE(MPI_2INT, int_int);
 CREATE_MPI_DATATYPE(MPI_2FLOAT, float_float);
 CREATE_MPI_DATATYPE(MPI_2DOUBLE, double_double);
+CREATE_MPI_DATATYPE(MPI_2LONG, long_long);
 
 CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE_INT, long_double_int);