Skip to content
Snippets Groups Projects
Commit d9245298 authored by Xingran Wang's avatar Xingran Wang
Browse files

use different sct context for I/O servers

parent e1cdf248
No related branches found
No related tags found
No related merge requests found
......@@ -550,9 +550,10 @@ pioInit(MPI_Comm commGlob, int nProcsIO, int IOMode,
static void cdiPioFileWritingInit(void);
int new_timer(const int tsize, const char *context_name, MPI_Comm comm)
void new_context(const char *context_name, MPI_Comm comm)
{
int timer_size = sct_init(tsize, context_name, comm);
context_handle = sct_new_context(context_name, comm);
sct_context_start(context_handle);
timer_ioTotal = sct_new_timer("IO servers total");
timer_getTimeStepData = sct_new_timer("getTimeStepData");
......@@ -568,8 +569,6 @@ int new_timer(const int tsize, const char *context_name, MPI_Comm comm)
timer_writeSlice = sct_new_timer("write slice");
timer_aggBufFlush = sct_new_timer("aggregate buffer flush");
timer_postwritebatch = sct_new_timer("post write batch");
return timer_size;
}
MPI_Comm
......@@ -664,7 +663,7 @@ cdiPioInit(MPI_Comm commGlob, int confResH, int *pioNamespace)
conf->callbacks[CDIPIO_CALLBACK_POSTCOMMSETUP]();
cdiPioFileWritingInit();
// initialize sct timer
new_timer(TIMER_MAX, "CDI-PIO timer", commInqCommPio());
new_context("CDI-PIO timer", commInqCommPio());
sct_start(timer_ioTotal);
if (commInqRankColl() >= 0)
{
......
......@@ -2461,6 +2461,7 @@ void cdiPioCollectorMessageLoop()
case FINALIZE:
xdebug("%s", "tag: FINALIZE");
sct_stop(timer_ioTotal);
sct_context_stop(context_handle);
sct_report(SCT_GETENV, SCT_GETENV, SCT_GETENV);
xmpi(MPI_Recv(NULL, 0, MPI_INT, source, tag, pioInterComm, &status));
for (size_t streamIdx = 0; streamIdx < openStreams.size; ++streamIdx)
......
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