diff --git a/sources/Common/DYNMultiProcessingContext.h b/sources/Common/DYNMultiProcessingContext.h index 2c6a275c..f9bf158e 100644 --- a/sources/Common/DYNMultiProcessingContext.h +++ b/sources/Common/DYNMultiProcessingContext.h @@ -114,18 +114,25 @@ class Context { } #endif +#ifdef _MPI_ /** * @brief Broadcast data from root rank to all process * * @tparam T the data type to broadcast * @param data the data to broadcast */ -#ifdef _MPI_ template void broadcast(T& data) const { broadcastImpl(Tag(), data); } #else + /** + * @brief No-op broadcast function for builds without MPI + * + * When MPI is not enabled, this function does nothing. It is provided to maintain interface compatibility. + * + * @tparam T the data type to broadcast + */ template void broadcast(T&) const { // do nothing