diff --git a/test/realm/concurrent_memspeed b/test/realm/concurrent_memspeed index c3e4988542..1f01a16f02 100755 Binary files a/test/realm/concurrent_memspeed and b/test/realm/concurrent_memspeed differ diff --git a/test/realm/concurrent_memspeed.cc b/test/realm/concurrent_memspeed.cc index 156e30328f..6abdfb7535 100644 --- a/test/realm/concurrent_memspeed.cc +++ b/test/realm/concurrent_memspeed.cc @@ -7,7 +7,6 @@ #include #include #include -#include #include @@ -151,14 +150,13 @@ void do_copies(Processor p, const std::vector &memories) { ? TestConfig::z_copy_size_hi : TestConfig::z_size}}); - std::vector done_events; std::vector src_instances, dst_instances; std::vector> index_spaces; std::vector> src_fields, dst_fields; std::vector profile_requests; - std::vector memspeed_experiments(memories.size()); - std::vector threads; + const UserEvent start = UserEvent::create_user_event(); + std::vector local_events; for (size_t i = 0; i < memories.size(); i++) { if (i < TestConfig::src_mem_lo || TestConfig::src_mem_hi < i) @@ -186,11 +184,8 @@ void do_copies(Processor p, const std::vector &memories) { } for (size_t j = 0; j < memories.size(); j++) { - if (j < TestConfig::dst_mem_lo || TestConfig::dst_mem_hi < j) - continue; - if (i == j) { + if (i == j || j < TestConfig::dst_mem_lo || TestConfig::dst_mem_hi < j) continue; - } Memory m2 = memories[j]; dst_instances.push_back(RegionInstance()); @@ -211,35 +206,29 @@ void do_copies(Processor p, const std::vector &memories) { dsts[i].set_field(dst_instances.back(), FID_BASE + i, sizeof(void *)); dst_fields.push_back(dsts); - UserEvent done = UserEvent::create_user_event(); - - done_events.push_back(done); - { - CopyProfResult result; - result.copy_start_time = &memspeed_experiments[i].copy_start_time; - result.copy_end_time = &memspeed_experiments[i].copy_end_time; - result.copied_bytes = &memspeed_experiments[i].copied_bytes; - result.total_copies = &memspeed_experiments[i].total_copies; - result.done = done; - ProfilingRequestSet prs; - prs.add_request(p, COPYPROF_TASK, &result, sizeof(CopyProfResult)) - .add_measurement() - .add_measurement(); - profile_requests.push_back(prs); - } - index_spaces.push_back(IndexSpace(copy_boundaries)); + CopyProfResult result; + result.copy_start_time = &memspeed_experiments[i].copy_start_time; + result.copy_end_time = &memspeed_experiments[i].copy_end_time; + result.copied_bytes = &memspeed_experiments[i].copied_bytes; + result.total_copies = &memspeed_experiments[i].total_copies; + result.done = UserEvent::create_user_event(); + ; + ProfilingRequestSet prs; + prs.add_request(p, COPYPROF_TASK, &result, sizeof(CopyProfResult)) + .add_measurement() + .add_measurement(); + profile_requests.push_back(prs); + + local_events.push_back(start); + local_events.back() = + copy_boundaries.copy(src_fields.back(), dst_fields.back(), + profile_requests.back(), local_events.back()); } } } - for (size_t i = 0; i < index_spaces.size(); i++) { - threads.push_back(std::thread([&, i] { - index_spaces[i].copy(src_fields[i], dst_fields[i], profile_requests[i]); - })); - threads.back().detach(); - } - - Event::merge_events(done_events).wait(); + start.trigger(); + Event::merge_events(local_events).wait(); int experiment_count = 0; long long mean_copy_duration = 0;