diff options
Diffstat (limited to 'mpi')
54 files changed, 331 insertions, 18 deletions
Binary files differ diff --git a/mpi/src/main.c b/mpi/src/main.c index 9fed89e..02e2bb6 100644 --- a/mpi/src/main.c +++ b/mpi/src/main.c @@ -15,10 +15,12 @@ Any live cell with more than three live neighbors dies (overpopulation). Any dead cell with exactly three live neighbors becomes a live cell (reproduction). */ -#define PADDING 16 +#define PADDING 10 //#define VERBOSE 1 #define SEED 100 +// A structure to keep the global arguments because each process +// will use its own GAME structure struct Args { int process_count; int iterations; @@ -30,6 +32,7 @@ struct Args { int data_per_proc; }; +// Make a datatype out of an Args struct void broadcast_and_receive_input(MPI_Comm comm, struct Args* args) { int blocks[8] = {1,1,1,1,1,1,1,1}; MPI_Aint displacements[8]; @@ -50,6 +53,7 @@ void broadcast_and_receive_input(MPI_Comm comm, struct Args* args) { MPI_Bcast(args, 1, arg_t, 0, comm); } +// Scatter the grid among nodes void scatter_data(MPI_Comm comm, struct Args* args, unsigned char* local_data, int rank, int* data_counts, int* displacements, char* filename) { unsigned char* data; @@ -63,12 +67,14 @@ void scatter_data(MPI_Comm comm, struct Args* args, unsigned char* local_data, i data = malloc(size); memset(data, 0, size); game.grid = data; + // Choose where to read initial position if (strcmp(filename, "random") == 0) { randomize(&game); } else { read_in(filename, &game); } } + // Do the scatter (some nodes may work on more rows) MPI_Scatterv(data, data_counts, displacements, MPI_UNSIGNED_CHAR, local_data, data_counts[rank], MPI_UNSIGNED_CHAR, 0, comm); if (rank == 0) { @@ -77,12 +83,13 @@ void scatter_data(MPI_Comm comm, struct Args* args, unsigned char* local_data, i } +// Do the simulation void simulate(int argc, char** argv) { srand(SEED); - double totalStart = MPI_Wtime(); struct Args args; args.padding = PADDING; + // Initialize MPI stuff int rank, process_count; MPI_Comm comm; MPI_Init(&argc, &argv); @@ -91,7 +98,9 @@ void simulate(int argc, char** argv) { MPI_Comm_size(comm, &args.process_count); char* filename; + double global_start; if (rank == 0) { + // Parse the arguments if (argc == 7) { filename = argv[2]; args.width = atoi(argv[3]); @@ -99,7 +108,7 @@ void simulate(int argc, char** argv) { args.iterations = atoi(argv[5]); args.log_each_step = atoi(argv[6]); } else { - printf("Usage: ./gol simulate <filename | random> <width> <height> <iterations> <log-each-step?1:0> <block-size>\n"); + printf("Usage: ./gol simulate <filename | random> <width> <height> <iterations> <log-each-step?1:0>\n"); filename = "random"; args.height = 5; args.width = 5; @@ -107,12 +116,17 @@ void simulate(int argc, char** argv) { args.log_each_step = 0; } + global_start = MPI_Wtime(); + + // Figure out how much work the average node will be doing args.rows_per_proc = (args.height + args.padding*2)/args.process_count; args.data_per_proc = args.rows_per_proc * (args.width + args.padding*2); } broadcast_and_receive_input(comm, &args); + // Calculate the exact work each thread will do and arguments for + // the Scatterv to scatter the grid int grid_size = ((args.width + args.padding*2)*(args.height + args.padding*2)); int* data_counts = malloc(sizeof(int) * args.process_count); int* displacements = malloc(sizeof(int) * args.process_count); @@ -123,19 +137,20 @@ void simulate(int argc, char** argv) { data_counts[args.process_count-1] += grid_size % (args.data_per_proc * args.process_count); unsigned char* local_data = malloc(data_counts[rank]*sizeof(unsigned char)); memset(local_data, 0, sizeof(unsigned char) * data_counts[rank]); + + // Scatter the data among nodes scatter_data(comm, &args, local_data, rank, data_counts, displacements, filename); - // Allocate space for current grid (1 byte per tile) char iteration_file[1024]; - double timeComputingLife = 0; - float localTime = 0; - + // Local_game is our current job struct GAME local_game; local_game.grid = local_data; local_game.width = args.width; local_game.height = data_counts[rank] / (args.width + args.padding*2); local_game.padding = args.padding; + + // Assign halo elements to send to be received from above and below nodes unsigned char* halo_above = NULL; unsigned char* halo_below = NULL; if (rank > 0) { @@ -148,32 +163,46 @@ void simulate(int argc, char** argv) { } unsigned char* global_data; + if (rank == 0) { + global_data = malloc(sizeof(unsigned char) * grid_size); + memset(global_data, 0, sizeof(unsigned char) * grid_size); + } + + // Timing code + double time_computing_life = 0; + double start,end; for (int i = 0; i <= args.iterations; i++) { + // Iteration 0 will just be the initial grid if (i > 0) { int total_width = args.width + args.padding*2; + + MPI_Status status; if (rank < args.process_count - 1) { MPI_Send(&local_game.grid[(local_game.height-1) * total_width], total_width, MPI_UNSIGNED_CHAR, rank+1, 1, comm); } if (rank > 0) { - MPI_Recv(halo_above, total_width, MPI_UNSIGNED_CHAR, rank-1, 1, comm, NULL); + MPI_Recv(halo_above, total_width, MPI_UNSIGNED_CHAR, rank-1, 1, comm, &status); MPI_Send(&local_game.grid[0], total_width, MPI_UNSIGNED_CHAR, rank-1, 0, comm); } if (rank < args.process_count - 1) { - MPI_Recv(halo_below, total_width, MPI_UNSIGNED_CHAR, rank+1, 0, comm, NULL); + MPI_Recv(halo_below, total_width, MPI_UNSIGNED_CHAR, rank+1, 0, comm, &status); } MPI_Barrier(comm); + start = MPI_Wtime(); + // Compute the next grid next(&local_game, halo_above, halo_below); + end = MPI_Wtime(); + time_computing_life += end-start; } if (args.log_each_step) { - if (rank == 0) { - global_data = malloc(sizeof(unsigned char) * grid_size); - memset(global_data, 0, sizeof(unsigned char) * grid_size); - } + // If we are logging each step, perform IO operations + // Gather all of the local grids into global_data MPI_Gatherv(local_game.grid, data_counts[rank], MPI_UNSIGNED_CHAR, global_data, data_counts, displacements, MPI_UNSIGNED_CHAR, 0, comm); if (rank == 0) { - #ifdef VERBOSE + #if VERBOSE == 1 printf("\n===Iteration %i===\n", i); + // Print the baord without the padding elements for (int y = args.padding; y < args.height+args.padding; y++) { for (int x = args.padding; x < args.width+args.padding; x++) { printf("%s ", global_data[y*(args.width+2*args.padding) + x] ? "X" : " "); @@ -183,6 +212,7 @@ void simulate(int argc, char** argv) { printf("===End iteration %i===\n", i); #endif + // Save to a file struct GAME global_game; global_game.grid = global_data; global_game.width = args.width; @@ -194,12 +224,15 @@ void simulate(int argc, char** argv) { } } - double totalEnd = MPI_Wtime(); - MPI_Finalize(); + double total_end = MPI_Wtime(); if (rank == 0) { - printf("\n===Timing===\nTime computing life: %f\nClock time: %f\n", timeComputingLife, (totalEnd - totalStart)); + printf("\n===Timing===\nTime computing life: %f\nClock time: %f\n", time_computing_life, (total_end - global_start)); + free(local_game.grid); + free(data_counts); + free(halo_above); + free(halo_below); } - + MPI_Finalize(); } int main(int argc, char** argv) { diff --git a/mpi/timing-study/output-1-1000-1000.txt b/mpi/timing-study/output-1-1000-1000.txt new file mode 100644 index 0000000..f500f74 --- /dev/null +++ b/mpi/timing-study/output-1-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 33.832562 +Clock time: 37.939663 diff --git a/mpi/timing-study/output-1-1000-1250.txt b/mpi/timing-study/output-1-1000-1250.txt new file mode 100644 index 0000000..f928063 --- /dev/null +++ b/mpi/timing-study/output-1-1000-1250.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 21716 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-1-1000-1500.txt b/mpi/timing-study/output-1-1000-1500.txt new file mode 100644 index 0000000..d31db96 --- /dev/null +++ b/mpi/timing-study/output-1-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 75.141736 +Clock time: 83.149478 diff --git a/mpi/timing-study/output-1-1000-1750.txt b/mpi/timing-study/output-1-1000-1750.txt new file mode 100644 index 0000000..6bbaf1f --- /dev/null +++ b/mpi/timing-study/output-1-1000-1750.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 21837 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-1-1000-2000.txt b/mpi/timing-study/output-1-1000-2000.txt new file mode 100644 index 0000000..3ba37f2 --- /dev/null +++ b/mpi/timing-study/output-1-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 132.636661 +Clock time: 145.001708 diff --git a/mpi/timing-study/output-1-1000-250.txt b/mpi/timing-study/output-1-1000-250.txt new file mode 100644 index 0000000..544de8e --- /dev/null +++ b/mpi/timing-study/output-1-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.383001 +Clock time: 4.113476 diff --git a/mpi/timing-study/output-1-1000-500.txt b/mpi/timing-study/output-1-1000-500.txt new file mode 100644 index 0000000..dfa5abb --- /dev/null +++ b/mpi/timing-study/output-1-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 8.793952 +Clock time: 9.832794 diff --git a/mpi/timing-study/output-1-1000-750.txt b/mpi/timing-study/output-1-1000-750.txt new file mode 100644 index 0000000..e1437a3 --- /dev/null +++ b/mpi/timing-study/output-1-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 19.270078 +Clock time: 21.813069 diff --git a/mpi/timing-study/output-12-1000-1000.txt b/mpi/timing-study/output-12-1000-1000.txt new file mode 100644 index 0000000..2d1c3b3 --- /dev/null +++ b/mpi/timing-study/output-12-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.833550 +Clock time: 6.323680 diff --git a/mpi/timing-study/output-12-1000-1250.txt b/mpi/timing-study/output-12-1000-1250.txt new file mode 100644 index 0000000..5e8cbfb --- /dev/null +++ b/mpi/timing-study/output-12-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.347700 +Clock time: 9.178630 diff --git a/mpi/timing-study/output-12-1000-1500.txt b/mpi/timing-study/output-12-1000-1500.txt new file mode 100644 index 0000000..206bf6c --- /dev/null +++ b/mpi/timing-study/output-12-1000-1500.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 23209 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-12-1000-1750.txt b/mpi/timing-study/output-12-1000-1750.txt new file mode 100644 index 0000000..f2798ae --- /dev/null +++ b/mpi/timing-study/output-12-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 8.483342 +Clock time: 17.330302 diff --git a/mpi/timing-study/output-12-1000-2000.txt b/mpi/timing-study/output-12-1000-2000.txt new file mode 100644 index 0000000..165b598 --- /dev/null +++ b/mpi/timing-study/output-12-1000-2000.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 23290 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-12-1000-250.txt b/mpi/timing-study/output-12-1000-250.txt new file mode 100644 index 0000000..e4be53e --- /dev/null +++ b/mpi/timing-study/output-12-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.198089 +Clock time: 2.217166 diff --git a/mpi/timing-study/output-12-1000-500.txt b/mpi/timing-study/output-12-1000-500.txt new file mode 100644 index 0000000..51bc78b --- /dev/null +++ b/mpi/timing-study/output-12-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.735509 +Clock time: 2.513034 diff --git a/mpi/timing-study/output-12-1000-750.txt b/mpi/timing-study/output-12-1000-750.txt new file mode 100644 index 0000000..c9351f2 --- /dev/null +++ b/mpi/timing-study/output-12-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.617002 +Clock time: 4.091923 diff --git a/mpi/timing-study/output-16-1000-1000.txt b/mpi/timing-study/output-16-1000-1000.txt new file mode 100644 index 0000000..4b98fae --- /dev/null +++ b/mpi/timing-study/output-16-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.106571 +Clock time: 7.500836 diff --git a/mpi/timing-study/output-16-1000-1250.txt b/mpi/timing-study/output-16-1000-1250.txt new file mode 100644 index 0000000..183314c --- /dev/null +++ b/mpi/timing-study/output-16-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 3.445883 +Clock time: 11.167682 diff --git a/mpi/timing-study/output-16-1000-1500.txt b/mpi/timing-study/output-16-1000-1500.txt new file mode 100644 index 0000000..a08be6f --- /dev/null +++ b/mpi/timing-study/output-16-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.741983 +Clock time: 16.777514 diff --git a/mpi/timing-study/output-16-1000-1750.txt b/mpi/timing-study/output-16-1000-1750.txt new file mode 100644 index 0000000..cd6757e --- /dev/null +++ b/mpi/timing-study/output-16-1000-1750.txt @@ -0,0 +1,8 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 34784 RUNNING AT kp160 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== diff --git a/mpi/timing-study/output-16-1000-2000.txt b/mpi/timing-study/output-16-1000-2000.txt new file mode 100644 index 0000000..4bfa78c --- /dev/null +++ b/mpi/timing-study/output-16-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 8.301682 +Clock time: 28.791425 diff --git a/mpi/timing-study/output-16-1000-250.txt b/mpi/timing-study/output-16-1000-250.txt new file mode 100644 index 0000000..2f97b52 --- /dev/null +++ b/mpi/timing-study/output-16-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.145483 +Clock time: 2.572587 diff --git a/mpi/timing-study/output-16-1000-500.txt b/mpi/timing-study/output-16-1000-500.txt new file mode 100644 index 0000000..adc146c --- /dev/null +++ b/mpi/timing-study/output-16-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.570992 +Clock time: 3.899400 diff --git a/mpi/timing-study/output-16-1000-750.txt b/mpi/timing-study/output-16-1000-750.txt new file mode 100644 index 0000000..961b2a9 --- /dev/null +++ b/mpi/timing-study/output-16-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.215016 +Clock time: 5.047125 diff --git a/mpi/timing-study/output-20-1000-250.txt b/mpi/timing-study/output-20-1000-250.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mpi/timing-study/output-20-1000-250.txt diff --git a/mpi/timing-study/output-24-1000-1000.txt b/mpi/timing-study/output-24-1000-1000.txt new file mode 100644 index 0000000..b1fd01d --- /dev/null +++ b/mpi/timing-study/output-24-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.414322 +Clock time: 9.439315 diff --git a/mpi/timing-study/output-24-1000-1250.txt b/mpi/timing-study/output-24-1000-1250.txt new file mode 100644 index 0000000..08acf8e --- /dev/null +++ b/mpi/timing-study/output-24-1000-1250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.171989 +Clock time: 13.927639 diff --git a/mpi/timing-study/output-24-1000-1500.txt b/mpi/timing-study/output-24-1000-1500.txt new file mode 100644 index 0000000..e8452d5 --- /dev/null +++ b/mpi/timing-study/output-24-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 3.133675 +Clock time: 19.271850 diff --git a/mpi/timing-study/output-24-1000-1750.txt b/mpi/timing-study/output-24-1000-1750.txt new file mode 100644 index 0000000..9757c78 --- /dev/null +++ b/mpi/timing-study/output-24-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.398371 +Clock time: 25.650748 diff --git a/mpi/timing-study/output-24-1000-2000.txt b/mpi/timing-study/output-24-1000-2000.txt new file mode 100644 index 0000000..8fd3c60 --- /dev/null +++ b/mpi/timing-study/output-24-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 5.639865 +Clock time: 33.529967 diff --git a/mpi/timing-study/output-24-1000-250.txt b/mpi/timing-study/output-24-1000-250.txt new file mode 100644 index 0000000..e6ddcb7 --- /dev/null +++ b/mpi/timing-study/output-24-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.100765 +Clock time: 2.412458 diff --git a/mpi/timing-study/output-24-1000-500.txt b/mpi/timing-study/output-24-1000-500.txt new file mode 100644 index 0000000..8f6af46 --- /dev/null +++ b/mpi/timing-study/output-24-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.465147 +Clock time: 3.942927 diff --git a/mpi/timing-study/output-24-1000-750.txt b/mpi/timing-study/output-24-1000-750.txt new file mode 100644 index 0000000..1329b1b --- /dev/null +++ b/mpi/timing-study/output-24-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.815429 +Clock time: 5.642879 diff --git a/mpi/timing-study/output-4-1000-1000.txt b/mpi/timing-study/output-4-1000-1000.txt new file mode 100644 index 0000000..14dc1e9 --- /dev/null +++ b/mpi/timing-study/output-4-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 8.467197 +Clock time: 11.707533 diff --git a/mpi/timing-study/output-4-1000-1250.txt b/mpi/timing-study/output-4-1000-1250.txt new file mode 100644 index 0000000..408cfeb --- /dev/null +++ b/mpi/timing-study/output-4-1000-1250.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 22126 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-4-1000-1500.txt b/mpi/timing-study/output-4-1000-1500.txt new file mode 100644 index 0000000..d304a5d --- /dev/null +++ b/mpi/timing-study/output-4-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 18.823087 +Clock time: 26.449810 diff --git a/mpi/timing-study/output-4-1000-1750.txt b/mpi/timing-study/output-4-1000-1750.txt new file mode 100644 index 0000000..ab98c94 --- /dev/null +++ b/mpi/timing-study/output-4-1000-1750.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 22197 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-4-1000-2000.txt b/mpi/timing-study/output-4-1000-2000.txt new file mode 100644 index 0000000..2c85e0c --- /dev/null +++ b/mpi/timing-study/output-4-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 33.274214 +Clock time: 45.841294 diff --git a/mpi/timing-study/output-4-1000-250.txt b/mpi/timing-study/output-4-1000-250.txt new file mode 100644 index 0000000..8b1fa3c --- /dev/null +++ b/mpi/timing-study/output-4-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.599813 +Clock time: 2.807879 diff --git a/mpi/timing-study/output-4-1000-500.txt b/mpi/timing-study/output-4-1000-500.txt new file mode 100644 index 0000000..b3ce6ae --- /dev/null +++ b/mpi/timing-study/output-4-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.212790 +Clock time: 4.133439 diff --git a/mpi/timing-study/output-4-1000-750.txt b/mpi/timing-study/output-4-1000-750.txt new file mode 100644 index 0000000..59aa17f --- /dev/null +++ b/mpi/timing-study/output-4-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.830949 +Clock time: 6.854574 diff --git a/mpi/timing-study/output-8-1000-1000.txt b/mpi/timing-study/output-8-1000-1000.txt new file mode 100644 index 0000000..c063ee2 --- /dev/null +++ b/mpi/timing-study/output-8-1000-1000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 4.226861 +Clock time: 7.517444 diff --git a/mpi/timing-study/output-8-1000-1250.txt b/mpi/timing-study/output-8-1000-1250.txt new file mode 100644 index 0000000..4be7ca8 --- /dev/null +++ b/mpi/timing-study/output-8-1000-1250.txt @@ -0,0 +1,11 @@ + +=================================================================================== += BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES += PID 22852 RUNNING AT kp013 += EXIT CODE: 11 += CLEANING UP REMAINING PROCESSES += YOU CAN IGNORE THE BELOW CLEANUP MESSAGES +=================================================================================== +YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11) +This typically refers to a problem with your application. +Please see the FAQ page for debugging suggestions diff --git a/mpi/timing-study/output-8-1000-1500.txt b/mpi/timing-study/output-8-1000-1500.txt new file mode 100644 index 0000000..957fc99 --- /dev/null +++ b/mpi/timing-study/output-8-1000-1500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 9.416485 +Clock time: 16.706325 diff --git a/mpi/timing-study/output-8-1000-1750.txt b/mpi/timing-study/output-8-1000-1750.txt new file mode 100644 index 0000000..8dbd945 --- /dev/null +++ b/mpi/timing-study/output-8-1000-1750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 12.741221 +Clock time: 22.281683 diff --git a/mpi/timing-study/output-8-1000-2000.txt b/mpi/timing-study/output-8-1000-2000.txt new file mode 100644 index 0000000..9610e3f --- /dev/null +++ b/mpi/timing-study/output-8-1000-2000.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 16.578412 +Clock time: 26.921717 diff --git a/mpi/timing-study/output-8-1000-250.txt b/mpi/timing-study/output-8-1000-250.txt new file mode 100644 index 0000000..ca01ca3 --- /dev/null +++ b/mpi/timing-study/output-8-1000-250.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 0.296146 +Clock time: 2.211905 diff --git a/mpi/timing-study/output-8-1000-500.txt b/mpi/timing-study/output-8-1000-500.txt new file mode 100644 index 0000000..3e3b83c --- /dev/null +++ b/mpi/timing-study/output-8-1000-500.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 1.111486 +Clock time: 2.710176 diff --git a/mpi/timing-study/output-8-1000-750.txt b/mpi/timing-study/output-8-1000-750.txt new file mode 100644 index 0000000..4a98753 --- /dev/null +++ b/mpi/timing-study/output-8-1000-750.txt @@ -0,0 +1,4 @@ + +===Timing=== +Time computing life: 2.419305 +Clock time: 4.675962 diff --git a/mpi/timing-study/slurm-10870703.err-kp013 b/mpi/timing-study/slurm-10870703.err-kp013 new file mode 100644 index 0000000..4bdaa5d --- /dev/null +++ b/mpi/timing-study/slurm-10870703.err-kp013 @@ -0,0 +1,11 @@ +mkdir: cannot create directory ‘timing-study’: File exists +[proxy:0:0@kp013] HYD_pmcd_pmip_control_cmd_cb (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/pm/pmiserv/pmip_cb.c:887): assert (!closed) failed +[proxy:0:0@kp013] HYDT_dmxu_poll_wait_for_event (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/tools/demux/demux_poll.c:76): callback returned error status +[proxy:0:0@kp013] main (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/pm/pmiserv/pmip.c:202): demux engine error waiting for event +srun: error: kp013: task 0: Exited with exit code 7 +[mpiexec@kp013] HYDT_bscu_wait_for_completion (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/tools/bootstrap/utils/bscu_wait.c:76): one of the processes terminated badly; aborting +[mpiexec@kp013] HYDT_bsci_wait_for_completion (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/tools/bootstrap/src/bsci_wait.c:23): launcher returned error waiting for completion +[mpiexec@kp013] HYD_pmci_wait_for_completion (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c:218): launcher returned error waiting for completion +[mpiexec@kp013] main (../../../../../../srcdir/mpich/3.2.1/src/pm/hydra/ui/mpich/mpiexec.c:340): process manager error waiting for completion +srun: error: Unable to create step for job 10870703: Job/step already completing or completed +slurmstepd: error: *** JOB 10870703 ON kp013 CANCELLED AT 2021-12-08T01:29:02 DUE TO TIME LIMIT *** diff --git a/mpi/timing-study/slurm-10870703.out-kp013 b/mpi/timing-study/slurm-10870703.out-kp013 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mpi/timing-study/slurm-10870703.out-kp013 diff --git a/mpi/timing-study/timing_study.sh b/mpi/timing-study/timing_study.sh new file mode 100644 index 0000000..04b64ff --- /dev/null +++ b/mpi/timing-study/timing_study.sh @@ -0,0 +1,24 @@ +#!/bin/bash +#SBATCH --time=0:10: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=24 # number of MPI tasks, abbreviated by -n +# additional information for allocated clusters +#SBATCH --account=usucs5030 # account - abbreviated by -A +#SBATCH --partition=kingspeak # partition, abbreviated by -p + +cd $HOME/gol/mpi +mkdir timing-study + +module load intel mpich + +iterations=1000 + +for cores in 1 4 8 12 16 20 #24 +do + for size in 250 500 750 1000 1250 1500 1750 2000 + do + mpirun -np $cores ./gol simulate random $size $size $iterations 1 > timing-study/output-$cores-$iterations-$size.txt + done +done |