Go to the documentation of this file.
27 # if __has_include(<fj_tool/fapp.h>)
28 # include <fj_tool/fapp.h>
52 int mult(
const std::string&);
57 return mult(
"test_Mult_Clover.yaml");
63 return mult(
"test_Mult_CloverGeneral.yaml");
69 return mult(
"test_Mult_Clover_Chemical.yaml");
82 return mult(
"test_Mult_Wilson_TwistedMass.yaml");
95 return mult(
"test_Mult_WilsonGeneral.yaml");
101 return mult(
"test_Mult_Wilson_Chemical.yaml");
112 #ifdef USE_TESTMANAGER_AUTOREGISTER
114 #if defined(USE_GROUP_SU2)
123 "Mult.CloverGeneral",
128 "Mult.Clover_Chemical",
139 "Mult.Wilson_TwistedMass",
150 "Mult.WilsonGeneral",
155 "Mult.Wilson_Chemical",
169 int mult(
const std::string& filename_input)
185 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
186 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
187 const string readfile = params_test.
get_string(
"config_filename_input");
188 const string str_rand_type = params_test.
get_string(
"random_number_type");
189 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
190 const int Nmult = params_test.
get_int(
"number_of_mult");
191 const string str_vlevel = params_test.
get_string(
"verbose_level");
193 const bool do_check = params_test.
is_set(
"expected_result");
194 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
195 const double tolerance = params_test.
get_double(
"tolerance");
197 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
202 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
203 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
205 vout.
general(
vl,
" rand_type = %s\n", str_rand_type.c_str());
226 if (str_gconf_status ==
"Continue") {
228 }
else if (str_gconf_status ==
"Cold_start") {
230 }
else if (str_gconf_status ==
"Hot_start") {
233 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
239 unique_ptr<Fopr> fopr(Fopr::New(str_fopr_type, params_fopr));
240 fopr->set_config(&U);
263 for (
int i = 0; i < Nmult; ++i) {
278 const double gflops_mult = fopr->flop_count() * Nmult / (elapse_sec * NPE * Nthread);
288 return Test::verify(result, expected_result, tolerance);
int verify(const double result, const double expected, double eps)
int mult_Wilson_TwistedMass()
int non_NULL(const std::string v)
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)
int mult_Clover_Chemical()
int mult_Wilson_Chemical()
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
const std::string test_name
unsigned long get_unsigned_long(const string &key) const
int mult(const std::string &)
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.
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
static bool RegisterTest(const std::string &key, const Test_function func)