Add ATOMS_LOOP_RUNS option and statistics to stub variant
Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
24
src/main.c
24
src/main.c
@@ -38,16 +38,10 @@
|
||||
#include <stats.h>
|
||||
#include <thermo.h>
|
||||
#include <pbc.h>
|
||||
#include <timers.h>
|
||||
|
||||
#define HLINE "----------------------------------------------------------------------------\n"
|
||||
|
||||
typedef enum {
|
||||
TOTAL = 0,
|
||||
NEIGH,
|
||||
FORCE,
|
||||
NUMTIMER
|
||||
} timertype;
|
||||
|
||||
extern double computeForce(Parameter*, Atom*, Neighbor*, Stats*, int, int);
|
||||
|
||||
void init(Parameter *param)
|
||||
@@ -257,21 +251,7 @@ int main (int argc, char** argv)
|
||||
printf(HLINE);
|
||||
printf("Performance: %.2f million atom updates per second\n",
|
||||
1e-6 * (double) atom.Natoms * param.ntimes / timer[TOTAL]);
|
||||
|
||||
#ifdef COMPUTE_STATS
|
||||
double force_useful_volume = 1e-9 * ( (double)(atom.Nlocal * (param.ntimes + 1)) * (sizeof(MD_FLOAT) * 6 + sizeof(int)) +
|
||||
(double)(stats.total_force_neighs) * (sizeof(MD_FLOAT) * 3 + sizeof(int)) );
|
||||
#ifdef EXPLICIT_TYPES
|
||||
force_useful_volume += 1e-9 * (double)((atom.Nlocal * (param.ntimes + 1)) + stats.total_force_neighs) * sizeof(int);
|
||||
#endif
|
||||
printf("Statistics:\n");
|
||||
printf("\tVector width: %d, Processor frequency: %.4f GHz\n", VECTOR_WIDTH, param.proc_freq);
|
||||
printf("\tTotal number of computed pair interactions: %lld\n", stats.total_force_neighs);
|
||||
printf("\tTotal number of most SIMD iterations: %lld\n", stats.total_force_iters);
|
||||
printf("\tUseful read data volume for force computation: %.2fGB\n", force_useful_volume);
|
||||
printf("\tCycles/SIMD iteration: %.4f\n", timer[FORCE] * param.proc_freq * 1e9 / stats.total_force_iters);
|
||||
#endif
|
||||
|
||||
displayStatistics(&atom, ¶m, &stats, timer);
|
||||
LIKWID_MARKER_CLOSE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user