Adjust output when computing invalid values

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2021-05-07 02:31:53 +02:00
parent 9c28ff1e9e
commit 6c03ea3f3c
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ for timesteps in ${TIMESTEPS}; do
for ny in ${NY}; do
for nz in ${NZ}; do
best_perf=
best_output=
best_output="invalid"
for nruns in ${NRUNS}; do
output=$(
./${EXEC} -f ${FREQUENCY} -n ${timesteps} -na ${atoms_per_unit_cell} -nx ${nx} -ny ${ny} -nz ${nz} -csv |
@ -39,7 +39,7 @@ for timesteps in ${TIMESTEPS}; do
if [ -z "$best_perf" ]; then
best_perf="$perf"
best_output="$output"
elif (( $(echo "$perf < $best_perf" | bc -l) )); then
elif (( $(echo "$perf > 0.0 && $perf < $best_perf" | bc -l) )); then
best_perf="$perf"
best_output="$output"
fi

View File

@ -199,8 +199,8 @@ int main(int argc, const char *argv[]) {
LIKWID_MARKER_STOP("force");
E = getTimeStamp();
double T_accum = E-S;
const double atoms_updates_per_sec = (double)(atom->Nlocal * INTERNAL_LOOP_NTIMES * param.ntimes) / T_accum;
const double cycles_per_atom = T_accum * freq / (double)(atom->Nlocal * param.ntimes * INTERNAL_LOOP_NTIMES);
const double atoms_updates_per_sec = (double)(atom->Nlocal) / T_accum * (double)(param.ntimes * INTERNAL_LOOP_NTIMES);
const double cycles_per_atom = T_accum / (double)(atom->Nlocal) / (double)(param.ntimes * INTERNAL_LOOP_NTIMES) * freq;
const double cycles_per_neigh = cycles_per_atom / (double)(atoms_per_unit_cell - 1);
if(!csv) {