]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Omit instantiating a static CUDA::Handle
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 17 Nov 2018 13:26:51 +0000 (14:26 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 17 Nov 2018 15:12:30 +0000 (16:12 +0100)
source/base/cuda.cu
tests/tests.h

index 19a7ea64b514b3f6e5c5b536f47444bec99d9e4f..28c2b7c0ba40ce71fb76c7c5ed28ca46e32fe93b 100644 (file)
@@ -45,18 +45,6 @@ namespace Utilities
 
     Handle::~Handle()
     {
-      dealii::GrowingVectorMemory<
-        LinearAlgebra::CUDAWrappers::Vector<float>>::release_unused_memory();
-      dealii::GrowingVectorMemory<
-        LinearAlgebra::CUDAWrappers::Vector<double>>::release_unused_memory();
-
-      dealii::GrowingVectorMemory<
-        LinearAlgebra::distributed::Vector<float, dealii::MemorySpace::CUDA>>::
-        release_unused_memory();
-      dealii::GrowingVectorMemory<
-        LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::CUDA>>::
-        release_unused_memory();
-
       cusolverStatus_t cusolver_error_code =
         cusolverDnDestroy(cusolver_dn_handle);
       AssertCusolver(cusolver_error_code);
index d4154a83b835d066d2fa3b67ca4c2bf5bce96d1d..2337c0bea5cf23c74066bccaaf1b32473a5edf97 100644 (file)
@@ -598,14 +598,9 @@ struct MPILogInitAll
 // cards for different processes even if only one node is used. The choice below
 // is based on the MPI proccess id.
 // MPI needs to be initialized before using this function.
-//
-// Also initialize a dummy handle that makes sure that unused memory is released
-// before the device shuts down.
 void
 init_cuda(const bool use_mpi = false)
 {
-  static Utilities::CUDA::Handle cuda_handle;
-
 #  ifndef DEAL_II_WITH_MPI
   Assert(use_mpi == false, ExcInternalError());
 #  endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.