diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2004-05-06 11:59:35 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2004-05-06 11:59:35 +0000 |
commit | ac0606a2be08edbe95fb03267d2534512778ec81 (patch) | |
tree | 9b190967853667dc84f72bea354f28d4c0c82033 /src/DumpVar.c | |
parent | 3571d44cbef4261d453b5e28cad5e7280cfef879 (diff) |
Fixed filenames for chunked output files.
Don't output chunked files for grid scalars.
This closes PR IO/1672: "fexio output filenames (and directory names) give '3d' regardless of the dimensionality of the output variable".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@314 ebee0441-1374-4afa-a3b5-247f3ba15b9a
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); |