forked from Aesfrost/ZPIC_OmpSs2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
743 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
parallel/ompss2_openacc/input/weak/cold-2000-1073M-4096-4096.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
57
parallel/ompss2_openacc/input/weak/cold-2000-268M-2048-2048.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
56
parallel/ompss2_openacc/input/weak/cold-2000-538M-2900-2900.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
56
parallel/ompss2_openacc/input/weak/cold-2000-829M-3600-3600.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
57
parallel/ompss2_openacc/input/weak/warm-2000-1073M-4096-4096.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
57
parallel/ompss2_openacc/input/weak/warm-2000-268M-2048-2048.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
Oops, something went wrong.