Go to the documentation of this file.
25 # if __has_include(<fj_tool/fapp.h>)
26 # include <fj_tool/fapp.h>
45 const std::string filename_input =
"test_Mult_Wilson.yaml";
51 #ifdef USE_TESTMANAGER_AUTOREGISTER
77 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
78 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
79 const string readfile = params_test.
get_string(
"config_filename_input");
80 const string str_rand_type = params_test.
get_string(
"random_number_type");
81 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
82 const int Nmult = params_test.
get_int(
"number_of_mult");
83 const string str_vlevel = params_test.
get_string(
"verbose_level");
85 const bool do_check = params_test.
is_set(
"expected_result");
86 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
87 const double tolerance = params_test.
get_double(
"tolerance");
92 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
93 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
116 if (str_gconf_status ==
"Continue") {
118 }
else if (str_gconf_status ==
"Cold_start") {
120 }
else if (str_gconf_status ==
"Hot_start") {
123 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
152 for (
int i = 0; i < Nmult; ++i) {
167 const double gflops_mult = fopr.
flop_count() * Nmult / (elapse_sec * NPE * Nthread);
177 #if defined(USE_GROUP_SU2)
182 return Test::verify(result, expected_result, tolerance);
int verify(const double result, const double expected, double eps)
int non_NULL(const std::string v)
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void set(const int jin, const int site, const int jex, double v)
int get_int(const string &key) const
void detailed(const char *format,...)
void read(Field_G &U, const string &filename=string())
static bool initialize(const std::string &rng_type, unsigned long seed)
Test of Mult with Wilson fermion, prepared for beginners.
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
void mult(Field &v, const Field &w)
multiplies fermion operator to a given field.
const std::string test_name
unsigned long get_unsigned_long(const string &key) const
static int get_num_threads_available()
returns number of threads (works outside of parallel region).
GaugeConfig class for file I/O of gauge configuration.
static VerboseLevel set_verbose_level(const std::string &str)
bool is_set(const string &key) const
void set_config(Field *U)
sets the gauge configuration.
Wilson-type fermion field.
string get_string(const string &key) const
void crucial(const char *format,...)
double elapsed_sec() const
void general(const char *format,...)
Parameters lookup(const string &key) const
double flop_count()
this returns the number of floating point operations.
static bool RegisterTest(const std::string &key, const Test_function func)