Go to the documentation of this file.
27 # if __has_include(<fj_tool/fapp.h>)
28 # include <fj_tool/fapp.h>
51 int mult(
const std::string&);
56 return mult(
"test_Mult_Clover_eo.yaml");
62 return mult(
"test_Mult_Wilson_eo.yaml");
66 #ifdef USE_TESTMANAGER_AUTOREGISTER
68 #if defined(USE_GROUP_SU2)
85 int mult(
const std::string& filename_input)
101 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
102 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
103 const string readfile = params_test.
get_string(
"config_filename_input");
104 const string str_rand_type = params_test.
get_string(
"random_number_type");
105 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
106 const int Nmult = params_test.
get_int(
"number_of_mult");
107 const string str_vlevel = params_test.
get_string(
"verbose_level");
109 const bool do_check = params_test.
is_set(
"expected_result");
110 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
111 const double tolerance = params_test.
get_double(
"tolerance");
113 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
118 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
119 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
121 vout.
general(
vl,
" rand_type = %s\n", str_rand_type.c_str());
142 if (str_gconf_status ==
"Continue") {
144 }
else if (str_gconf_status ==
"Cold_start") {
146 }
else if (str_gconf_status ==
"Hot_start") {
149 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
155 unique_ptr<Fopr> fopr(Fopr::New(str_fopr_type, params_fopr));
157 fopr->set_config(&U);
167 const int Nin = b.
nin();
169 const int Nex = b.
nex();
171 Field be(Nin, Nvol / 2, Nex);
172 Field ye(Nin, Nvol / 2, Nex);
185 for (
int i = 0; i < Nmult; ++i) {
200 const double gflops_mult = fopr->flop_count() * Nmult / (elapse_sec * NPE * Nthread);
210 return Test::verify(result, expected_result, tolerance);
int verify(const double result, const double expected, double eps)
int non_NULL(const std::string v)
const std::string test_name
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)
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
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
Wilson-type fermion field.
Test of Mult with even-odd preconditioning.
string get_string(const string &key) const
void crucial(const char *format,...)
Container of Field-type object.
double elapsed_sec() const
void general(const char *format,...)
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
int mult(const std::string &)