Commit 2cb83ebe authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Rename serializeSetMPI to cdiPioSerializeSetMPI.

* Also declare functions not directly called static.
parent 01610ddb
......@@ -250,7 +250,7 @@ cdiPioClientSetup(int *pioNamespace_, int *pioNamespace)
*pioNamespace_ = *pioNamespace = namespaceNew();
int callerCDINamespace = namespaceGetActive();
namespaceSetActive(*pioNamespace_);
serializeSetMPI();
cdiPioSerializeSetMPI();
namespaceSwitchSet(NSSWITCH_STREAM_OPEN_BACKEND,
NSSW_FUNC(cdiPioClientStreamOpen));
namespaceSwitchSet(NSSWITCH_STREAM_DEF_VLIST_,
......
......@@ -809,7 +809,7 @@ pioInit(MPI_Comm commGlob, int nProcsIO, int IOMode,
if ( commInqIsProcIO ())
{
serializeSetMPI();
cdiPioSerializeSetMPI();
namespaceSwitchSet(NSSWITCH_ABORT, NSSW_FUNC(cdiAbortC_MPI));
namespaceSwitchSet(NSSWITCH_FILE_OPEN, NSSW_FUNC(pioFileOpen));
namespaceSwitchSet(NSSWITCH_FILE_CLOSE, NSSW_FUNC(pioFileClose));
......
......@@ -70,7 +70,8 @@ setupDtDict()
}
#endif
int serializeGetSizeMPI(int count, int datatype, void *context)
static int
serializeGetSizeMPI(int count, int datatype, void *context)
{
int size;
xmpi(MPI_Pack_size(count, dtDict[lookupDt(datatype)].mpidt,
......@@ -79,21 +80,23 @@ int serializeGetSizeMPI(int count, int datatype, void *context)
}
void serializePackMPI(void *data, int count, int datatype,
void *buf, int buf_size, int *position, void *context)
static void
serializePackMPI(void *data, int count, int datatype,
void *buf, int buf_size, int *position, void *context)
{
xmpi(MPI_Pack(data, count, dtDict[lookupDt(datatype)].mpidt,
buf, buf_size, position, *(MPI_Comm *)context));
}
void serializeUnpackMPI(void *buf, int buf_size, int *position,
void *data, int count, int datatype, void *context)
static void
serializeUnpackMPI(void *buf, int buf_size, int *position,
void *data, int count, int datatype, void *context)
{
xmpi(MPI_Unpack(buf, buf_size, position, data, count,
dtDict[lookupDt(datatype)].mpidt, *(MPI_Comm *)context));
}
void serializeSetMPI()
void cdiPioSerializeSetMPI()
{
#if CDI_DT_MATCH_NEEDED
if (!dtDictMatchComplete)
......
#ifndef SERIALIZE_PIO_H
#define SERIALIZE_PIO_H
/*
* Interfaces for marshalling via MPI
*/
int serializeGetSizeMPI(int count, int datatype, void *context);
void serializePackMPI(void *data, int count, int datatype,
void *buf, int buf_size, int *position, void *context);
void serializeUnpackMPI(void *buf, int buf_size, int *position,
void *data, int count, int datatype, void *context);
/* switch current namespace to use MPI serialization */
void serializeSetMPI();
void cdiPioSerializeSetMPI();
#endif
......@@ -188,7 +188,7 @@ int modelRun(MPI_Comm comm)
int bufferSize, differ;
#ifdef MPI_MARSHALLING
serializeSetMPI();
cdiPioSerializeSetMPI();
#endif
gridID = defineGrid ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment