Added a switch for generating strong and weak scaling results
This commit is contained in:
@@ -30,8 +30,15 @@
|
|||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <string.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
TEST_STRONG_SCALING,
|
||||||
|
TEST_WEAK_SCALING,
|
||||||
|
NUM_TESTS,
|
||||||
|
} TestType;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
@@ -44,6 +51,10 @@ main(void)
|
|||||||
AcMeshInfo info;
|
AcMeshInfo info;
|
||||||
acLoadConfig(AC_DEFAULT_CONFIG, &info);
|
acLoadConfig(AC_DEFAULT_CONFIG, &info);
|
||||||
|
|
||||||
|
const TestType test = TEST_STRONG_SCALING;
|
||||||
|
if (test == TEST_WEAK_SCALING)
|
||||||
|
info.int_params[AC_nz] *= nprocs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AcMesh model, candidate;
|
AcMesh model, candidate;
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
@@ -109,7 +120,14 @@ main(void)
|
|||||||
"percentile)--------------------------------------\n",
|
"percentile)--------------------------------------\n",
|
||||||
results[nth_percentile * num_iters], 100 * nth_percentile);
|
results[nth_percentile * num_iters], 100 * nth_percentile);
|
||||||
|
|
||||||
const char* path = "strong_scaling.csv";
|
char path[4096] = "";
|
||||||
|
if (test == TEST_STRONG_SCALING)
|
||||||
|
strncpy(path, "strong_scaling.csv", sizeof(path));
|
||||||
|
else if (test == TEST_WEAK_SCALING)
|
||||||
|
strncpy(path, "weak_scaling.csv", sizeof(path));
|
||||||
|
else
|
||||||
|
ERROR("Invalid test type");
|
||||||
|
|
||||||
FILE* fp = fopen(path, "a");
|
FILE* fp = fopen(path, "a");
|
||||||
ERRCHK_ALWAYS(fp);
|
ERRCHK_ALWAYS(fp);
|
||||||
// Format
|
// Format
|
||||||
|
Reference in New Issue
Block a user