Skip to content

Commit

Permalink
Merge Pull Request #8033 from trilinos/Trilinos/tpetra_7923
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: Tpetra:  removed CUDA-specific code that doesn't work with CUDA 11.
PR Author: kddevin
  • Loading branch information
trilinos-autotester authored Sep 18, 2020
2 parents 3cad753 + 4f708fd commit e17e27e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 610 deletions.
171 changes: 0 additions & 171 deletions packages/tpetra/core/src/Tpetra_Details_checkPointer.cpp

This file was deleted.

116 changes: 0 additions & 116 deletions packages/tpetra/core/src/Tpetra_Details_checkPointer.hpp

This file was deleted.

47 changes: 7 additions & 40 deletions packages/tpetra/core/src/Tpetra_Details_checkView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@
#ifndef TPETRA_DETAILS_CHECKVIEW_HPP
#define TPETRA_DETAILS_CHECKVIEW_HPP

/// \file Tpetra_Details_checkPointer.hpp
/// \file Tpetra_Details_checkView.hpp
/// \brief Declaration of functions for checking whether a given
/// pointer is accessible from a given Kokkos execution space.
///
/// \warning This header file and its contents are implementation
/// details of Tpetra.

#include "Tpetra_Details_checkPointer.hpp"
#include "Tpetra_Details_gathervPrint.hpp"
#include "Kokkos_DualView.hpp"
#include "Teuchos_TypeNameTraits.hpp"
Expand All @@ -58,11 +57,6 @@
namespace Tpetra {
namespace Details {

template<class ExecutionSpace>
bool
pointerAccessibleFromExecutionSpace (const void* ptr,
const ExecutionSpace& space);

std::string memorySpaceName (const void* ptr);

/// \brief Is the given View valid?
Expand All @@ -76,13 +70,6 @@ std::string memorySpaceName (const void* ptr);
/// host pointer with execution_space Kokkos::Cuda). </li>
/// </ol>
///
/// This function doesn't promise exact results for anything other
/// than CudaSpace, CudaUVMSpace, or CudaHostPinnedSpace. The point
/// of this function is for Tpetra classes to debug user error in
/// which users create a Kokkos::View with a raw pointer in the wrong
/// memory space (e.g., a host pointer, when they should have used a
/// UVM pointer).
///
/// \param lclErrStrm [out] If the View is invalid, and this pointer
/// is nonnull, then write a human-readable explanation of what's
/// wrong with the View to the stream.
Expand Down Expand Up @@ -121,21 +108,8 @@ checkLocalViewValidity
}
return false;
}
else { // nonnull pointer, nonzero size
const bool canAcc = pointerAccessibleFromExecutionSpace (ptr, ES ());
if (! canAcc && lclErrStrm != nullptr) {
const std::string viewName = TypeNameTraits<view_type>::name ();
const std::string esName = TypeNameTraits<ES>::name ();
*lclErrStrm << "Proc " << myMpiProcessRank << ": Kokkos::View "
"of type " << viewName << " and nonzero size " << view.size ()
<< " has a pointer " << ptr << " which is nonnull, but not "
"accessible from the View's claimed execution space "
<< esName << ". As far as I can tell, the View's pointer "
"(view.data()) lives in memory space " << memorySpaceName (ptr)
<< "." << endl;
}
return canAcc;
}
else
return true;
}
}

Expand Down Expand Up @@ -218,18 +192,11 @@ checkGlobalDualViewValidity

if (gblSuccess != 1 && gblErrStrm != nullptr) {
*gblErrStrm << "On at least one (MPI) process, the "
"Kokkos::DualView has either device or host pointer that "
"is not accessible from the corresponding execution space. "
"This can happen if you, the user, created the DualView "
"with raw pointer(s) that is/are not in the correct memory "
"space. For example, you may have a Kokkos::DualView whose "
"device memory_space is Kokkos::CudaUVMSpace, but you gave "
"the device View's constructor a raw host pointer. It may "
"also happen if either the device or host pointer in the "
"DualView is null, but the DualView has a nonzero number of "
"Kokkos::DualView has "
"either the device or host pointer in the "
"DualView equal to null, but the DualView has a nonzero number of "
"rows. For more detailed information, please rerun with the "
"TPETRA_VERBOSE environment variable set to 1. (You do not "
"need to recompile.)";
"TPETRA_VERBOSE environment variable set to 1. ";
if (verbose) {
*gblErrStrm << " Here are error messages from all "
"processes:" << endl;
Expand Down
Loading

0 comments on commit e17e27e

Please sign in to comment.