Commit 08cb4d92 authored by Misbah Mubarak's avatar Misbah Mubarak

updates to i/o lang, setting the group_size and group_rank variables

parent 297f3aec
...@@ -70,6 +70,7 @@ extern int64_t * var; ...@@ -70,6 +70,7 @@ extern int64_t * var;
extern int * inst_ready; extern int * inst_ready;
extern int * group_rank; extern int * group_rank;
extern int * group_size; extern int * group_size;
int temp_group_rank;
#endif #endif
/* /*
......
...@@ -303,6 +303,7 @@ int codes_kernel_helper_bootstrap(char * io_kernel_path, char * ...@@ -303,6 +303,7 @@ int codes_kernel_helper_bootstrap(char * io_kernel_path, char *
off_t ksize = 0; off_t ksize = 0;
struct stat info; struct stat info;
temp_group_rank = rank;
/* get the kernel from the file */ /* 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_def_path,
io_kernel_meta_path, rank, task_info); io_kernel_meta_path, rank, task_info);
......
...@@ -275,7 +275,9 @@ int64_t ex( ...@@ -275,7 +275,9 @@ int64_t ex(
var[1] = t1; var[1] = t1;
*inst_ready = 1; *inst_ready = 1;
return 1; *group_rank = temp_group_rank;
//printf("\n group rank %d ", *group_rank);
return *group_rank;
} }
case GETGROUPSIZE: case GETGROUPSIZE:
{ {
...@@ -283,7 +285,9 @@ int64_t ex( ...@@ -283,7 +285,9 @@ int64_t ex(
var[0] = 1; var[0] = 1;
var[1] = t1; var[1] = t1;
*inst_ready = 1; *inst_ready = 1;
*group_size = t1;
//printf("\n group size %d ", *group_size);
return *group_size; return *group_size;
} }
case GETCURTIME: case GETCURTIME:
......
...@@ -147,7 +147,7 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op) ...@@ -147,7 +147,7 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op)
case CODES_WK_WRITE: case CODES_WK_WRITE:
{ {
op->u.write.file_id = (next_wrkld->next_event).var[0]; op->u.write.file_id = (next_wrkld->next_event).var[0];
op->u.write.offset = rank * (next_wrkld->next_event).var[2]; op->u.write.offset = (next_wrkld->next_event).var[2];
op->u.write.size = (next_wrkld->next_event).var[1]; op->u.write.size = (next_wrkld->next_event).var[1];
} }
break; break;
...@@ -186,7 +186,7 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op) ...@@ -186,7 +186,7 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op)
case CODES_WK_READ: case CODES_WK_READ:
{ {
op->u.read.file_id = (next_wrkld->next_event).var[0]; op->u.read.file_id = (next_wrkld->next_event).var[0];
op->u.read.offset = rank * (next_wrkld->next_event).var[2]; op->u.read.offset = (next_wrkld->next_event).var[2];
op->u.read.size = (next_wrkld->next_event).var[1]; op->u.read.size = (next_wrkld->next_event).var[1];
} }
break; break;
......
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