Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
08356edd
Commit
08356edd
authored
Apr 04, 2014
by
Jonathan Jenkins
Browse files
Workaround to get group size in kernel lang
parent
3c11e790
Changes
3
Hide whitespace changes
Inline
Side-by-side
codes/CodesIOKernelTypes.h
View file @
08356edd
...
...
@@ -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
/*
...
...
src/iokernellang/CodesKernelHelpers.c
View file @
08356edd
...
...
@@ -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
)
...
...
src/iokernellang/codesImpl.c
View file @
08356edd
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment