diff options
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r-- | src/DumpVar.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c index 87d87b5..807f4ec 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -260,22 +260,21 @@ static int WriteGS (const cGH *GH, const ioRequest *request, IOFile file) } } - /* only I/O processors write data */ - if (myproc != ioUtilGH->ioproc) + /* only I/O processor 0 writes data */ + retval = 0; + if (! myproc) { - retval = 0; - } - else if (! IOisValid (file)) - { - retval = -1; - } - else - { - /* first dump the data then add the attributes */ - FLEXIO_ERROR (IOwrite (file, IOFlexIO_DataType (request->hdatatype), dim, - &dim, buffer)); - AddCommonAttributes (GH, request, file); - retval = 0; + if (IOisValid (file)) + { + /* first dump the data then add the attributes */ + FLEXIO_ERROR (IOwrite (file, IOFlexIO_DataType (request->hdatatype), dim, + &dim, buffer)); + AddCommonAttributes (GH, request, file); + } + else + { + retval = -1; + } } free (buffer); |