Skip to content
Snippets Groups Projects
Commit b07df8ad authored by ESCOBAR MUNOZ Juan's avatar ESCOBAR MUNOZ Juan Committed by WAUTELET Philippe
Browse files

Juan 25/01/2016: add support for MPI_LOGICAL & correc some typo message

parent dc950847
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,10 @@ MNH_LIC for details. version 1. ...@@ -22,8 +22,10 @@ MNH_LIC for details. version 1.
#ifdef FUJI #ifdef FUJI
#if MNH_INT == 8 #if MNH_INT == 8
#define SIZEINTEGER 8 #define SIZEINTEGER 8
#define SIZELOGICAL 8
#else #else
#define SIZEINTEGER 4 #define SIZEINTEGER 4
#define SIZELOGICAL 4
#endif #endif
#define SIZEPRECISION 8 #define SIZEPRECISION 8
#define SIZE2PRECISION 16 #define SIZE2PRECISION 16
...@@ -45,7 +47,7 @@ static int initflag = 0; /* ADDON Didier */ ...@@ -45,7 +47,7 @@ static int initflag = 0; /* ADDON Didier */
void disppass(fct) void disppass(fct)
char *fct; char *fct;
{ {
/* printf("Passage dans %s \n", fct); */ /* printf("MPIVIDE::Passage dans %s \n", fct); */
} }
#pragma weak mpi_cart_sub__ = mpi_cart_sub #pragma weak mpi_cart_sub__ = mpi_cart_sub
...@@ -111,7 +113,7 @@ void mpi_alltoallv(void *sendbuf, int *sendcounts, ...@@ -111,7 +113,7 @@ void mpi_alltoallv(void *sendbuf, int *sendcounts,
int *rdispls, int *recvtype, int *comm, int *__ierr) int *rdispls, int *recvtype, int *comm, int *__ierr)
{ {
int size = SIZE2PRECISION; int size = SIZE2PRECISION;
disppass("allgatherv"); disppass("alltoallv");
switch(*sendtype) switch(*sendtype)
{ {
case MPI_INTEGER: case MPI_INTEGER:
...@@ -126,6 +128,9 @@ void mpi_alltoallv(void *sendbuf, int *sendcounts, ...@@ -126,6 +128,9 @@ void mpi_alltoallv(void *sendbuf, int *sendcounts,
case MPI_DOUBLEDOUBLE: case MPI_DOUBLEDOUBLE:
size = SIZE_DOUBLEDOUBLE; size = SIZE_DOUBLEDOUBLE;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*recvcounts)*size); memcpy(recvbuf, sendbuf, (*recvcounts)*size);
...@@ -173,6 +178,9 @@ int *__ierr; ...@@ -173,6 +178,9 @@ int *__ierr;
case MPI_DOUBLEDOUBLE: case MPI_DOUBLEDOUBLE:
size = SIZE_DOUBLEDOUBLE; size = SIZE_DOUBLEDOUBLE;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*recvcounts)*size); memcpy(recvbuf, sendbuf, (*recvcounts)*size);
*__ierr = 0; *__ierr = 0;
...@@ -194,7 +202,7 @@ int *comm; ...@@ -194,7 +202,7 @@ int *comm;
int *__ierr; int *__ierr;
{ {
int size = SIZE2PRECISION; int size = SIZE2PRECISION;
disppass("allgather"); disppass("gather");
switch(*sendtype) switch(*sendtype)
{ {
case MPI_INTEGER: case MPI_INTEGER:
...@@ -212,6 +220,9 @@ int *__ierr; ...@@ -212,6 +220,9 @@ int *__ierr;
case MPI_DOUBLE: case MPI_DOUBLE:
size = 8 ; size = 8 ;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*recvcount)*size); memcpy(recvbuf, sendbuf, (*recvcount)*size);
...@@ -250,6 +261,9 @@ int *__ierr; ...@@ -250,6 +261,9 @@ int *__ierr;
case MPI_DOUBLEDOUBLE: case MPI_DOUBLEDOUBLE:
size = SIZE_DOUBLEDOUBLE; size = SIZE_DOUBLEDOUBLE;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*recvcounts)*size); memcpy(recvbuf, sendbuf, (*recvcounts)*size);
...@@ -336,6 +350,9 @@ int *__ierr; ...@@ -336,6 +350,9 @@ int *__ierr;
case MPI_DOUBLEDOUBLE: case MPI_DOUBLEDOUBLE:
size = SIZE_DOUBLEDOUBLE; size = SIZE_DOUBLEDOUBLE;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*recvcount)*size); memcpy(recvbuf, sendbuf, (*recvcount)*size);
...@@ -407,6 +424,9 @@ int *__ierr; ...@@ -407,6 +424,9 @@ int *__ierr;
case MPI_DOUBLE: case MPI_DOUBLE:
size = 8 ; size = 8 ;
break; break;
case MPI_LOGICAL:
size = SIZELOGICAL ;
break;
} }
memcpy(recvbuf, sendbuf, (*count)*size); memcpy(recvbuf, sendbuf, (*count)*size);
*__ierr = 0; *__ierr = 0;
...@@ -578,7 +598,7 @@ int *datatype; ...@@ -578,7 +598,7 @@ int *datatype;
int *comm; int *comm;
int *__ierr; int *__ierr;
{ {
disppass("send"); disppass("bsend");
*__ierr = 0; *__ierr = 0;
} }
...@@ -587,7 +607,7 @@ int *__ierr; ...@@ -587,7 +607,7 @@ int *__ierr;
void mpi_buffer_attach void mpi_buffer_attach
( ) ( )
{ {
disppass("mpi_buffer_attach_ juanito"); disppass("buffer_attach");
} }
/* JUAN void fclose( iunit ) /* JUAN void fclose( iunit )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment