forked from llnl/RAJAPerf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRAJAPerfSuiteDriver.cpp
More file actions
61 lines (47 loc) · 1.52 KB
/
Copy pathRAJAPerfSuiteDriver.cpp
File metadata and controls
61 lines (47 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2017-22, Lawrence Livermore National Security, LLC
// and RAJA Performance Suite project contributors.
// See the RAJAPerf/LICENSE file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#ifdef RUN_KOKKOS
#include <Kokkos_Core.hpp>
#endif
#include "common/Executor.hpp"
#include <iostream>
#ifdef RAJA_PERFSUITE_ENABLE_MPI
#include <mpi.h>
#endif
//------------------------------------------------------------------------------
int main(int argc, char** argv)
{
#ifdef RAJA_PERFSUITE_ENABLE_MPI
MPI_Init(&argc, &argv);
int num_ranks;
MPI_Comm_size(MPI_COMM_WORLD, &num_ranks);
rajaperf::getCout() << "\n\nRunning with " << num_ranks << " MPI ranks..." << std::endl;
#endif
#ifdef RUN_KOKKOS
Kokkos::initialize(argc, argv);
#endif
// STEP 1: Create suite executor object
rajaperf::Executor executor(argc, argv);
// STEP 2: Assemble kernels and variants to run
executor.setupSuite();
// STEP 3: Report suite run summary
// (enable users to catch errors before entire suite is run)
executor.reportRunSummary(rajaperf::getCout());
// STEP 4: Execute suite
executor.runSuite();
// STEP 5: Generate suite execution reports
executor.outputRunData();
rajaperf::getCout() << "\n\nDONE!!!...." << std::endl;
#ifdef RUN_KOKKOS
Kokkos::finalize();
#endif
#ifdef RAJA_PERFSUITE_ENABLE_MPI
MPI_Finalize();
#endif
return 0;
}