32 namespace Test_Mult_Wilson_eo {
37 const std::string filename_input =
"test_Mult_Wilson_eo.yaml";
38 const std::string filename_output =
"stdout";
40 class Parameters_Test_Mult_Wilson :
public Parameters {
42 Parameters_Test_Mult_Wilson()
44 Register_string(
"gauge_config_status",
"NULL");
45 Register_string(
"gauge_config_type_input",
"NULL");
46 Register_string(
"config_filename_input",
"NULL");
48 Register_int(
"number_of_mult", 0);
50 Register_string(
"verbose_level",
"NULL");
52 Register_double(
"expected_result", 0.0);
60 #ifdef USE_TESTMANAGER_AUTOREGISTER
62 #if defined(USE_GROUP_SU2)
86 Parameters *params_test =
new Parameters_Test_Mult_Wilson;
94 params_manager.
read_params(filename_input, params_all);
96 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
97 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
98 const string readfile = params_test->
get_string(
"config_filename_input");
99 const int Nmult = params_test->
get_int(
"number_of_mult");
100 const string str_vlevel = params_test->
get_string(
"verbose_level");
102 const bool do_check = params_test->
is_set(
"expected_result");
103 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
105 const string str_gmset_type = params_wilson->
get_string(
"gamma_matrix_type");
110 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
111 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
112 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
114 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
115 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
131 if (str_gconf_status ==
"Continue") {
133 }
else if (str_gconf_status ==
"Cold_start") {
135 }
else if (str_gconf_status ==
"Hot_start") {
139 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n",
test_name.c_str(), str_gconf_status.c_str());
163 Field be(Nin, Nvol / 2, Nex);
164 Field ye(Nin, Nvol / 2, Nex);
176 for (
int i = 0; i < Nmult; ++i) {
177 fopr_w->
mult(ye, be);
189 double gflo_mult = fopr_w->
flop_count() / 1.0e+9;
190 double gflops_mult = gflo_mult * Nmult / (elapse_sec * NPE * Nthread);
198 delete params_wilson;
213 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void read_params(const std::string ¶ms_file, Parameters *params)
read parameters from file.
void detailed(const char *format,...)
double elapsed_sec() const
void general(const char *format,...)
Container of Field-type object.
void set_parameters(const Parameters ¶ms)
int get_int(const string &key) const
const Field mult(const Field &f)
multiplies fermion operator to a given field and returns the resultant field.
static Parameters * New(const std::string &realm)
void set_random(RandomNumbers *rand)
Wilson-type fermion field.
const std::string test_name
double flop_count()
this returns the number of floating point number operations.
static bool RegisterTest(const std::string &key, const Test_function func)
bool is_set(const string &) const
double get_double(const string &key) const
void set_config(Field *U)
setting pointer to the gauge configuration.
Set of Gamma Matrices: basis class.
static int get_num_threads_available()
returns number of threads (works outside of parallel region).
int non_NULL(const std::string v)
void crucial(const char *format,...)
Even-odd Wilson fermion operator.
void Register_Parameters(const string &, Parameters *const)
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Parameter manager with YAML parser.
GaugeConfig class for file I/O of gauge configuration.
int verify(const double expected, const double result)
void read_file(Field *u, const string &filename)
string get_string(const string &key) const
static VerboseLevel set_verbose_level(const std::string &str)