Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rokarur committed Dec 14, 2024
1 parent b7abaf2 commit 091ff76
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 10 additions & 8 deletions lib/interface_quda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5438,7 +5438,8 @@ void performAdjGFlowSafe(void *h_out, void *h_in, QudaInvertParam *inv_param, Qu
double b = -8.;

int comm_dim[4] = {};
int measurement_n = 0; // The nth measurement to take
// Will add fermion measruement utilities later
// int measurement_n = 0; // The nth measurement to take
// only switch on comms needed for directions with a derivative
for (int i = 0; i < 4; i++) { comm_dim[i] = comm_dim_partitioned(i); }

Expand Down Expand Up @@ -5531,6 +5532,7 @@ void adjSafeEvolve(std::vector<std::reference_wrapper<ColorSpinorField>> sf_list

int &i_glob = meas_cinf[0].get();
int &measurement_n = meas_cinf[1].get();
measurement_n = 0;

int parity = 0;

Expand Down Expand Up @@ -5726,7 +5728,7 @@ void performAdjGFlowHier(void *h_out, void *h_in, QudaInvertParam *inv_param, Qu
std::vector<int> hier_list;
//The first stage is saved at the very beginning, so its presence is implicit
hier_list = get_hier_list(smear_param->n_steps, n_b,smear_param->adj_n_save);
logQuda(QUDA_SUMMARIZE,"hier list size (number of gauge fields to save) is %lu\n",hier_list.size());
logQuda(QUDA_SUMMARIZE,"hier list size (number of gauge fields to save) is %d\n",(int) hier_list.size());
if (threshold < hier_list.back()) {threshold = hier_list.back(); logQuda(QUDA_SUMMARIZE, "threshold changed to %d",threshold);}
else logQuda(QUDA_SUMMARIZE, "threshold is %d\n",threshold);

Expand All @@ -5742,7 +5744,7 @@ void performAdjGFlowHier(void *h_out, void *h_in, QudaInvertParam *inv_param, Qu
}
if (i > 0) std::swap(gout,gin);

for (unsigned int j = 0; j < hier_list[i]; j++){
for (unsigned int j = 0; j < (unsigned int) hier_list[i]; j++){
if (j > 0) std::swap(gout,gin);

WFlowStep(gout, gaugeTemp, gin, smear_param->epsilon, smear_param->smear_type);
Expand All @@ -5768,8 +5770,8 @@ void performAdjGFlowHier(void *h_out, void *h_in, QudaInvertParam *inv_param, Qu
adjSafeEvolve(sf_list,gf_list,smear_param,hier_list.back(),profileAdjGFlowHier,meas_cinf);

logQuda(QUDA_DEBUG_VERBOSE,"Previous hier list elements: \n");
for (int j = 0; j < hier_list.size(); j++ ){
logQuda(QUDA_DEBUG_VERBOSE,"%lu \n",hier_list[j]);
for (int j = 0; j < (int) hier_list.size(); j++ ){
logQuda(QUDA_DEBUG_VERBOSE,"%d \n", (int) hier_list[j]);
}
logQuda(QUDA_DEBUG_VERBOSE,"\n");

Expand All @@ -5795,12 +5797,12 @@ void performAdjGFlowHier(void *h_out, void *h_in, QudaInvertParam *inv_param, Qu
GaugeField g_1 = gauge_stages[ret_idx];

logQuda(QUDA_DEBUG_VERBOSE,"Modified hier list elements: \n");
for (int j = 0; j < hier_list.size(); j++ ){
logQuda(QUDA_DEBUG_VERBOSE,"%d \n",hier_list[j]);
for (int j = 0; j < (int) hier_list.size(); j++ ){
logQuda(QUDA_DEBUG_VERBOSE,"%d \n",(int) hier_list[j]);
}
logQuda(QUDA_DEBUG_VERBOSE,"\n");

for (unsigned int j = 0; j < hier_list[ret_idx]; j++){
for (unsigned int j = 0; j < (unsigned int) hier_list[ret_idx]; j++){
if (j > 0) std::swap(g_2,g_1);
WFlowStep(g_2, gaugeTemp, g_1, smear_param->epsilon, smear_param->smear_type);
}
Expand Down
20 changes: 9 additions & 11 deletions tests/su3_fermion_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ int main(int argc, char **argv)
// Load the gauge field to the device
loadGaugeQuda((void *)gauge, &gauge_param);
saveGaugeQuda(new_gauge, &gauge_param);

// Prepare various perf info
long long flops_plaquette = 6ll * 597 * V;
long long flops_ploop = 198ll * V + 6 * V / gauge_param.X[3];

// Prepare a gauge observable struct
QudaGaugeObservableParam param = newQudaGaugeObservableParam();

// start the timer
quda::host_timer_t host_timer, host_safe_timer, host_hier_timer, host_fwd_timer;

// The commented out section is all geared towards gauge observables, so unlikely to be needed for now
// // Prepare various perf info
// long long flops_plaquette = 6ll * 597 * V;
// long long flops_ploop = 198ll * V + 6 * V / gauge_param.X[3];

// // Prepare a gauge observable struct
// QudaGaugeObservableParam param = newQudaGaugeObservableParam();

// The user may specify which measurements they wish to perform/omit
// using the QudaGaugeObservableParam struct, and whether or not to
Expand All @@ -197,8 +197,6 @@ int main(int argc, char **argv)
obs_param[i].compute_qcharge = QUDA_BOOLEAN_TRUE;
obs_param[i].su_project = su_project ? QUDA_BOOLEAN_TRUE : QUDA_BOOLEAN_FALSE;
}

QudaGaugeObservableParam *obs_adj_safe(obs_param), *obs_adj_hier(obs_param);

// We here set all the problem parameters for all possible smearing types.
QudaGaugeSmearParam smear_param = newQudaGaugeSmearParam();
Expand Down Expand Up @@ -256,7 +254,7 @@ int main(int argc, char **argv)
// else
// check_norm.data<double *>()[i] = -1.*check.data<double *>()[i];
// }

check_safe = quda::ColorSpinorField(cs_param);
check_hier = quda::ColorSpinorField(cs_param);
check_fwd = quda::ColorSpinorField(cs_param);
Expand Down

0 comments on commit 091ff76

Please sign in to comment.