Commit 26bce1f8 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

updates to codes-base: changing data structure from app_cf_info to codes_workload_info

parent a95782bd
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "codes/CodesIOKernelTypes.h" #include "codes/CodesIOKernelTypes.h"
#include "codes/CodesIOKernelParser.h" #include "codes/CodesIOKernelParser.h"
#include "codes/codeslexer.h" #include "codes/codeslexer.h"
#include "codes/codes-workload.h"
#define CL_INST_MAX_ARGS 10 #define CL_INST_MAX_ARGS 10
...@@ -61,7 +62,7 @@ int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps, ...@@ -61,7 +62,7 @@ int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps,
int codes_kernel_helper_bootstrap(char * io_kernel_path, char * def_io_kernel_path, int codes_kernel_helper_bootstrap(char * io_kernel_path, char * def_io_kernel_path,
char * io_kernel_meta_path, int rank, CodesIOKernelContext * c, char * io_kernel_meta_path, int rank, CodesIOKernelContext * c,
CodesIOKernel_pstate ** ps, app_cf_info_t * task_info, CodesIOKernel_pstate ** ps, codes_workload_info * task_info,
codeslang_inst * next_event); codeslang_inst * next_event);
char * code_kernel_helpers_cleventToStr(int inst); char * code_kernel_helpers_cleventToStr(int inst);
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#define MAX_NAME_LENGTH 512 #define MAX_NAME_LENGTH 512
typedef struct bgp_params bgp_params; typedef struct bgp_params bgp_params;
typedef struct codes_workload_info codes_workload_info;
struct bgp_params struct bgp_params
{ {
...@@ -26,6 +27,15 @@ struct bgp_params ...@@ -26,6 +27,15 @@ struct bgp_params
char io_kernel_def_path[MAX_NAME_LENGTH]; char io_kernel_def_path[MAX_NAME_LENGTH];
}; };
struct codes_workload_info
{
int group_id; /* group id */
int min_rank; /* minimum rank in the collective operation */
int max_rank; /* maximum rank in the collective operation */
int local_rank; /* local rank? never being used in the bg/p model */
int num_lrank; /* number of ranks participating in the collective operation*/
};
/* supported I/O operations */ /* supported I/O operations */
enum codes_workload_op_type enum codes_workload_op_type
{ {
......
...@@ -104,7 +104,7 @@ static int convertKLInstToEvent(int inst) ...@@ -104,7 +104,7 @@ static int convertKLInstToEvent(int inst)
} }
static void codes_kernel_helper_parse_cf(char * io_kernel_path, char * static void codes_kernel_helper_parse_cf(char * io_kernel_path, char *
io_kernel_def_path, char * io_kernel_meta_path, int task_rank, app_cf_info_t * task_info) io_kernel_def_path, char * io_kernel_meta_path, int task_rank, codes_workload_info * task_info)
{ {
int foundit = 0; int foundit = 0;
char line[CK_LINE_LIMIT]; char line[CK_LINE_LIMIT];
...@@ -160,10 +160,10 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char * ...@@ -160,10 +160,10 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char *
* file */ * file */
if(task_rank >= min && task_rank <= max) if(task_rank >= min && task_rank <= max)
{ {
task_info->gid = gid; task_info->group_id = gid;
task_info->min = min; task_info->min_rank = min;
task_info->max = max; task_info->max_rank = max;
task_info->lrank = task_rank - min; task_info->local_rank = task_rank - min;
task_info->num_lrank = max - min + 1; task_info->num_lrank = max - min + 1;
foundit = 1; foundit = 1;
...@@ -183,10 +183,10 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char * ...@@ -183,10 +183,10 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char *
/* default gid and task attrs */ /* default gid and task attrs */
/* TODO can we detect the gaps instead of -1 */ /* TODO can we detect the gaps instead of -1 */
task_info->gid = CL_DEFAULT_GID; task_info->group_id = CL_DEFAULT_GID;
task_info->min = -1; task_info->min_rank = -1;
task_info->max = -1; task_info->max_rank = -1;
task_info->lrank = -1; task_info->local_rank = -1;
task_info->num_lrank = -1; task_info->num_lrank = -1;
} }
...@@ -285,7 +285,7 @@ int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps, CodesIOKernelCont ...@@ -285,7 +285,7 @@ int codes_kernel_helper_parse_input(CodesIOKernel_pstate * ps, CodesIOKernelCont
int codes_kernel_helper_bootstrap(char * io_kernel_path, char * int codes_kernel_helper_bootstrap(char * io_kernel_path, char *
io_kernel_def_path, char * io_kernel_meta_path, io_kernel_def_path, char * io_kernel_meta_path,
int rank, CodesIOKernelContext * c, int rank, CodesIOKernelContext * c,
CodesIOKernel_pstate ** ps, app_cf_info_t * task_info, CodesIOKernel_pstate ** ps, codes_workload_info * task_info,
codeslang_inst * next_event) codeslang_inst * next_event)
{ {
int t = CL_NOOP; int t = CL_NOOP;
......
...@@ -53,7 +53,7 @@ struct codes_bgp_wrkld_state_per_cn ...@@ -53,7 +53,7 @@ struct codes_bgp_wrkld_state_per_cn
CodesIOKernelContext codes_context; CodesIOKernelContext codes_context;
CodesIOKernel_pstate * codes_pstate; CodesIOKernel_pstate * codes_pstate;
codeslang_inst next_event; codeslang_inst next_event;
app_cf_info_t task_info; codes_workload_info task_info;
}; };
/* returns information that is used further by the BG/P model for running multiple jobs */ /* returns information that is used further by the BG/P model for running multiple jobs */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment