MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / main

Function main

python-package/compile/src/main.cpp:10–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <iostream>
9
10int main(int argc, char** argv) {
11 bool success = false;
12 try {
13 LightGBM::Application app(argc, argv);
14 app.Run();
15
16#ifdef USE_MPI
17 LightGBM::Linkers::MpiFinalizeIfIsParallel();
18#endif
19
20 success = true;
21 }
22 catch (const std::exception& ex) {
23 std::cerr << "Met Exceptions:" << std::endl;
24 std::cerr << ex.what() << std::endl;
25 }
26 catch (const std::string& ex) {
27 std::cerr << "Met Exceptions:" << std::endl;
28 std::cerr << ex << std::endl;
29 }
30 catch (...) {
31 std::cerr << "Unknown Exceptions" << std::endl;
32 }
33
34 if (!success) {
35#ifdef USE_MPI
36 LightGBM::Linkers::MpiAbortIfIsParallel();
37#endif
38
39 exit(-1);
40 }
41 }

Callers

nothing calls this directly

Calls 2

RunMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected