Skip to content

Commit 486a767

Browse files
committed
IOSS: Fix file type ifdefs so actually do correct thing
1 parent f186770 commit 486a767

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -273,51 +273,51 @@ namespace Ioex {
273273
if (type == "netcdf3" || type == "netcdf-3") {
274274
exodusMode = EX_CLOBBER; // Reset back to default...
275275
}
276-
#if NC_HAS_HDF5
277276
if (type == "netcdf4" || type == "netcdf-4" || type == "hdf5") {
277+
#if NC_HAS_HDF5
278278
exodusMode |= EX_NETCDF4;
279-
}
280279
#else
281-
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. FILE_TYPE "
282-
"setting will be ignored.\n");
280+
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. FILE_TYPE "
281+
"setting will be ignored.\n");
283282
#endif
284-
#if NC_HAS_CDF5
283+
}
285284
else if (type == "netcdf5" || type == "netcdf-5" || type == "cdf5") {
285+
#if NC_HAS_CDF5
286286
exodusMode |= EX_64BIT_DATA;
287-
}
288287
#else
289-
fmt::print(Ioss::OUTPUT(), "IOEX: CDF5/netcdf-5 is not supported in this build. FILE_TYPE "
290-
"setting will be ignored.\n");
288+
fmt::print(Ioss::OUTPUT(), "IOEX: CDF5/netcdf-5 is not supported in this build. FILE_TYPE "
289+
"setting will be ignored.\n");
291290
#endif
291+
}
292292
}
293293

294-
#if NC_HAS_HDF5
295294
if (properties.exists("ENABLE_FILE_GROUPS")) {
295+
#if NC_HAS_HDF5
296296
exodusMode |= EX_NETCDF4;
297297
exodusMode |= EX_NOCLASSIC;
298-
}
299298
#else
300-
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. "
301-
"ENABLE_FILE_GROUPS setting will be ignored.\n");
299+
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. "
300+
"ENABLE_FILE_GROUPS setting will be ignored.\n");
302301
#endif
302+
}
303303

304-
#if NC_HAS_HDF5
305304
bool compress = ((properties.exists("COMPRESSION_LEVEL") &&
306305
properties.get("COMPRESSION_LEVEL").get_int() > 0) ||
307306
(properties.exists("COMPRESSION_SHUFFLE") &&
308307
properties.get("COMPRESSION_SHUFFLE").get_int() > 0));
309308

310309
if (compress) {
310+
#if NC_HAS_HDF5
311311
if (!(exodusMode & EX_NETCDF4)) {
312312
fmt::print(Ioss::OUTPUT(), "IOEX: Compression requires netcdf-4/HDF5-based file. Setting "
313313
"file type to netcdf-4.\n");
314314
exodusMode |= EX_NETCDF4;
315315
}
316-
}
317316
#else
318-
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. Compression "
319-
"setting will be ignored.\n");
317+
fmt::print(Ioss::OUTPUT(), "IOEX: HDF5/netcdf-4 is not supported in this build. Compression "
318+
"setting will be ignored.\n");
320319
#endif
320+
}
321321

322322
if (properties.exists("MAXIMUM_NAME_LENGTH")) {
323323
maximumNameLength = properties.get("MAXIMUM_NAME_LENGTH").get_int();

0 commit comments

Comments
 (0)