• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Open-Sn / opensn / 25359736025

04 May 2026 04:34PM UTC coverage: 75.416% (-0.001%) from 75.417%
25359736025

push

github

web-flow
Merge pull request #1038 from quocdang1998/sycl-mod

Extend SYCL implementation for caribou and OpenSn

21817 of 28929 relevant lines covered (75.42%)

65645385.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/framework/runtime.cc
1
// SPDX-FileCopyrightText: 2024 The OpenSn Authors <https://open-sn.github.io/opensn/>
2
// SPDX-License-Identifier: MIT
3

4
#include "framework/runtime.h"
5
#include "framework/math/math.h"
6
#include "framework/object_factory.h"
7
#include "framework/utils/timer.h"
8
#include "config.h"
9
#include "caliper/cali.h"
10
#include "hdf5.h"
11
#include <iostream>
12

13
namespace opensn
14
{
15

16
// Global variables
17
mpi::Communicator mpi_comm;
18
bool use_caliper = false;
19
std::string cali_config("runtime-report(calc.inclusive=true),max_column_width=80");
20
cali::ConfigManager cali_mgr;
21
Timer program_timer;
22
std::filesystem::path input_path;
23

24
int
25
Initialize()
675✔
26
{
27
  if (use_caliper)
675✔
28
  {
29
    cali_mgr.add(cali_config.c_str());
×
30
    cali_set_global_string_byname("opensn.version", GetVersionStr().c_str());
×
31
    cali_set_global_string_byname("opensn.input", input_path.c_str());
×
32
    cali_mgr.start();
×
33
  }
34

35
  CALI_MARK_BEGIN(opensn::program.c_str());
675✔
36

37
  // Disable internal HDF error reporting
38
  H5Eset_auto2(H5E_DEFAULT, nullptr, nullptr);
675✔
39

40
  return 0;
675✔
41
}
42

43
void
44
Finalize()
673✔
45
{
46
  // Flush standard streams
47
  std::cout.flush();
673✔
48
  std::cerr.flush();
673✔
49
  std::clog.flush();
673✔
50

51
  opensn::mpi_comm.barrier();
673✔
52

53
  CALI_MARK_END(opensn::program.c_str());
673✔
54
}
673✔
55

56
std::string
57
GetVersionStr()
206✔
58
{
59
  return PROJECT_VERSION;
206✔
60
}
61

62
} // namespace opensn
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc