#include <getopt.h>#include <string.h>#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <malloc.h>#include <assert.h>#include <errno.h>#include "mpi.h"#include <stdlib.h>#include <sys/time.h>#include <limits.h>#include "custom_debug.h"#include "test.h"#include "master.h"#include "worker.h"#include "hist_params.h"Defines | |
| #define | _GNU_SOURCE |
Functions | |
| static void | print_usage (char *exefile) |
| static int | parse_args (int argc, char *argv[], struct test_params_s *test_params_p) |
| static void | print_settings (struct test_params_s *test_params_p, int numprocs) |
| static int | precalculate_results (struct test_params_s *test_params_p, struct frag_preresult_s **query_frag_preresult_matrix) |
| int | main (int argc, char **argv) |
| static int | print_hints (struct test_params_s *test_params_p) |
Variables | |
| int64_t | global_debug_mask = MASTER_IO | WORKER_IO | MASTER_ERR | WORKER_ERR |
| static const char * | io_method_name [MAX_IO] |
| #define _GNU_SOURCE |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Main function which selects the process to be a master or a worker based on MPI myid.
| argc | Number of arguments. | |
| argv | Pointer to the argument pointers. |
| static int parse_args | ( | int | argc, | |
| char * | argv[], | |||
| struct test_params_s * | test_params_p | |||
| ) | [static] |
Parse the command line arguments and set the test_params structure
| argc | Number of arguments. | |
| argv | Pointer to the argument pointers. | |
| test_params_p | Pointer to test_params. |
| static int precalculate_results | ( | struct test_params_s * | test_params_p, | |
| struct frag_preresult_s ** | query_frag_preresult_matrix | |||
| ) | [static] |
In order to help generate repeatable pseudo-random results for a given set of input parameters, the master precalculates how many results will be generated for each query.
| test_params_p | Pointer to test_params. | |
| query_frag_preresult_matrix | Pointer to the matrix of (query,frag) results. |
| static int print_hints | ( | struct test_params_s * | test_params_p | ) | [static] |
Get the hint information from the MPI_Info variable stored in the test_params and print it out.
| test_params_p | Pointer to test_params. |
| static void print_settings | ( | struct test_params_s * | test_params_p, | |
| int | numprocs | |||
| ) | [static] |
Print out the setting information for the application run.
| test_params_p | Pointer to test_params. | |
| numprocs | Number of processes used. |
| static void print_usage | ( | char * | exefile | ) | [static] |
Prints out the usage of the executable
| exefile | Pointer to the name of the executable. |
| int64_t global_debug_mask = MASTER_IO | WORKER_IO | MASTER_ERR | WORKER_ERR |
const char* io_method_name[MAX_IO] [static] |
Initial value:
{
"individual",
"collective"
}
1.4.7