Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_TpetraCrsMatrixUQPCEUnitTest_Threads.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
13 
15 
16 #include "Kokkos_Core.hpp"
17 #include <Tpetra_KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
18 
19 // Instantiate tests for threads node
20 typedef Tpetra::KokkosCompat::KokkosDeviceWrapperNode<Kokkos::Threads> ThreadsWrapperNode;
22 
23 int main( int argc, char* argv[] ) {
24  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
25 
26  // Initialize threads
27  const size_t num_cores =
28  Kokkos::hwloc::get_available_numa_count() *
29  Kokkos::hwloc::get_available_cores_per_numa();
30  const size_t num_hyper_threads =
31  Kokkos::hwloc::get_available_threads_per_core();
32  // const size_t num_cores = 1;
33  // const size_t num_hyper_threads = 1;
34  Kokkos::InitializationSettings init_args;
35  init_args.set_num_threads(num_cores*num_hyper_threads);
36  Kokkos::initialize( init_args );
37  Kokkos::print_configuration(std::cout);
38 
39  // Run tests
42 
43  // Finish up
44  Kokkos::finalize();
45 
46  return ret;
47 }
static int runUnitTestsFromMain(int argc, char *argv[])
static void setGloballyReduceTestResult(const bool globallyReduceUnitTestResult)
int main(int argc, char **argv)
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< Kokkos::Threads > ThreadsWrapperNode
#define CRSMATRIX_UQ_PCE_TESTS_N(N)