Commit 05c7b052 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Move PIO client-side streamDefVlist and streamWriteVar to pio_client.c.

parent 79e57a6d
......@@ -171,36 +171,6 @@ cdiPioStreamOpen(const char *filename, const char *filemode,
void
cdiPioStreamDefVlist_(int streamID, int vlistID)
{
statusCode nspStatus = namespaceInqResStatus ();
switch ( nspStatus )
{
case STAGE_DEFINITION:
break;
case STAGE_TIMELOOP:
pioBufferFuncCall(STREAMDEFVLIST, 2, streamID, vlistID);
break;
case STAGE_CLEANUP:
xabort ( "TRANSITION TO IO PROCESSES ALREADY FINISHED." );
break;
default:
xabort ( "INTERNAL ERROR" );
}
cdiStreamDefVlist_(streamID, vlistID);
}
/***************************************************************/
void
cdiPioStreamWriteVar_(int streamID, int varID, int memtype, const void *data,
int nmiss)
{
xabort("parallel writing must give explicit partition information,"
" use streamWriteVarPart!");
}
/***************************************************************/
void
......
......@@ -21,9 +21,6 @@ size_t cdiPioFileWrite(int fileID, const void *restrict buffer, size_t len,
int cdiPioStreamOpen(const char *filename, const char *filemode,
int filetype, stream_t *streamptr,
int recordBufIsToBeCreated);
void cdiPioStreamDefVlist_(int streamID, int vlistID);
void cdiPioStreamWriteVar_(int streamID, int varID, int memtype,
const void *data, int nmiss);
void cdiPioStreamWriteVarChunk_(int streamID, int varID, int memtype,
const int rect[][2], const void *data,
int nmiss);
......
......@@ -7,6 +7,36 @@
#include "pio.h"
#include "pio_client.h"
#include "pio_comm.h"
#include "pio_interface.h"
#include "pio_rpc.h"
static void
cdiPioClientStreamDefVlist_(int streamID, int vlistID)
{
statusCode nspStatus = namespaceInqResStatus ();
switch ( nspStatus )
{
case STAGE_DEFINITION:
break;
case STAGE_TIMELOOP:
pioBufferFuncCall(STREAMDEFVLIST, 2, streamID, vlistID);
break;
case STAGE_CLEANUP:
xabort ( "TRANSITION TO IO PROCESSES ALREADY FINISHED." );
break;
default:
xabort ( "INTERNAL ERROR" );
}
cdiStreamDefVlist_(streamID, vlistID);
}
static void
cdiPioClientStreamWriteVar_(int streamID, int varID, int memtype,
const void *data, int nmiss)
{
xabort("parallel writing requires explicit partition information,"
" use streamWriteVarPart!");
}
#if defined HAVE_LIBNETCDF
static void
......@@ -25,8 +55,8 @@ cdiPioClientSetup(int *pioNamespace_, int *pioNamespace)
pioNamespaceSetActive(*pioNamespace_);
serializeSetMPI();
namespaceSwitchSet(NSSWITCH_STREAM_OPEN_BACKEND, cdiPioStreamOpen);
namespaceSwitchSet(NSSWITCH_STREAM_DEF_VLIST_, cdiPioStreamDefVlist_);
namespaceSwitchSet(NSSWITCH_STREAM_WRITE_VAR_, cdiPioStreamWriteVar_);
namespaceSwitchSet(NSSWITCH_STREAM_DEF_VLIST_, cdiPioClientStreamDefVlist_);
namespaceSwitchSet(NSSWITCH_STREAM_WRITE_VAR_, cdiPioClientStreamWriteVar_);
namespaceSwitchSet(NSSWITCH_STREAM_WRITE_VAR_CHUNK_,
cdiPioStreamWriteVarChunk_);
namespaceSwitchSet(NSSWITCH_STREAM_CLOSE_BACKEND, cdiPioStreamClose);
......
Supports Markdown
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