Skip to content

Commit

Permalink
remove sc_MPI_INT8_T
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbrandt committed Mar 18, 2024
1 parent 88224e6 commit f7b0ffa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/sc_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/sc_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions test/test_mpi_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 =
Expand All @@ -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;

Expand Down

0 comments on commit f7b0ffa

Please sign in to comment.