From 2858186dddf8fe8d9ccbd66a58b6c8d3ded2af10 Mon Sep 17 00:00:00 2001 From: dpugmire Date: Mon, 18 May 2020 16:42:37 -0400 Subject: [PATCH 1/3] Print statement was wrong for openMP --- examples/multi_backend/MultiDeviceGradient.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/multi_backend/MultiDeviceGradient.hxx b/examples/multi_backend/MultiDeviceGradient.hxx index 12d0daecf..39a43b624 100644 --- a/examples/multi_backend/MultiDeviceGradient.hxx +++ b/examples/multi_backend/MultiDeviceGradient.hxx @@ -84,7 +84,8 @@ void process_partition_openMP(RuntimeTaskQueue& queue) //Step 4. Notify the queue that we finished processing this task queue.completedTask(); - std::cout << "finished a partition on tbb (" << std::this_thread::get_id() << ")" << std::endl; + std::cout << "finished a partition on openMP (" << std::this_thread::get_id() << ")" + << std::endl; } } From bda8a1580b8a16f04cfc2bc4fbac81f10b446482 Mon Sep 17 00:00:00 2001 From: dpugmire Date: Mon, 18 May 2020 16:44:12 -0400 Subject: [PATCH 2/3] change comments as well. --- examples/multi_backend/MultiDeviceGradient.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/multi_backend/MultiDeviceGradient.hxx b/examples/multi_backend/MultiDeviceGradient.hxx index 39a43b624..36a592f3d 100644 --- a/examples/multi_backend/MultiDeviceGradient.hxx +++ b/examples/multi_backend/MultiDeviceGradient.hxx @@ -64,17 +64,17 @@ void process_partition_openMP(RuntimeTaskQueue& queue) { //Step 1. Set the device adapter to this thread to TBB. //This makes sure that any vtkm::filters used by our - //task operate only on TBB. The "global" thread tracker + //task operate only on openMP. The "global" thread tracker //is actually thread-local, so we can use that. // vtkm::cont::GetRuntimeDeviceTracker().ForceDevice(vtkm::cont::DeviceAdapterTagOpenMP{}); while (queue.hasTasks()) { - //Step 2. Get the task to run on TBB + //Step 2. Get the task to run on openMP auto task = queue.pop(); - //Step 3. Run the task on TBB. We check the validity + //Step 3. Run the task on openMP. We check the validity //of the task since we could be given an empty task //when the queue is empty and we are shutting down if (task != nullptr) From 72f1846bf19ad32c0a9e345645b162cb34a2aa21 Mon Sep 17 00:00:00 2001 From: dpugmire Date: Tue, 19 May 2020 09:40:44 -0400 Subject: [PATCH 3/3] missed a comment change. --- examples/multi_backend/MultiDeviceGradient.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/multi_backend/MultiDeviceGradient.hxx b/examples/multi_backend/MultiDeviceGradient.hxx index 36a592f3d..8ff601c92 100644 --- a/examples/multi_backend/MultiDeviceGradient.hxx +++ b/examples/multi_backend/MultiDeviceGradient.hxx @@ -62,7 +62,7 @@ void process_partition_tbb(RuntimeTaskQueue& queue) void process_partition_openMP(RuntimeTaskQueue& queue) { - //Step 1. Set the device adapter to this thread to TBB. + //Step 1. Set the device adapter to this thread to openMP. //This makes sure that any vtkm::filters used by our //task operate only on openMP. The "global" thread tracker //is actually thread-local, so we can use that.