From 64e2c33e461ad47ba956e470d92827094e311c25 Mon Sep 17 00:00:00 2001 From: John Jenkins Date: Thu, 12 Mar 2015 13:34:33 -0500 Subject: [PATCH] begone, unused bgp parameters --- codes/codes-workload.h | 2 +- src/iokernellang/CodesKernelHelpers.c | 34 +++++++++------------- src/iokernellang/CodesKernelHelpers.h | 2 +- src/workload/codes-workload-dump.c | 2 +- src/workload/methods/codes-bgp-io-wrkld.c | 1 - tests/workload/codes-workload-mpi-replay.c | 1 - tests/workload/codes-workload-test.c | 1 - 7 files changed, 17 insertions(+), 26 deletions(-) diff --git a/codes/codes-workload.h b/codes/codes-workload.h index 3bc5e71..0a6254f 100644 --- a/codes/codes-workload.h +++ b/codes/codes-workload.h @@ -32,8 +32,8 @@ struct bgp_params /* flag - use path to find kernel files relative to the metafile */ int use_relpath; char io_kernel_meta_path[MAX_NAME_LENGTH_WKLD]; + /* set by config in the metadata path */ char io_kernel_path[MAX_NAME_LENGTH_WKLD]; - char io_kernel_def_path[MAX_NAME_LENGTH_WKLD]; }; struct darshan_params diff --git a/src/iokernellang/CodesKernelHelpers.c b/src/iokernellang/CodesKernelHelpers.c index df6d3d9..16f5cea 100644 --- a/src/iokernellang/CodesKernelHelpers.c +++ b/src/iokernellang/CodesKernelHelpers.c @@ -110,8 +110,9 @@ static int convertKLInstToEvent(int inst) return CL_UNKNOWN; } -static void codes_kernel_helper_parse_cf(char * io_kernel_path, char * - io_kernel_def_path, char * io_kernel_meta_path, int task_rank, int max_ranks_default, codes_workload_info * task_info, int use_relpath) +static void codes_kernel_helper_parse_cf(char * io_kernel_path, + char * io_kernel_meta_path, int task_rank, int max_ranks_default, + codes_workload_info * task_info, int use_relpath) { int foundit = 0; char line[CK_LINE_LIMIT]; @@ -193,18 +194,12 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char * fclose(ikmp); /* if we did not find the config file, set it to the default */ - if(foundit == 0) - { - /* default kernel */ - strcpy(io_kernel_path, io_kernel_def_path); - - /* default gid and task attrs */ - /* TODO can we detect the gaps instead of -1 */ - task_info->group_id = CL_DEFAULT_GID; - task_info->min_rank = -1; - task_info->max_rank = -1; - task_info->local_rank = -1; - task_info->num_lrank = -1; + if(foundit == 0) { + fprintf(stderr, + "ERROR: Unable to find iolang workload file " + "from given metadata file %s... exiting\n", + io_kernel_meta_path); + exit(1); } return; @@ -301,11 +296,10 @@ int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps, CodesIOKernelCont return codes_inst; } -int codes_kernel_helper_bootstrap(char * io_kernel_path, char * - io_kernel_def_path, char * io_kernel_meta_path, - int rank, int num_ranks, int use_relpath, CodesIOKernelContext * c, - CodesIOKernel_pstate ** ps, codes_workload_info * task_info, - codeslang_inst * next_event) +int codes_kernel_helper_bootstrap(char * io_kernel_path, + char * io_kernel_meta_path, int rank, int num_ranks, int use_relpath, + CodesIOKernelContext * c, CodesIOKernel_pstate ** ps, + codes_workload_info * task_info, codeslang_inst * next_event) { int t = CL_NOOP; int ret = 0; @@ -316,7 +310,7 @@ int codes_kernel_helper_bootstrap(char * io_kernel_path, char * temp_group_rank = rank; /* get the kernel from the file */ - codes_kernel_helper_parse_cf(io_kernel_path, io_kernel_def_path, + codes_kernel_helper_parse_cf(io_kernel_path, io_kernel_meta_path, rank, num_ranks, task_info, use_relpath); temp_group_size = task_info->num_lrank; /* stat the kernel file */ diff --git a/src/iokernellang/CodesKernelHelpers.h b/src/iokernellang/CodesKernelHelpers.h index e103ac8..d6b5bd6 100644 --- a/src/iokernellang/CodesKernelHelpers.h +++ b/src/iokernellang/CodesKernelHelpers.h @@ -61,7 +61,7 @@ typedef struct codeslang_inst int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps, CodesIOKernelContext * c, codeslang_inst * inst); -int codes_kernel_helper_bootstrap(char * io_kernel_path, char * def_io_kernel_path, +int codes_kernel_helper_bootstrap(char * io_kernel_path, char * io_kernel_meta_path, int rank, int num_ranks, int use_relpath, CodesIOKernelContext * c, CodesIOKernel_pstate ** ps, codes_workload_info * task_info, codeslang_inst * next_event); diff --git a/src/workload/codes-workload-dump.c b/src/workload/codes-workload-dump.c index 9b6cf71..bc06425 100644 --- a/src/workload/codes-workload-dump.c +++ b/src/workload/codes-workload-dump.c @@ -12,7 +12,7 @@ static char type[128] = {'\0'}; static darshan_params d_params = {"", 0}; -static bgp_params b_params = {0, 0, "", "", ""}; +static bgp_params b_params = {0, 0, "", ""}; static recorder_params r_params = {"", 0}; static int n = -1; diff --git a/src/workload/methods/codes-bgp-io-wrkld.c b/src/workload/methods/codes-bgp-io-wrkld.c index 4ffbba9..c52c5cb 100644 --- a/src/workload/methods/codes-bgp-io-wrkld.c +++ b/src/workload/methods/codes-bgp-io-wrkld.c @@ -82,7 +82,6 @@ int bgp_io_workload_load(const char* params, int rank) wrkld_per_rank->codes_pstate = CodesIOKernel_pstate_new(); wrkld_per_rank->rank = rank; t = codes_kernel_helper_bootstrap(b_param->io_kernel_path, - b_param->io_kernel_def_path, b_param->io_kernel_meta_path, rank, num_ranks, diff --git a/tests/workload/codes-workload-mpi-replay.c b/tests/workload/codes-workload-mpi-replay.c index ad35f36..d0ac74b 100644 --- a/tests/workload/codes-workload-mpi-replay.c +++ b/tests/workload/codes-workload-mpi-replay.c @@ -161,7 +161,6 @@ int load_workload(char *conf_path, int rank) NULL, b_params.io_kernel_meta_path, MAX_NAME_LENGTH_WKLD); configuration_get_value(&config, "PARAMS", "rank_count", NULL, rank_count, 10); strcpy(b_params.io_kernel_path, ""); - strcpy(b_params.io_kernel_def_path, ""); b_params.num_cns = atoi(rank_count); b_params.use_relpath = 1; diff --git a/tests/workload/codes-workload-test.c b/tests/workload/codes-workload-test.c index b91590a..65d7a2e 100644 --- a/tests/workload/codes-workload-test.c +++ b/tests/workload/codes-workload-test.c @@ -41,7 +41,6 @@ void workload_set_params() if(strcmp(workload_type,"bgp_io_workload") == 0) { strcpy(bgparams.io_kernel_path,""); - strcpy(bgparams.io_kernel_def_path, ""); bgparams.num_cns = NUM_CLIENTS; configuration_get_value(&config, "PARAMS", "io_kernel_meta_path", NULL, io_kernel_meta_path, MAX_NAME_LENGTH_WKLD); -- 2.26.2