From a86fee5d506fd36e0948c42179c77252037d3e4d Mon Sep 17 00:00:00 2001 From: Marcogarofalo Date: Tue, 23 Jan 2024 16:55:55 +0100 Subject: [PATCH] fix check of UseExternalLibrary=quda && UseExternalInverter=quda --- monomial/monomial.c | 12 ++++++++++++ read_input.l | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/monomial/monomial.c b/monomial/monomial.c index b7e8a55c5..ee3ddea02 100644 --- a/monomial/monomial.c +++ b/monomial/monomial.c @@ -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) { @@ -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, diff --git a/read_input.l b/read_input.l index 97d0e36b1..3b39524dc 100644 --- a/read_input.l +++ b/read_input.l @@ -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 {