Skip to content

RMACXX_Subarray_t not being obeyed #14

@MMukundi

Description

@MMukundi

Reproduction:

int main(){
    // -- SNIP --
    win.fill(1);

    // create a vector, initially 0s
    std::vector<int> a(10); 
    int *abuf = a.data();
    
    // create subarray type
    // Note: Output is unchanged by changes to these values
    rmacxx::RMACXX_Subarray_t<int> foo({1},{2},{10}); 
    
    // put
    win(1,{0},{9}) << foo(abuf);
    win.flush(1);
    std::vector<int> results(10); 
    win(1,{0},{9}) >> results.data();
    win.flush(1);
    // -- SNIP --
}

Expected behavior:

a = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1};

Observed behavior:

// Note: Output is unchanged by values of subarray_t
a = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1};

Suspected cause:
include/rmacxx-mpi-rma.hpp

       #define RMACXX_BULK_PUT_NC(origin)\
194|        do{\
...|            /* -- SNIP */\
222|            MPI_Accumulate(origin.ptr_, 1, origin.dtype_, target_, \
223|              /*disp*/ 0, 1, sarr_type, MPI_REPLACE, win_); \
...|            /* -- SNIP */\
265|        }while(0)

No members of the RMACXX_Subarray_t origin, not even the MPI_Subarray_t that was already created, are included in the actual MPI_Accumulate call, likely meaning that all calls are relying on the exact same implementation, regardless of user inputs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions