Skip to content

Commit

Permalink
fix check of UseExternalLibrary=quda && UseExternalInverter=quda
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcogarofalo committed Jan 23, 2024
1 parent fa3b051 commit a86fee5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 12 additions & 0 deletions monomial/monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ int init_monomials(const int V, const int even_odd_flag) {
monomial_list[i].Qm = &Qsw_full_minus_psi;
}
init_swpm(VOLUME);
if(monomial_list[i].external_library==QUDA_LIB){
if(monomial_list[i].solver_params.external_inverter != QUDA_INVERTER){
tm_debug_printf(0,0,"Error: CLOVERDET monomial of UseExternalLibrary = quda is not supported without UseExternalInverter = quda\n");
exit(1);
}
}
clover_monomials[no_clover_monomials] = i;
no_clover_monomials++;
if(g_proc_id == 0 && g_debug_level > 1) {
Expand All @@ -271,6 +277,12 @@ int init_monomials(const int V, const int even_odd_flag) {
monomial_list[i].Qp = &Qsw_plus_psi;
monomial_list[i].Qm = &Qsw_minus_psi;
init_swpm(VOLUME);
if(monomial_list[i].external_library==QUDA_LIB){
if(monomial_list[i].solver_params.external_inverter != QUDA_INVERTER){
tm_debug_printf(0,0,"Error: CLOVERDETRATIO monomial of UseExternalLibrary = quda is not supported without UseExternalInverter = quda\n");
exit(1);
}
}
if(g_proc_id == 0 && g_debug_level > 1) {
printf("# Initialised monomial %s of type CLOVERDETRATIO, no_monomials= %d\n",
monomial_list[i].name,
Expand Down
4 changes: 0 additions & 4 deletions read_input.l
Original file line number Diff line number Diff line change
Expand Up @@ -2340,10 +2340,6 @@ static inline double fltlist_next_token(int * const list_end){
}
{SPC}*UseExternalLibrary{EQL}quda {
mnl->external_library = QUDA_LIB;
if(mnl->solver_params.external_inverter != QUDA_INVERTER){
printf("Error: usage of UseExternalLibrary = quda in line %d, monomial %d is not supported without UseExternalInverter = quda\n", line_of_file, current_monomial);
exit(1);
}
if(myverbose) printf(" UseExternalLibrary set to quda in line %d, monomial %d\n", line_of_file, current_monomial);
}
{SPC}*UseSloppyPrecision{EQL}yes {
Expand Down

0 comments on commit a86fee5

Please sign in to comment.