Project

General

Profile

Bug #1700

Overloaded reduction targets result in compilation error

Added by Nils Deppe 18 days ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
09/30/2017
Due date:
% Done:

0%


Description

In my ci file I have:

template <typename ReceiveTag, typename ReceiveData_t>
entry[reductiontarget] void receive_data(TemporalId&, ReceiveData_t&,
                                         bool enable_if_disabled);
template <typename ReceiveTag, typename ReceiveData_t>
entry[reductiontarget] void receive_data(TemporalId&, ReceiveData_t&);

which leads to a compilation error:

/AlgorithmGroup.decl.h:221:16: error: class member cannot be
      redeclared
    static int redn_wrapper_receive_data(CkReductionMsg* impl_msg) { return idx_redn_wrapper_receive_data_m...
               ^
/AlgorithmGroup.decl.h:180:16: note: previous definition is
      here
    static int redn_wrapper_receive_data(CkReductionMsg* impl_msg) { return idx_redn_wrapper_receive_data_m...
               ^
In file included from /Test_AlgorithmParallel.cpp:6:
In file included from /AlgorithmNodegroup.hpp:8:
/AlgorithmNodegroup.decl.h:221:16: error: class member cannot
      be redeclared
    static int redn_wrapper_receive_data(CkReductionMsg* impl_msg) { return idx_redn_wrapper_receive_data_m...
               ^
/AlgorithmNodegroup.decl.h:180:16: note: previous definition
      is here
    static int redn_wrapper_receive_data(CkReductionMsg* impl_msg) { return idx_redn_wrapper_receive_data_m...
               ^

Do I only need to mark one of the entry methods a [reductiontarget] to get the correct behavior?


Related issues

Related to Charm++ - Bug #1250: Tuple reductions cannot have [reductiontarget] callbacks New 10/05/2016

History

#1 Updated by Phil Miller 12 days ago

  • Related to Bug #1250: Tuple reductions cannot have [reductiontarget] callbacks added

#2 Updated by Phil Miller 12 days ago

I'm not sure you'll get the correct behavior even with just one of those methods - what does the contribute call to produce those arguments in a CkReductionMsg even look like? The only things we current support in arguments to [reductiontarget] methods are single scalar values, or an array of such with a count argument.

I thought the .ci file translater would error on this, but I guess not.

#3 Updated by Eric Bohm 6 days ago

  • Assignee set to Eric Mikida

Also available in: Atom PDF