Bridge++
Version 1.5.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
main.cpp
Go to the documentation of this file.
1
14
#include "
bridge_setup.h
"
15
#ifdef DEBUG
16
#include "
bridge_init_factory.h
"
17
#endif
18
#include "
Parameters/commonParameters.h
"
19
#include "
Parameters/parameters.h
"
20
#include "
Parameters/parameterManager_YAML.h
"
21
#include "
Tools/timer.h
"
22
23
#ifdef USE_TESTMANAGER
24
#include "
run_testmanager.h
"
25
#endif
26
27
#include "
IO/bridgeIO.h
"
28
using
Bridge::vout
;
29
30
31
const
std::string
filename_main_input
=
"main.yaml"
;
32
// const std::string filename_main_input = "stdin";
33
34
//- prototype declarations
35
int
run_test
();
36
37
38
//====================================================================
39
int
main
(
int
argc,
char
*argv[])
40
{
41
// ### initial setup ###
42
Bridge::VerboseLevel
vl
=
Bridge::GENERAL
;
43
44
//- initialization step one
45
bridge_initialize
(&argc, &argv);
46
47
std::string filename_input =
filename_main_input
;
48
if
(filename_input ==
"stdin"
) {
49
vout
.
general
(vl,
"input filename : "
);
50
std::cin >> filename_input;
51
vout
.
general
(vl,
"%s\n"
, filename_input.c_str());
52
}
else
{
53
vout
.
general
(vl,
"input filename : %s\n"
, filename_input.c_str());
54
}
55
vout
.
general
(vl,
"\n"
);
56
57
//- load input parameters
58
Parameters
params_all =
ParameterManager::read
(filename_input);
59
Parameters
params_main = params_all.
lookup
(
"Main"
);
60
61
//- initialization step two: setup using parameter values,
62
bridge_setup
(params_main);
63
64
#ifdef USE_FACTORY
65
#ifdef DEBUG
66
// bridge_report_factory();
67
#endif
68
#endif
69
70
//- start timer
71
unique_ptr<Timer>
timer(
new
Timer
(
"Main"
));
72
timer->
start
();
73
74
#ifdef USE_TESTMANAGER
75
run_testmanager
(argc, argv);
76
#else
77
run_test
();
78
#endif
79
80
//- find total elapsed time
81
timer->
report
();
82
83
//- finalization step
84
bridge_finalize
();
85
86
return
EXIT_SUCCESS;
87
}
88
89
90
//====================================================================
91
//============================================================END=====
Bridge::vout
BridgeIO vout
Definition:
bridgeIO.cpp:503
filename_main_input
const std::string filename_main_input
Definition:
main.cpp:31
Bridge::BridgeIO::general
void general(const char *format,...)
Definition:
bridgeIO.cpp:197
run_testmanager.h
Parameters
Class for parameters.
Definition:
parameters.h:46
bridge_setup
void bridge_setup(const Parameters ¶ms)
Definition:
bridge_setup.cpp:106
timer.h
bridge_finalize
int bridge_finalize()
Definition:
bridge_setup.cpp:94
bridge_setup.h
run_test
int run_test()
Definition:
test_HMC_Clover_Nf2.cpp:63
commonParameters.h
Parameters::lookup
Parameters lookup(const string &key) const
Definition:
parameters.h:79
run_testmanager
int run_testmanager(int argc, char **argv)
Definition:
run_testmanager.cpp:32
Timer::start
void start()
Definition:
timer.cpp:44
ParameterManager::read
static void read(const std::string ¶ms_file, Parameters ¶ms)
Definition:
parameterManager.cpp:33
parameterManager_YAML.h
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition:
parameterCheck.cpp:18
Bridge::VerboseLevel
VerboseLevel
Definition:
bridgeIO.h:42
bridgeIO.h
bridge_init_factory.h
Timer
Definition:
timer.h:31
Bridge::unique_ptr
Definition:
unique_pointer.h:24
parameters.h
main
int main(int argc, char *argv[])
Definition:
main.cpp:39
Timer::report
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
Definition:
timer.cpp:128
bridge_initialize
int bridge_initialize(int *pargc, char ***pargv)
Definition:
bridge_setup.cpp:32
Bridge::GENERAL
Definition:
bridgeIO.h:45
tests
src
main.cpp
Generated on Thu Mar 19 2020 10:28:24 for Bridge++ by
1.8.6