diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-05-11 20:35:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-05-11 20:35:00 +0000 |
commit | 865814168e598c52b51e610102857b07e9d659dd (patch) | |
tree | 06f4b87814302f6d7e6522749cd3c7c7a7cb9c1f /Carpet/CarpetIOASCII | |
parent | 138b25353c96c37a0a1508c85127c0620f3441cc (diff) |
CarpetIOASCII: Delay check whether storage is enabled
Check whether a group has storage only after checking whether it
should be output.
darcs-hash:20060511203533-dae7b-bc02e83f6a9a0542bc0952afd65c99046a11834d.gz
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index 4d113e72e..4eb4b141c 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -399,14 +399,6 @@ namespace CarpetIOASCII { return -1; } - // Check for storage - if (not CCTK_QueryGroupStorageI (cctkGH, group)) { - CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Cannot output variable '%s' because it has no storage", - varname); - return 0; - } - // get the default I/O request for this variable ioRequest* request = requests[vindex]; if (not request) { @@ -453,6 +445,14 @@ namespace CarpetIOASCII { assert (last_output < cctk_iteration); last_output = cctk_iteration; + // Check for storage + if (not CCTK_QueryGroupStorageI (cctkGH, group)) { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Cannot output variable '%s' because it has no storage", + varname); + return 0; + } + // Get grid hierarchy extentsion from IOUtil const ioGH * const iogh = (const ioGH *)CCTK_GHExtension (cctkGH, "IO"); assert (iogh); |