From f7b0ffabc099c2728c35175a4d65ba82af4e80c3 Mon Sep 17 00:00:00 2001 From: Hannes Brandt Date: Mon, 18 Mar 2024 16:18:20 +0100 Subject: [PATCH] remove sc_MPI_INT8_T --- src/sc_mpi.c | 2 +- src/sc_mpi.h | 2 -- test/test_mpi_pack.c | 11 ++++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/sc_mpi.c b/src/sc_mpi.c index 249902cb..db1bd5a9 100644 --- a/src/sc_mpi.c +++ b/src/sc_mpi.c @@ -747,7 +747,7 @@ sc_MPI_Error_string (int errorcode, char *string, int *resultlen) size_t sc_mpi_sizeof (sc_MPI_Datatype t) { - if (t == sc_MPI_BYTE || t == sc_MPI_INT8_T) + if (t == sc_MPI_BYTE) return 1; if (t == sc_MPI_CHAR || t == sc_MPI_UNSIGNED_CHAR) return sizeof (char); diff --git a/src/sc_mpi.h b/src/sc_mpi.h index 73d31f81..87d7aee8 100644 --- a/src/sc_mpi.h +++ b/src/sc_mpi.h @@ -186,7 +186,6 @@ sc_MPI_IO_Errorcode_t; #define sc_MPI_DATATYPE_NULL MPI_DATATYPE_NULL #define sc_MPI_BYTE MPI_BYTE -#define sc_MPI_INT8_T MPI_BYTE #define sc_MPI_CHAR MPI_CHAR #define sc_MPI_UNSIGNED_CHAR MPI_UNSIGNED_CHAR #define sc_MPI_SHORT MPI_SHORT @@ -356,7 +355,6 @@ sc_MPI_IO_Errorcode_t; #define sc_MPI_CHAR ((sc_MPI_Datatype) 0x4c000101) #define sc_MPI_UNSIGNED_CHAR ((sc_MPI_Datatype) 0x4c000102) #define sc_MPI_BYTE SC3_MPI_BYTE -#define sc_MPI_INT8_T ((sc_MPI_Datatype) 0x4c000202) #define sc_MPI_SHORT ((sc_MPI_Datatype) 0x4c000203) #define sc_MPI_UNSIGNED_SHORT ((sc_MPI_Datatype) 0x4c000204) #define sc_MPI_INT SC3_MPI_INT diff --git a/test/test_mpi_pack.c b/test/test_mpi_pack.c index 4bd92d50..a54b9410 100644 --- a/test/test_mpi_pack.c +++ b/test/test_mpi_pack.c @@ -92,8 +92,8 @@ test_message_MPI_Pack (const test_message_t *messages, int incount, int mpiret; mpiret = - sc_MPI_Pack (&(messages[imessage].type), 1, sc_MPI_INT8_T, outbuf, - outsize, position, comm); + sc_MPI_Pack (&(messages[imessage].type), sizeof (int8_t), sc_MPI_BYTE, + outbuf, outsize, position, comm); SC_CHECK_MPI (mpiret); mpiret = sc_MPI_Pack (messages[imessage].values, num_values[messages[imessage].type], sc_MPI_DOUBLE, @@ -115,8 +115,8 @@ test_message_MPI_Unpack (const void *inbuf, int insize, int mpiret; mpiret = - sc_MPI_Unpack (inbuf, insize, position, &(messages[imessage].type), 1, - sc_MPI_INT8_T, comm); + sc_MPI_Unpack (inbuf, insize, position, &(messages[imessage].type), + sizeof (int8_t), sc_MPI_BYTE, comm); SC_CHECK_MPI (mpiret); messages[imessage].values = @@ -143,7 +143,8 @@ test_message_MPI_Pack_size (int incount, const test_message_t *messages, int single_message_size = 0; int mpiret; - mpiret = sc_MPI_Pack_size (1, sc_MPI_INT8_T, comm, &pack_size); + mpiret = + sc_MPI_Pack_size (sizeof (int8_t), sc_MPI_BYTE, comm, &pack_size); SC_CHECK_MPI (mpiret); single_message_size += pack_size;