/home/aching/Avery/Work.School/Research/pvfs2-lock/s3asim/src/s3asim.c File Reference

#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 Documentation

#define _GNU_SOURCE


Function Documentation

int main ( int  argc,
char **  argv 
)

Main function which selects the process to be a master or a worker based on MPI myid.

Parameters:
argc Number of arguments.
argv Pointer to the argument pointers.
Returns:
0 on success.

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

Parameters:
argc Number of arguments.
argv Pointer to the argument pointers.
test_params_p Pointer to test_params.
Returns:
0 on success.

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.

Parameters:
test_params_p Pointer to test_params.
query_frag_preresult_matrix Pointer to the matrix of (query,frag) results.
Returns:
0 on success.

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.

Parameters:
test_params_p Pointer to test_params.
Returns:
0 on success.

static void print_settings ( struct test_params_s test_params_p,
int  numprocs 
) [static]

Print out the setting information for the application run.

Parameters:
test_params_p Pointer to test_params.
numprocs Number of processes used.
Returns:
0 on success.

static void print_usage ( char *  exefile  )  [static]

Prints out the usage of the executable

Parameters:
exefile Pointer to the name of the executable.


Variable Documentation

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"
    }


Generated on Sun May 20 13:10:04 2007 for s3asim by  doxygen 1.4.7