Commit 08356edd authored by Jonathan Jenkins's avatar Jonathan Jenkins

Workaround to get group size in kernel lang

parent 3c11e790
......@@ -71,6 +71,7 @@ extern int * inst_ready;
extern int * group_rank;
extern int * group_size;
int temp_group_rank;
int temp_group_size;
#endif
/*
......
......@@ -181,7 +181,7 @@ static void codes_kernel_helper_parse_cf(char * io_kernel_path, char *
task_info->min_rank = min;
task_info->max_rank = (max == -1) ? max_ranks_default : max;
task_info->local_rank = task_rank - min;
task_info->num_lrank = max - min + 1;
task_info->num_lrank = task_info->max_rank - min;
foundit = 1;
......@@ -318,7 +318,7 @@ int codes_kernel_helper_bootstrap(char * io_kernel_path, char *
/* get the kernel from the file */
codes_kernel_helper_parse_cf(io_kernel_path, io_kernel_def_path,
io_kernel_meta_path, rank, num_ranks, task_info, use_relpath);
temp_group_size = task_info->num_lrank;
/* stat the kernel file */
ret = stat(io_kernel_path, &info);
if(ret != 0)
......
......@@ -285,7 +285,13 @@ int64_t ex(
var[0] = 1;
var[1] = t1;
*inst_ready = 1;
*group_size = t1;
/* JOHN - logic here is broken, using the same trick
* used to get the rank
* - should dynamically look up the group and rank, but
* sets it upon setting up the parser */
/* *group_size = t1; */
*group_size = temp_group_size;
//printf("\n group size %d ", *group_size);
return *group_size;
......
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