MDTest: fixing the memset() to account for the number of iterations.

master
Julian M. Kunkel 2019-08-31 17:28:08 +01:00
parent 47695aea49
commit 10d3db1dc8
1 changed files with 1 additions and 1 deletions

View File

@ -2148,7 +2148,7 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
/* setup summary table for recording results */
summary_table = (mdtest_results_t *) malloc(iterations * sizeof(mdtest_results_t));
memset(summary_table, 0, sizeof(mdtest_results_t));
memset(summary_table, 0, iterations * sizeof(mdtest_results_t));
for(int i=0; i < iterations; i++){
for(int j=0; j < MDTEST_LAST_NUM; j++){
summary_table[i].rate[j] = 0.0;