DARMA-tasking-internal / darma-frontend

Header library providing the frontend programming model for the DARMA asynchronous many-task model
Other
7 stars 0 forks source link

Key serialization bug #1

Closed fnrizzi closed 7 years ago

fnrizzi commented 7 years ago

The following code does not work: @dhollman

#include <random>
#include <darma.h>
#include <darma/impl/task_collection/handle_collection.h>
#include <darma/impl/task_collection/task_collection.h>
#include <darma/impl/array/index_range.h>
using namespace darma_runtime;
using namespace darma_runtime::keyword_arguments_for_access_handle_collection;

struct Print {
    void operator()(
            Index1D<int> index,
            darma_runtime::types::key_t name) const
    {
      std::cout << name << std::endl;
    }
};

void darma_main_task(std::vector<std::string> args)
{
  const int numRegions = 6;
  const int gridSize = 18;

  auto r1d = Range1D<int>(numRegions);

  auto myKey = make_key("gigi");
  create_concurrent_work<Print>(myKey, index_range=r1d);

}
DARMA_REGISTER_TOP_LEVEL_FUNCTION(darma_main_task);
lifflander commented 7 years ago

This is a defect that should be addressed and backported to 0.4-devel.

dhollman commented 7 years ago

@lifflander Do you still think this needs to be backported to 0.4-devel? I'm working on a fix and test for this now.

dhollman commented 7 years ago

Fixed by e310f5a (and probably some other drive-bys from earlier, like the fix to #8).