diff --git a/fairmq/plugins/PMIx/PMIx.hpp b/fairmq/plugins/PMIx/PMIx.hpp index ff4f55de..5332b79d 100644 --- a/fairmq/plugins/PMIx/PMIx.hpp +++ b/fairmq/plugins/PMIx/PMIx.hpp @@ -76,7 +76,19 @@ struct proc : pmix_proc_t struct value : pmix_value_t { value() { PMIX_VALUE_CONSTRUCT(static_cast(this)); } - ~value() { /*PMIX_VALUE_DESTRUCT(static_cast(this));*/ } + ~value() { PMIX_VALUE_DESTRUCT(static_cast(this)); } + + value(const value& rhs) + { + LOG(warn) << "copy ctor"; + status rc; + auto lhs(static_cast(this)); + PMIX_VALUE_XFER(rc, lhs, static_cast(const_cast(&rhs))); + + if (rc != PMIX_SUCCESS) { + throw runtime_error("pmix::value copy ctor failed: rc=" + rc); + } + } // template // value(const T* val, data_type dt)