message: added code to allocate memory for the target array.
diff: @@ -30,14 +30,15 @@ namespace algorithm
  int hid = omp_get_initial_device(); \
  int did = omp_get_default_device(); \
  \
  - allocAndInitOpenMPDeviceData(x, m_x, iend, did, hid);
  + allocAndInitOpenMPDeviceData(x, m_x, iend, did, hid); \
  + allocAndInitOpenMPDeviceData(y, m_y, iend, did, hid);
  #define MEMCPY_DATA_TEARDOWN_OMP_TARGET \
  deallocOpenMPDeviceData(x, did); \
  + deallocOpenMPDeviceData(y, did);
  -
  -void MEMCPY::runOpenMPTargetVariant(VariantID vid, size_t RAJAPERF_UNUSED_ARG(tune_idx))
  -{
  + void MEMCPY::runOpenMPTargetVariant(VariantID vid,
  + size_t RAJAPERF_UNUSED_ARG(tune_idx)) {
  const Index_type run_reps = getRunReps();
  const Index_type ibegin = 0;
  const Index_type iend = getActualProblemSize();
  @@ -52,12 +53,11 @@ void MEMCPY::runOpenMPTargetVariant(VariantID vid, size_t RAJAPERF_UNUSED_ARG(tu
  for (RepIndex_type irep = 0; irep < run_reps; ++irep) {
  #pragma omp target is_device_ptr(x, y) device(did)
  - #pragma omp teams distribute parallel for \
  - thread_limit(threads_per_team) schedule(static, 1)
  +#pragma omp teams distribute parallel for thread_limit(threads_per_team) \
  + schedule(static, 1)
  for (Index_type i = ibegin; i < iend; ++i) {
  MEMCPY_BODY;
  }
  -
  }
  stopTimer();
  @@ -72,17 +72,15 @@ void MEMCPY::runOpenMPTargetVariant(VariantID vid, size_t RAJAPERF_UNUSED_ARG(tu
  RAJA::forall<RAJA::omp_target_parallel_for_exec<threads_per_team>>(
  RAJA::RangeSegment(ibegin, iend),
  - [=](Index_type i) {
  - MEMCPY_BODY;
  - });
  -
  + [=](Index_type i) { MEMCPY_BODY; });
  }
  stopTimer();
  MEMCPY_DATA_TEARDOWN_OMP_TARGET
  } else {
  - getCout() << "\n MEMCPY : Unknown OMP Target variant id = " << vid << std::endl;
  + getCout() << "\n MEMCPY : Unknown OMP Target variant id = " << vid
  + << std::endl;
  }
  }
  