Skip to content

Commit

Permalink
Merge branch 'develop' into multiple-parents
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Sep 10, 2024
2 parents fcdbdfe + e44221a commit d48a450
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/apex/apex_policies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,14 @@ int apex_exhaustive_policy(shared_ptr<apex_tuning_session> tuning_session,
// the context data is a pointer to a boolean value
force = *((bool*)(context.data));
}

// get a measurement of our current setting - before we check for convergence!
double new_value = tuning_session->metric_of_interest();

if (tuning_session->exhaustive_session.converged() && force) {
/* Report the performance we've just measured. */
if (!tuning_session->converged_message) {
tuning_session->exhaustive_session.evaluate(new_value);
tuning_session->converged_message = true;
cout << "APEX: Tuning has converged for session " << tuning_session->id
<< "." << endl;
Expand All @@ -974,9 +980,6 @@ int apex_exhaustive_policy(shared_ptr<apex_tuning_session> tuning_session,
return APEX_NOERROR;
}

// get a measurement of our current setting
double new_value = tuning_session->metric_of_interest();

/* Report the performance we've just measured. */
tuning_session->exhaustive_session.evaluate(new_value);

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/apex_exec
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,13 @@ if [ $mpi = yes ]; then
export MPI_LIB2=${testme}
fi
fi
if [ $cuda = yes ] || [ $monitor_gpu = yes ]; then
if [ $cuda = yes ] && [ $monitor_gpu = yes ]; then
testme=${BASEDIR}/${LIBDIR}/${APEX_LIBRARY_NAME}_cuda${SHLIBX}
if [ -f ${testme} ]; then
export CUDA_LIB=:${testme}
fi
fi
if [ $hip = yes ] || [ $monitor_gpu = yes ]; then
if [ $hip = yes ] && [ $monitor_gpu = yes ]; then
testme=${BASEDIR}/${LIBDIR}/${APEX_LIBRARY_NAME}_hip${SHLIBX}
if [ -f ${testme} ]; then
export HIP_LIB=:${testme}
Expand Down

0 comments on commit d48a450

Please sign in to comment.