From b73e982e86af363eac34df5c15d4676f6335d9d5 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 9 Jan 2017 17:01:23 +0100 Subject: [PATCH] Fix ADIOS Trait for `bool` For default I/O and checkpointing via ADIOS, simulations using our in situ radiation plugin with selected particles (by stride or gamma) did not compile since ADIOS' C API does not define a `bool` type for `radiationFlag`. This adds a trait assuming it can be casted to one byte. --- src/picongpu/include/traits/PICToAdios.tpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/picongpu/include/traits/PICToAdios.tpp b/src/picongpu/include/traits/PICToAdios.tpp index b109649c9b..d0a1311c90 100644 --- a/src/picongpu/include/traits/PICToAdios.tpp +++ b/src/picongpu/include/traits/PICToAdios.tpp @@ -32,6 +32,20 @@ namespace picongpu namespace traits { + template<> + struct PICToAdios + { + ADIOS_DATATYPES type; + + PICToAdios() : + type(adios_unsigned_byte) {} + + PMACC_STATIC_ASSERT_MSG( + sizeof(bool) == 1, + ADIOS_Plugin__Can_not_find_a_one_byte_representation_of_bool + ); + }; + template<> struct PICToAdios {