Skip to content

Commit

Permalink
added cloud container erase
Browse files Browse the repository at this point in the history
  • Loading branch information
“hborchert” committed Aug 15, 2024
1 parent ca4d1f0 commit bc836f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/madness/mra/macrotaskq.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,9 @@ class MacroTask {
void run(World &subworld, Cloud &cloud, MacroTaskBase::taskqT &taskq, const long element, const bool debug) {

io_redirect io(element,name+"_task",debug);
cloud.print_size(subworld);
const argtupleT argtuple = cloud.load<argtupleT>(subworld, inputrecords);
cloud.print_size(subworld);
const argtupleT batched_argtuple = task.batch.template copy_input_batch(argtuple);
try {
resultT result_tmp = std::apply(task, batched_argtuple);
Expand Down
5 changes: 4 additions & 1 deletion src/madness/world/cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Cloud {
typedef Recordlist<keyT> recordlistT;

private:
madness::WorldContainer<keyT, valueT> container;
mutable madness::WorldContainer<keyT, valueT> container;
cacheT cached_objects;
recordlistT local_list_of_container_keys; // a world-local list of keys occupied in container

Expand Down Expand Up @@ -461,6 +461,9 @@ class Cloud {
madness::archive::ContainerRecordInputArchive ar(world, container, record);
madness::archive::ParallelInputArchive<madness::archive::ContainerRecordInputArchive> par(world, ar);
par & target;

if (is_replicated) container.erase(record);

cache(world, target, record);
return target;
}
Expand Down

0 comments on commit bc836f0

Please sign in to comment.