Skip to content

Commit

Permalink
Added weak scaling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nlg550 committed Apr 9, 2021
1 parent a929c5e commit acd2108
Show file tree
Hide file tree
Showing 17 changed files with 743 additions and 6 deletions.
4 changes: 2 additions & 2 deletions parallel/ompss2_openacc/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GCC options
CC = pgimcc
CFLAGS = --ompss-2 -O3 --openacc -DTEST --cuda
CFLAGS = --ompss-2 -O3 --openacc --cuda

#CC = pgcc
#CFLAGS = -acc -ta=tesla:managed -Minfo=acc -O3 -fast -cudalibs -Mcuda=ptxinfo -g
#CFLAGS = -acc -ta=tesla:managed:cuda10.1 -Minfo=acc -O3 -fast -Mcuda=ptxinfo -g

INCLUDES =
LDFLAGS = -lm -lcuda
Expand Down
57 changes: 57 additions & 0 deletions parallel/ompss2_openacc/input/weak/cold-2000-1073M-4096-4096.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {4096, 4096};
float box[2] = {204.8, 204.8};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.0, 0.0, 0.0};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "cold-2000-1073M-4096-4096", n_regions, gpu_percentage, n_gpu_regions);

free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
57 changes: 57 additions & 0 deletions parallel/ompss2_openacc/input/weak/cold-2000-268M-2048-2048.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {2048, 2048};
float box[2] = {102.4, 102.4};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.0, 0.0, 0.0};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "cold-2000-268M-2048-2048", n_regions, gpu_percentage, n_gpu_regions);

free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
56 changes: 56 additions & 0 deletions parallel/ompss2_openacc/input/weak/cold-2000-538M-2900-2900.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {2900, 2900};
float box[2] = {145, 145};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.0, 0.0, 0.0};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "cold-2000-538M-2900-2900", n_regions, gpu_percentage, n_gpu_regions);
free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
56 changes: 56 additions & 0 deletions parallel/ompss2_openacc/input/weak/cold-2000-829M-3600-3600.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {3600, 3600};
float box[2] = {180, 180};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.0, 0.0, 0.0};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "cold-2000-829M-3600-3600", n_regions, gpu_percentage, n_gpu_regions);
free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
57 changes: 57 additions & 0 deletions parallel/ompss2_openacc/input/weak/warm-2000-1073M-4096-4096.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {4096, 4096};
float box[2] = {204.8, 204.8};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.01, 0.01, 0.01};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "warm-2000-1073M-4096-4096", n_regions, gpu_percentage, n_gpu_regions);

free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
57 changes: 57 additions & 0 deletions parallel/ompss2_openacc/input/weak/warm-2000-268M-2048-2048.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* ZPIC - em2d
*
* Weibel instability
*/

#include <stdlib.h>
#include "../../simulation.h"

void sim_init(t_simulation *sim, int n_regions, float gpu_percentage, int n_gpu_regions)
{
// Time step
float dt = 0.035;
float tmax = 70.0;

// Simulation box
int nx[2] = {2048, 2048};
float box[2] = {102.4, 102.4};

// Diagnostic frequency
int ndump = 500;

// Initialize particles
const int n_species = 1;
t_species *species = (t_species*) malloc(n_species * sizeof(t_species));

// Use 8x8 particles per cell
int ppc[] = {8, 8};

// Initial fluid and thermal velocities
t_part_data ufl[] = {0.0, 0.0, 0.0};
t_part_data uth[] = {0.01, 0.01, 0.01};

spec_new(&species[0], "electrons", -1.0, ppc, ufl, uth, nx, box, dt, NULL, nx[1], -1);

// Initialize Simulation data
sim_new(sim, nx, box, dt, tmax, ndump, species, n_species, "warm-2000-268M-2048-2048", n_regions, gpu_percentage, n_gpu_regions);

free(species);
}

void sim_report(t_simulation *sim)
{
//sim_report_csv(sim);
sim_report_energy(sim);

// Bx, By, Bz
sim_report_grid_zdf(sim, REPORT_BFLD, 0);
sim_report_grid_zdf(sim, REPORT_BFLD, 1);
sim_report_grid_zdf(sim, REPORT_BFLD, 2);

// Jz
sim_report_grid_zdf(sim, REPORT_CURRENT, 2);

// electron and positron density
sim_report_spec_zdf(sim, 0, CHARGE, NULL, NULL);
}
Loading

0 comments on commit acd2108

Please sign in to comment.