This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathunit_tests.C
47 lines (33 loc) · 1.54 KB
/
unit_tests.C
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
/*------------------------------------------------------------------------*/
/* Copyright 2014 Sandia Corporation. */
/* This software is released under the license detailed */
/* in the file, LICENSE, which is located in the top-level Nalu */
/* directory structure */
/*------------------------------------------------------------------------*/
#include <gtest/gtest.h> // for InitGoogleTest, etc
#include <mpi.h> // for MPI_Comm_rank, MPI_Finalize, etc
#include <Kokkos_Core.hpp>
#include <stk_util/parallel/Parallel.hpp>
// can't use stk_unit_test_utils until Trilinos/stk is updated, configuration is changed...
// #include <stk_unit_test_utils/ParallelGtestOutput.hpp>
#include "include/NaluEnv.h"
int gl_argc = 0;
char** gl_argv = 0;
int main(int argc, char **argv)
{
MPI_Init(&argc, &argv);
Kokkos::initialize(argc, argv);
//NaluEnv will call MPI_Finalize for us.
sierra::nalu::NaluEnv::self();
testing::InitGoogleTest(&argc, argv);
gl_argc = argc;
gl_argv = argv;
// can't use stk_unit_test_utils until Trilinos/stk is updated, configuration is changed...
// int procId = stk::parallel_machine_rank(MPI_COMM_WORLD);
// stk::unit_test_util::create_parallel_output(procId);
int returnVal = RUN_ALL_TESTS();
Kokkos::finalize_all();
//NaluEnv will call MPI_Finalize when the NaluEnv singleton is cleaned up,
//which is after we return.
return returnVal;
}