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

NREL / SolTrace / 20379147445

19 Dec 2025 06:34PM UTC coverage: 89.725% (+0.5%) from 89.184%
20379147445

push

github

web-flow
Implement multi-threading in NativeRunner (#91)

* Initial implementation of multi-threading in NativeRunner

* Fix seeding issue; address copilot comments; implement logging

* Add missing header

* Run performance tests only for release build; adjust parameters for cancel multithread test

* Fix clear and setup call ordering in RayData

* Update profile flags; fix printf compiler warning

* Still trying to fix coverage

* Remove multi-threading tests from coverage; remove performance tests for debug builds

* Add missing header

* Increase test coverage; address copilot comments

* Make number of rays traced consistent across number of threads

* Increase time for native runner validation test

430 of 471 new or added lines in 11 files covered. (91.3%)

2 existing lines in 2 files now uncovered.

6104 of 6803 relevant lines covered (89.73%)

7499675.17 hits per line

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

28.57
/coretrace/simulation_runner/simulation_runner.hpp
1
#ifndef SOLTRACE_SIMULATION_RUNNER_H
2
#define SOLTRACE_SIMULATION_RUNNER_H
3

4
#include <map>
5

6
#include "simulation_data.hpp"
7
#include "simulation_result.hpp"
8

9
namespace SolTrace::Runner
10
{
11

12
    enum class RunnerStatus
13
    {
14
        CANCEL,
15
        ERROR,
16
        RUNNING,
17
        SUCCESS,
18
        TIMEOUT,
19
        UNKNOWN,
20
    };
21

22
    const std::map<RunnerStatus, std::string> STATUS_TO_STR{
23
        {RunnerStatus::CANCEL, "CANCEL"},
24
        {RunnerStatus::ERROR, "ERROR"},
25
        {RunnerStatus::RUNNING, "RUNNING"},
26
        {RunnerStatus::SUCCESS, "SUCCESS"},
27
        {RunnerStatus::TIMEOUT, "TIMEOUT"},
28
        {RunnerStatus::UNKNOWN, "UNKNOWN"}};
29

NEW
30
    inline const std::string &status_string(const RunnerStatus sts)
×
31
    {
NEW
32
        auto item = STATUS_TO_STR.find(sts);
×
NEW
33
        if (item != STATUS_TO_STR.cend())
×
34
        {
NEW
35
            return item->second;
×
36
        }
37
        else
38
        {
NEW
39
            return STATUS_TO_STR.find(RunnerStatus::UNKNOWN)->second;
×
40
        }
41
    }
42

43
    class SimulationRunner
44
    {
45
    public:
46
        SimulationRunner() {};
26✔
47
        virtual ~SimulationRunner() {};
26✔
48

49
        // Disable copy constructor
50
        SimulationRunner(const SimulationRunner &) = delete;
51
        // Disable move constructor
52
        SimulationRunner(SimulationRunner &&) = delete;
53
        // Disable assignment operators
54
        SimulationRunner &operator=(const SimulationRunner &) = delete;
55
        SimulationRunner &operator=(SimulationRunner &&) = delete;
56

57
        virtual RunnerStatus initialize() = 0;
58
        virtual RunnerStatus setup_simulation(const SolTrace::Data::SimulationData *data) = 0;
59
        // TODO: Determine what can be "updated", that is changed
60
        virtual RunnerStatus update_simulation(const SolTrace::Data::SimulationData *data) = 0;
61
        virtual RunnerStatus run_simulation() = 0;
62
        virtual RunnerStatus status_simulation(double *progress = nullptr) = 0;
63
        virtual RunnerStatus cancel_simulation() = 0;
64
        virtual RunnerStatus report_simulation(SolTrace::Result::SimulationResult *result,
65
                                               int level_spec) = 0;
66

67
    private:
68
    };
69

70
} // namespace SolTrace::Runner
71

72
#endif
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