Skip to content

Commit 901344c

Browse files
committed
Minor fixes to tuning interface (and debugging statements)
Signed-off-by: Chris Siefert <[email protected]>
1 parent 32280d0 commit 901344c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/muelu/src/Utils/MueLu_KokkosTuningInterface.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@ void KokkosTuningInterface::SetMueLuParameters(size_t kokkos_context_id, Teuchos
222222
// Start the tuning
223223
KTE::request_output_values(kokkos_context_id, out_variables.size(), out_variables.data());
224224

225+
// Diagnostic output
226+
if (IsPrint(Runtime1)) {
227+
GetOStream(Runtime1) << "Tuned Parameters: "<<std::endl;
228+
for(int i=0; i<(int)out_variables.size(); i++) {
229+
if (out_typenames[i] == "int")
230+
GetOStream(Runtime1) << "- " << out_names[i] << ": " << out_variables[i].value.int_value<<std::endl;
231+
else if (out_typenames[i] == "double")
232+
GetOStream(Runtime1) << "- " << out_names[i] << ": " << out_variables[i].value.double_value<<std::endl;
233+
}
234+
}
235+
225236
// Unpack the tuned values
226237
for(int i=0; i<(int)out_names.size(); i++) {
227238

@@ -231,7 +242,6 @@ void KokkosTuningInterface::SetMueLuParameters(size_t kokkos_context_id, Teuchos
231242
std::vector<std::string> treeWalk = SplitString(out_names[i],"||");
232243

233244
for(int j=0; j<(int) treeWalk.size(); j++)
234-
std::cout<<"["<<j<<"] "<<treeWalk[j]<<std::endl;
235245

236246
// Walk down all but the last guy
237247
for(int j=0;j<(int) treeWalk.size()-1; j++) {

0 commit comments

Comments
 (0)