diff options
Diffstat (limited to 'openmp')
67 files changed, 266 insertions, 1 deletions
diff --git a/openmp/src/create_grid.c b/openmp/src/create_grid.c index d6a5b94..a48317d 100644 --- a/openmp/src/create_grid.c +++ b/openmp/src/create_grid.c @@ -1,5 +1,6 @@ #include "create_grid.h" +// Print entirety of a grid to verify input void print_grid(struct GAME* game) { printf("\n===GRID===\n"); for (int y = 0; y < game->height; y++) { @@ -10,6 +11,7 @@ void print_grid(struct GAME* game) { } } +// Go through user input void create_grid(int argc, char** argv) { char* filename; struct GAME game; diff --git a/openmp/src/file.c b/openmp/src/file.c index 3ecb613..e10b667 100644 --- a/openmp/src/file.c +++ b/openmp/src/file.c @@ -1,5 +1,6 @@ #include "file.h" +// Read a grid from a binary file into the space without padding void read_in(char* filename, struct GAME* game) { FILE* file = fopen(filename, "rb"); for (int i = game->padding; i < game->height+game->padding; i++) { @@ -8,6 +9,7 @@ void read_in(char* filename, struct GAME* game) { fclose(file); } +// Write a grid to a binary file into the space without padding void write_out(char* filename, struct GAME* game) { FILE* file = fopen(filename, "w+"); for (int i = game->padding; i < game->height+game->padding; i++) { diff --git a/openmp/src/game.c b/openmp/src/game.c index b5e786d..cac6fa0 100644 --- a/openmp/src/game.c +++ b/openmp/src/game.c @@ -1,5 +1,6 @@ #include "game.h" +// Calculate the number of live neighbors a cell has int neighbors(struct GAME* game, int x, int y) { int n = 0; for (int dy = -1; dy <= 1; dy++) { @@ -15,6 +16,7 @@ int neighbors(struct GAME* game, int x, int y) { return n; } +// Compute the next iteration of a board void next(struct GAME* game, int threads) { unsigned char** newGrid = malloc(sizeof(unsigned char*) * (game->height+(game->padding*2))); int y,x,i,size; @@ -30,10 +32,12 @@ void next(struct GAME* game, int threads) { #pragma omp parallel num_threads(threads) shared(per_thread, threads, total_width, total_height, newGrid, game) private(y,x,i) { + // Each thread gets a number of cells to compute int me = omp_get_thread_num(); int thread_start = per_thread * me; int thread_end = thread_start + per_thread + (me == threads-1 ? (total_width*total_height) % per_thread : 0); for (i = thread_start; i < thread_end; i++) { + // Iterate through each cell assigned for this thread y = i / total_width; x = i % total_width; int my_neighbors = neighbors(game, x, y); @@ -55,6 +59,7 @@ void next(struct GAME* game, int threads) { game->grid = newGrid; } +//Rnadomly assign life value to each cell void randomize(struct GAME* game) { for (int y = game->padding; y < game->height+game->padding; y++) { for (int x = game->padding; x < game->width+game->padding; x++) { diff --git a/openmp/src/main.c b/openmp/src/main.c index 68ec0bd..50fb096 100644 --- a/openmp/src/main.c +++ b/openmp/src/main.c @@ -19,6 +19,7 @@ //#define VERBOSE 1 #define SEED 100 +// Do the simulation void simulate(int argc, char** argv) { srand(SEED); char* filename; @@ -26,6 +27,7 @@ void simulate(int argc, char** argv) { game.padding = PADDING; int iterations, log_each_step, threads; if (argc == 8) { + // Parse the arguments filename = argv[2]; game.width = atoi(argv[3]); game.height = atoi(argv[4]); @@ -51,6 +53,7 @@ void simulate(int argc, char** argv) { memset(game.grid[i], 0, game.width+(2*game.padding)); } + // Choose where to read initial position if (strcmp(filename, "random") == 0) { randomize(&game); } else { @@ -62,16 +65,19 @@ void simulate(int argc, char** argv) { double start, end; for (int i = 0; i <= iterations; i++) { + // Iteration 0 will just be the initial grid if (i > 0) { - // Iteration 0 is just the input board start = omp_get_wtime(); + // Compute the next grid with threads next(&game, threads); end = omp_get_wtime(); time_computing_life += ((double) (end - start)); } if (log_each_step) { + // If we are logging each step, perform IO operations #if VERBOSE == 1 printf("\n===Iteration %i===\n", i); + // Print the board without the padding elements for (int y = game.padding; y < game.height+game.padding; y++) { for (int x = game.padding; x < game.width+game.padding; x++) { printf("%s ", game.grid[y][x] ? "X" : " "); @@ -80,6 +86,7 @@ void simulate(int argc, char** argv) { } printf("===End iteration %i===\n", i); #endif + // Save to a file sprintf(iteration_file, "output/iteration-%07d.bin", i); write_out(iteration_file, &game); } diff --git a/openmp/timing-study/output-1-1000-1000.txt b/openmp/timing-study/output-1-1000-1000.txt new file mode 100644 index 0000000..42681a1 --- /dev/null +++ b/openmp/timing-study/output-1-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 73.312715 +Clock time: 77.450210 diff --git a/openmp/timing-study/output-1-1000-1250.txt b/openmp/timing-study/output-1-1000-1250.txt new file mode 100644 index 0000000..ba1464f --- /dev/null +++ b/openmp/timing-study/output-1-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 113.646203 +Clock time: 118.646829 diff --git a/openmp/timing-study/output-1-1000-1500.txt b/openmp/timing-study/output-1-1000-1500.txt new file mode 100644 index 0000000..7d09b62 --- /dev/null +++ b/openmp/timing-study/output-1-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 163.034248 +Clock time: 171.017339 diff --git a/openmp/timing-study/output-1-1000-1750.txt b/openmp/timing-study/output-1-1000-1750.txt new file mode 100644 index 0000000..66bcb80 --- /dev/null +++ b/openmp/timing-study/output-1-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 220.656360 +Clock time: 231.050593 diff --git a/openmp/timing-study/output-1-1000-2000.txt b/openmp/timing-study/output-1-1000-2000.txt new file mode 100644 index 0000000..a11469d --- /dev/null +++ b/openmp/timing-study/output-1-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 287.698970 +Clock time: 300.176503 diff --git a/openmp/timing-study/output-1-1000-250.txt b/openmp/timing-study/output-1-1000-250.txt new file mode 100644 index 0000000..420bfe2 --- /dev/null +++ b/openmp/timing-study/output-1-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 5.088550 +Clock time: 5.963468 diff --git a/openmp/timing-study/output-1-1000-500.txt b/openmp/timing-study/output-1-1000-500.txt new file mode 100644 index 0000000..066b863 --- /dev/null +++ b/openmp/timing-study/output-1-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 18.956314 +Clock time: 20.440567 diff --git a/openmp/timing-study/output-1-1000-750.txt b/openmp/timing-study/output-1-1000-750.txt new file mode 100644 index 0000000..991980d --- /dev/null +++ b/openmp/timing-study/output-1-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 41.660313 +Clock time: 44.581177 diff --git a/openmp/timing-study/output-12-1000-1000.txt b/openmp/timing-study/output-12-1000-1000.txt new file mode 100644 index 0000000..613af8c --- /dev/null +++ b/openmp/timing-study/output-12-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 7.026118 +Clock time: 10.251363 diff --git a/openmp/timing-study/output-12-1000-1250.txt b/openmp/timing-study/output-12-1000-1250.txt new file mode 100644 index 0000000..57fbe93 --- /dev/null +++ b/openmp/timing-study/output-12-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 10.801676 +Clock time: 15.900482 diff --git a/openmp/timing-study/output-12-1000-1500.txt b/openmp/timing-study/output-12-1000-1500.txt new file mode 100644 index 0000000..0211559 --- /dev/null +++ b/openmp/timing-study/output-12-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 25.918769 +Clock time: 34.562182 diff --git a/openmp/timing-study/output-12-1000-1750.txt b/openmp/timing-study/output-12-1000-1750.txt new file mode 100644 index 0000000..0cf8832 --- /dev/null +++ b/openmp/timing-study/output-12-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 25.862278 +Clock time: 34.828966 diff --git a/openmp/timing-study/output-12-1000-2000.txt b/openmp/timing-study/output-12-1000-2000.txt new file mode 100644 index 0000000..b407d23 --- /dev/null +++ b/openmp/timing-study/output-12-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 30.705054 +Clock time: 43.042410 diff --git a/openmp/timing-study/output-12-1000-250.txt b/openmp/timing-study/output-12-1000-250.txt new file mode 100644 index 0000000..5c7f4a4 --- /dev/null +++ b/openmp/timing-study/output-12-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.860293 +Clock time: 3.331446 diff --git a/openmp/timing-study/output-12-1000-500.txt b/openmp/timing-study/output-12-1000-500.txt new file mode 100644 index 0000000..2af2794 --- /dev/null +++ b/openmp/timing-study/output-12-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.097878 +Clock time: 3.643646 diff --git a/openmp/timing-study/output-12-1000-750.txt b/openmp/timing-study/output-12-1000-750.txt new file mode 100644 index 0000000..5e235a9 --- /dev/null +++ b/openmp/timing-study/output-12-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.321400 +Clock time: 6.663178 diff --git a/openmp/timing-study/output-16-1000-1000.txt b/openmp/timing-study/output-16-1000-1000.txt new file mode 100644 index 0000000..7f376d5 --- /dev/null +++ b/openmp/timing-study/output-16-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 9.131005 +Clock time: 12.449032 diff --git a/openmp/timing-study/output-16-1000-1250.txt b/openmp/timing-study/output-16-1000-1250.txt new file mode 100644 index 0000000..d57a287 --- /dev/null +++ b/openmp/timing-study/output-16-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 13.434282 +Clock time: 18.116181 diff --git a/openmp/timing-study/output-16-1000-1500.txt b/openmp/timing-study/output-16-1000-1500.txt new file mode 100644 index 0000000..8b11fc0 --- /dev/null +++ b/openmp/timing-study/output-16-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 16.706991 +Clock time: 24.712374 diff --git a/openmp/timing-study/output-16-1000-1750.txt b/openmp/timing-study/output-16-1000-1750.txt new file mode 100644 index 0000000..c0018ec --- /dev/null +++ b/openmp/timing-study/output-16-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 23.733395 +Clock time: 33.306681 diff --git a/openmp/timing-study/output-16-1000-2000.txt b/openmp/timing-study/output-16-1000-2000.txt new file mode 100644 index 0000000..bd9c5d0 --- /dev/null +++ b/openmp/timing-study/output-16-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 30.429469 +Clock time: 42.369926 diff --git a/openmp/timing-study/output-16-1000-250.txt b/openmp/timing-study/output-16-1000-250.txt new file mode 100644 index 0000000..dc8331f --- /dev/null +++ b/openmp/timing-study/output-16-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.738930 +Clock time: 3.383995 diff --git a/openmp/timing-study/output-16-1000-500.txt b/openmp/timing-study/output-16-1000-500.txt new file mode 100644 index 0000000..f86a977 --- /dev/null +++ b/openmp/timing-study/output-16-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.352756 +Clock time: 3.601057 diff --git a/openmp/timing-study/output-16-1000-750.txt b/openmp/timing-study/output-16-1000-750.txt new file mode 100644 index 0000000..75efb03 --- /dev/null +++ b/openmp/timing-study/output-16-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 5.147589 +Clock time: 7.427564 diff --git a/openmp/timing-study/output-20-1000-1000.txt b/openmp/timing-study/output-20-1000-1000.txt new file mode 100644 index 0000000..206d879 --- /dev/null +++ b/openmp/timing-study/output-20-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 7.390921 +Clock time: 11.239737 diff --git a/openmp/timing-study/output-20-1000-1250.txt b/openmp/timing-study/output-20-1000-1250.txt new file mode 100644 index 0000000..86f7469 --- /dev/null +++ b/openmp/timing-study/output-20-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 11.254777 +Clock time: 16.136264 diff --git a/openmp/timing-study/output-20-1000-1500.txt b/openmp/timing-study/output-20-1000-1500.txt new file mode 100644 index 0000000..3c905b0 --- /dev/null +++ b/openmp/timing-study/output-20-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 16.076534 +Clock time: 23.718524 diff --git a/openmp/timing-study/output-20-1000-1750.txt b/openmp/timing-study/output-20-1000-1750.txt new file mode 100644 index 0000000..db999b9 --- /dev/null +++ b/openmp/timing-study/output-20-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 21.727030 +Clock time: 31.285851 diff --git a/openmp/timing-study/output-20-1000-2000.txt b/openmp/timing-study/output-20-1000-2000.txt new file mode 100644 index 0000000..b8c5e44 --- /dev/null +++ b/openmp/timing-study/output-20-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 28.363274 +Clock time: 40.847248 diff --git a/openmp/timing-study/output-20-1000-250.txt b/openmp/timing-study/output-20-1000-250.txt new file mode 100644 index 0000000..1dc5094 --- /dev/null +++ b/openmp/timing-study/output-20-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.555697 +Clock time: 2.156701 diff --git a/openmp/timing-study/output-20-1000-500.txt b/openmp/timing-study/output-20-1000-500.txt new file mode 100644 index 0000000..d394ec5 --- /dev/null +++ b/openmp/timing-study/output-20-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.944395 +Clock time: 3.506218 diff --git a/openmp/timing-study/output-20-1000-750.txt b/openmp/timing-study/output-20-1000-750.txt new file mode 100644 index 0000000..a52ddf0 --- /dev/null +++ b/openmp/timing-study/output-20-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.297441 +Clock time: 6.404743 diff --git a/openmp/timing-study/output-24-1000-1000.txt b/openmp/timing-study/output-24-1000-1000.txt new file mode 100644 index 0000000..8f4e5a3 --- /dev/null +++ b/openmp/timing-study/output-24-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 6.344307 +Clock time: 9.689612 diff --git a/openmp/timing-study/output-24-1000-1250.txt b/openmp/timing-study/output-24-1000-1250.txt new file mode 100644 index 0000000..819e097 --- /dev/null +++ b/openmp/timing-study/output-24-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 9.870428 +Clock time: 14.864989 diff --git a/openmp/timing-study/output-24-1000-1500.txt b/openmp/timing-study/output-24-1000-1500.txt new file mode 100644 index 0000000..f19ee37 --- /dev/null +++ b/openmp/timing-study/output-24-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 13.883823 +Clock time: 21.691046 diff --git a/openmp/timing-study/output-24-1000-1750.txt b/openmp/timing-study/output-24-1000-1750.txt new file mode 100644 index 0000000..a1079b9 --- /dev/null +++ b/openmp/timing-study/output-24-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 18.691083 +Clock time: 26.919679 diff --git a/openmp/timing-study/output-24-1000-2000.txt b/openmp/timing-study/output-24-1000-2000.txt new file mode 100644 index 0000000..e21c9f1 --- /dev/null +++ b/openmp/timing-study/output-24-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 24.792304 +Clock time: 36.801597 diff --git a/openmp/timing-study/output-24-1000-250.txt b/openmp/timing-study/output-24-1000-250.txt new file mode 100644 index 0000000..eaa55fb --- /dev/null +++ b/openmp/timing-study/output-24-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.613609 +Clock time: 3.196133 diff --git a/openmp/timing-study/output-24-1000-500.txt b/openmp/timing-study/output-24-1000-500.txt new file mode 100644 index 0000000..a0c8a7f --- /dev/null +++ b/openmp/timing-study/output-24-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.735787 +Clock time: 3.401682 diff --git a/openmp/timing-study/output-24-1000-750.txt b/openmp/timing-study/output-24-1000-750.txt new file mode 100644 index 0000000..7f4e763 --- /dev/null +++ b/openmp/timing-study/output-24-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 3.754690 +Clock time: 5.885699 diff --git a/openmp/timing-study/output-4-1000-1000.txt b/openmp/timing-study/output-4-1000-1000.txt new file mode 100644 index 0000000..488f5bf --- /dev/null +++ b/openmp/timing-study/output-4-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 19.561461 +Clock time: 23.064553 diff --git a/openmp/timing-study/output-4-1000-1250.txt b/openmp/timing-study/output-4-1000-1250.txt new file mode 100644 index 0000000..0c61b09 --- /dev/null +++ b/openmp/timing-study/output-4-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 29.425730 +Clock time: 34.283721 diff --git a/openmp/timing-study/output-4-1000-1500.txt b/openmp/timing-study/output-4-1000-1500.txt new file mode 100644 index 0000000..040f8b7 --- /dev/null +++ b/openmp/timing-study/output-4-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 42.126591 +Clock time: 50.662123 diff --git a/openmp/timing-study/output-4-1000-1750.txt b/openmp/timing-study/output-4-1000-1750.txt new file mode 100644 index 0000000..83870a1 --- /dev/null +++ b/openmp/timing-study/output-4-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 57.302075 +Clock time: 66.844318 diff --git a/openmp/timing-study/output-4-1000-2000.txt b/openmp/timing-study/output-4-1000-2000.txt new file mode 100644 index 0000000..149b7a2 --- /dev/null +++ b/openmp/timing-study/output-4-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 76.421121 +Clock time: 88.379760 diff --git a/openmp/timing-study/output-4-1000-250.txt b/openmp/timing-study/output-4-1000-250.txt new file mode 100644 index 0000000..9623aa2 --- /dev/null +++ b/openmp/timing-study/output-4-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.413768 +Clock time: 3.713147 diff --git a/openmp/timing-study/output-4-1000-500.txt b/openmp/timing-study/output-4-1000-500.txt new file mode 100644 index 0000000..0c18324 --- /dev/null +++ b/openmp/timing-study/output-4-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.947206 +Clock time: 6.380269 diff --git a/openmp/timing-study/output-4-1000-750.txt b/openmp/timing-study/output-4-1000-750.txt new file mode 100644 index 0000000..9086291 --- /dev/null +++ b/openmp/timing-study/output-4-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 10.829915 +Clock time: 13.182029 diff --git a/openmp/timing-study/output-8-1000-1000.txt b/openmp/timing-study/output-8-1000-1000.txt new file mode 100644 index 0000000..ebe72e8 --- /dev/null +++ b/openmp/timing-study/output-8-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 9.924235 +Clock time: 13.583743 diff --git a/openmp/timing-study/output-8-1000-1250.txt b/openmp/timing-study/output-8-1000-1250.txt new file mode 100644 index 0000000..ec82ee8 --- /dev/null +++ b/openmp/timing-study/output-8-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 15.336835 +Clock time: 20.191594 diff --git a/openmp/timing-study/output-8-1000-1500.txt b/openmp/timing-study/output-8-1000-1500.txt new file mode 100644 index 0000000..7741d7f --- /dev/null +++ b/openmp/timing-study/output-8-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 21.996220 +Clock time: 30.139829 diff --git a/openmp/timing-study/output-8-1000-1750.txt b/openmp/timing-study/output-8-1000-1750.txt new file mode 100644 index 0000000..f62ef5a --- /dev/null +++ b/openmp/timing-study/output-8-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 29.524371 +Clock time: 39.165025 diff --git a/openmp/timing-study/output-8-1000-2000.txt b/openmp/timing-study/output-8-1000-2000.txt new file mode 100644 index 0000000..da43dc5 --- /dev/null +++ b/openmp/timing-study/output-8-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 38.636923 +Clock time: 50.111060 diff --git a/openmp/timing-study/output-8-1000-250.txt b/openmp/timing-study/output-8-1000-250.txt new file mode 100644 index 0000000..6301921 --- /dev/null +++ b/openmp/timing-study/output-8-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.803572 +Clock time: 3.170951 diff --git a/openmp/timing-study/output-8-1000-500.txt b/openmp/timing-study/output-8-1000-500.txt new file mode 100644 index 0000000..da9f4a2 --- /dev/null +++ b/openmp/timing-study/output-8-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.643531 +Clock time: 4.040041 diff --git a/openmp/timing-study/output-8-1000-750.txt b/openmp/timing-study/output-8-1000-750.txt new file mode 100644 index 0000000..70b85a1 --- /dev/null +++ b/openmp/timing-study/output-8-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 5.837011 +Clock time: 8.027314 diff --git a/openmp/timing-study/slurm-10870649.err-kp013 b/openmp/timing-study/slurm-10870649.err-kp013 new file mode 100644 index 0000000..5e4a08a --- /dev/null +++ b/openmp/timing-study/slurm-10870649.err-kp013 @@ -0,0 +1 @@ +slurmstepd: error: *** JOB 10870649 ON kp013 CANCELLED AT 2021-12-07T21:36:02 DUE TO TIME LIMIT *** diff --git a/openmp/timing-study/slurm-10870649.out-kp013 b/openmp/timing-study/slurm-10870649.out-kp013 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/openmp/timing-study/slurm-10870649.out-kp013 diff --git a/openmp/timing-study/slurm-10870651.err-kp013 b/openmp/timing-study/slurm-10870651.err-kp013 new file mode 100644 index 0000000..367d47f --- /dev/null +++ b/openmp/timing-study/slurm-10870651.err-kp013 @@ -0,0 +1 @@ +slurmstepd: error: *** JOB 10870651 ON kp013 CANCELLED AT 2021-12-07T22:07:02 DUE TO TIME LIMIT *** diff --git a/openmp/timing-study/slurm-10870651.out-kp013 b/openmp/timing-study/slurm-10870651.out-kp013 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/openmp/timing-study/slurm-10870651.out-kp013 diff --git a/openmp/timing-study/slurm-10870663.err-kp013 b/openmp/timing-study/slurm-10870663.err-kp013 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/openmp/timing-study/slurm-10870663.err-kp013 diff --git a/openmp/timing-study/slurm-10870663.out-kp013 b/openmp/timing-study/slurm-10870663.out-kp013 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/openmp/timing-study/slurm-10870663.out-kp013 diff --git a/openmp/timing-study/timing_study.sh b/openmp/timing-study/timing_study.sh new file mode 100644 index 0000000..16771a6 --- /dev/null +++ b/openmp/timing-study/timing_study.sh @@ -0,0 +1,23 @@ +#!/bin/bash +#SBATCH --time=0:30:00 # walltime, abbreviated by -t +#SBATCH --nodes=2 # number of cluster nodes, abbreviated by -N +#SBATCH -o slurm-%j.out-%N # name of the stdout, using the job number (%j) and the first node (%N) +#SBATCH -e slurm-%j.err-%N # name of the stderr, using job and first node values +#SBATCH --ntasks=32 +# additional information for allocated clusters +#SBATCH --account=usucs5030 # account - abbreviated by -A +#SBATCH --partition=kingspeak # partition, abbreviated by -p + +cd $HOME/gol/openmp + +module load intel openmpi + +iterations=1000 + +for threads in 20 24 #1 4 8 12 16 20 24 +do + for size in 250 500 750 1000 1250 1500 1750 2000 + do + ./gol simulate random $size $size $iterations 1 $threads > timing-study/output-$threads-$iterations-$size.txt + done +done |