Add script to automate latency and CFD evaluation

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2022-12-13 15:35:41 +01:00
parent d76d044a00
commit cd37746d07
3 changed files with 25 additions and 2 deletions

View File

@ -264,6 +264,6 @@ void grab(FILE* fptr, int n, MD_FLOAT* list) {
readline(line, fptr);
ptr = strtok(line, " \t\n\r\f");
list[i++] = atof(ptr);
while(ptr = strtok(NULL, " \t\n\r\f")) list[i++] = atof(ptr);
while((ptr = strtok(NULL, " \t\n\r\f"))) list[i++] = atof(ptr);
}
}

View File

@ -10,7 +10,7 @@ PROFILE = #-profile-functions -g -pg
#OPTS = -Ofast -xSSE4.2 $(PROFILE)
#OPTS = -Ofast -no-vec $(PROFILE)
OPTS = -Ofast -xHost $(PROFILE)
CFLAGS = $(PROFILE) -restrict $(OPENMP) $(OPTS)
CFLAGS = $(PROFILE) $(OPENMP) $(OPTS)
ASFLAGS = #-masm=intel
LFLAGS = $(PROFILE) $(OPTS) $(OPENMP)
DEFINES = -std=c11 -pedantic-errors -D_GNU_SOURCE -DNO_ZMM_INTRIN

View File

@ -0,0 +1,23 @@
#!/bin/bash
MDBENCH_BIN="MDBench-ICC-lammps"
FREQ=2.1
NRUNS=3
FIXED_PARAMS="--freq $FREQ"
function run_benchmark() {
for i in $(seq $NRUNS); do
likwid-pin -c 0 "$* $FIXED_PARAMS" 2>&1 | grep "Cycles/SIMD iteration" | cut -d ' ' -f3
done
}
echo "Standard"
run_benchmark ./MDBench-ICC-lammps
echo "Melt"
run_benchmark ./MDBench-ICC-lammps -i data/copper_melting/input_lj_cu_one_atomtype_20x20x20.dmp
echo "Argon"
run_benchmark ./MDBench-ICC-lammps -p data/argon_1000/mdbench_params.conf -i data/argon_1000/tprout.gro
echo "Stub-76"
run_benchmark ./MDBench-ICC-lammps-stub -nn 76
echo "Stub-1024"
run_benchmark ./MDBench-ICC-lammps-stub -nn 1024