Skip to content

Commit 8cc7fee

Browse files
committed
Throw errors if unsupported
1 parent d1f1fd1 commit 8cc7fee

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ namespace openPMD
6565
#if openPMD_HAVE_ADIOS2
6666

6767
#define HAS_ADIOS_2_8 (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 208)
68+
#define HAS_ADIOS_2_9 (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 209)
6869

6970
namespace
7071
{
@@ -623,6 +624,13 @@ void ADIOS2IOHandlerImpl::createDataset(
623624
"[ADIOS2] Creating a dataset in a file opened as read "
624625
"only is not possible.");
625626
}
627+
#if !HAS_ADIOS_2_9
628+
if (parameters.joinedDimension.has_value())
629+
{
630+
error::throwOperationUnsupportedInBackend(
631+
"ADIOS1", "Joined Arrays require ADIOS2 >= v2.9");
632+
}
633+
#endif
626634
if (!writable->written)
627635
{
628636
/* Sanitize name */

src/IO/ADIOS/CommonADIOS1IOHandler.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,12 @@ void CommonADIOS1IOHandlerImpl<ChildClass>::createDataset(
539539
"[ADIOS1] Creating a dataset in a file opened as read only is not "
540540
"possible.");
541541

542+
if (parameters.joinedDimension.has_value())
543+
{
544+
error::throwOperationUnsupportedInBackend(
545+
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
546+
}
547+
542548
if (!writable->written)
543549
{
544550
/* ADIOS variable definitions require the file to be (re-)opened to take

src/IO/HDF5/HDF5IOHandler.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,12 @@ void HDF5IOHandlerImpl::createDataset(
419419
"[HDF5] Creating a dataset in a file opened as read only is not "
420420
"possible.");
421421

422+
if (parameters.joinedDimension.has_value())
423+
{
424+
error::throwOperationUnsupportedInBackend(
425+
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
426+
}
427+
422428
if (!writable->written)
423429
{
424430
/* Sanitize name */

src/IO/JSON/JSONIOHandlerImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ void JSONIOHandlerImpl::createDataset(
189189
"[JSON] Creating a dataset in a file opened as read only is not "
190190
"possible.");
191191
}
192+
if (parameter.joinedDimension.has_value())
193+
{
194+
error::throwOperationUnsupportedInBackend(
195+
"ADIOS1", "Joined Arrays currently only supported in ADIOS2");
196+
}
197+
192198
if (!writable->written)
193199
{
194200
/* Sanitize name */

0 commit comments

Comments
 (0)