Adjust likwid markers for force region

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2021-06-30 13:44:02 +02:00
parent 06aae5593b
commit ecb5ccf6ff
2 changed files with 2 additions and 2 deletions

View File

@ -59,6 +59,7 @@ double computeForce(Parameter *param, Atom *atom, Neighbor *neighbor, int first_
fz[i] = 0.0; fz[i] = 0.0;
} }
LIKWID_MARKER_START("force");
#pragma omp parallel for #pragma omp parallel for
for(int i = 0; i < Nlocal; i++) { for(int i = 0; i < Nlocal; i++) {
neighs = &neighbor->neighbors[i * neighbor->maxneighs]; neighs = &neighbor->neighbors[i * neighbor->maxneighs];
@ -131,6 +132,7 @@ double computeForce(Parameter *param, Atom *atom, Neighbor *neighbor, int first_
TRACER_PRINT(fz[i], 'R'); TRACER_PRINT(fz[i], 'R');
TRACER_PRINT(fz[i], 'W'); TRACER_PRINT(fz[i], 'W');
} }
LIKWID_MARKER_STOP("force");
double E = getTimeStamp(); double E = getTimeStamp();
TRACER_END; TRACER_END;

View File

@ -211,11 +211,9 @@ int main(int argc, const char *argv[]) {
double S, E; double S, E;
S = getTimeStamp(); S = getTimeStamp();
LIKWID_MARKER_START("force");
for(int i = 0; i < param.ntimes; i++) { for(int i = 0; i < param.ntimes; i++) {
computeForce(&param, atom, &neighbor, 0); computeForce(&param, atom, &neighbor, 0);
} }
LIKWID_MARKER_STOP("force");
E = getTimeStamp(); E = getTimeStamp();
double T_accum = E-S; double T_accum = E-S;
const double atoms_updates_per_sec = (double)(atom->Nlocal) / T_accum * (double)(param.ntimes * NEIGHBORS_LOOP_RUNS); const double atoms_updates_per_sec = (double)(atom->Nlocal) / T_accum * (double)(param.ntimes * NEIGHBORS_LOOP_RUNS);