Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions redev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace {
std::this_thread::sleep_for(std::chrono::seconds(2));
}
}

// Testint the CI
namespace redev {

//TODO consider moving the ClassPtn source to another file
Expand Down Expand Up @@ -243,8 +243,10 @@ namespace redev {
assert(len==cuts.size());
auto ranksVar = io.DefineVariable<redev::LO>(ranksVarName,{},{},{len});
auto cutsVar = io.DefineVariable<redev::Real>(cutsVarName,{},{},{len});
auto dimVar = io.DefineVariable<redev::LO>(dimVarName);
eng.Put(ranksVar, ranks.data());
eng.Put(cutsVar, cuts.data());
eng.Put(dimVar, dim);
eng.PerformPuts();
}

Expand All @@ -253,17 +255,21 @@ namespace redev {
const auto step = eng.CurrentStep();
auto ranksVar = io.InquireVariable<redev::LO>(ranksVarName);
auto cutsVar = io.InquireVariable<redev::Real>(cutsVarName);
auto dimVar = io.InquireVariable<redev::LO>(dimVarName);
assert(ranksVar && cutsVar);
assert(dimVar);

auto blocksInfo = eng.BlocksInfo(ranksVar,step);
assert(blocksInfo.size()==1);
ranksVar.SetBlockSelection(blocksInfo[0].BlockID);
eng.Get(ranksVar, ranks);

blocksInfo = eng.BlocksInfo(ranksVar,step);
blocksInfo = eng.BlocksInfo(cutsVar,step);
assert(blocksInfo.size()==1);
ranksVar.SetBlockSelection(blocksInfo[0].BlockID);
cutsVar.SetBlockSelection(blocksInfo[0].BlockID);
eng.Get(cutsVar, cuts);

eng.Get(dimVar, dim);
eng.PerformGets(); //default read mode is deferred
}

Expand Down
1 change: 1 addition & 0 deletions redev_partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class RCBPtn {
private:
const std::string ranksVarName = "rcb partition ranks";
const std::string cutsVarName = "rcb partition cuts";
const std::string dimVarName = "rcb partition dim";
redev::LO dim;
std::vector<redev::LO> ranks;
std::vector<redev::Real> cuts;
Expand Down