Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
e5eea894
Commit
e5eea894
authored
Jul 28, 2015
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renames - no more dumpi
parent
3f69dcad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
codes/codes-jobmap.h
codes/codes-jobmap.h
+5
-5
src/util/codes-jobmap.c
src/util/codes-jobmap.c
+1
-1
src/util/jobmap-impl/jobmap-list.c
src/util/jobmap-impl/jobmap-list.c
+7
-7
No files found.
codes/codes-jobmap.h
View file @
e5eea894
...
...
@@ -11,9 +11,9 @@
*
* Example:
*
* job 0 1 2 (<-- jobmap defined "
local
" IDs)
* rank 0 1 2 0 1 0 1 2 3 (<-- jobmap defined "local" IDs)
* ID 0 1 2 3 4 5 6 7 8 (<-- LP relative "global" ID)
* job 0 1 2 (<-- jobmap defined "
job
" IDs)
* rank 0 1 2 0 1 0 1 2 3 (<-- jobmap defined "
job
local" IDs)
* ID 0 1 2 3 4 5 6 7 8 (<-- LP relative "global" ID
s
)
* LP A B C D E F G H I (<-- provided by codes-mapping)
* */
...
...
@@ -26,14 +26,14 @@ enum codes_jobmap_type {
/* the "dummy" jobmap is an example implementation. It simply specifies N
* jobs, with exactly one rank per job, with a trivial mapping */
CODES_JOBMAP_DUMMY
,
CODES_JOBMAP_
DUMPI
CODES_JOBMAP_
LIST
};
struct
codes_jobmap_params_dummy
{
int
num_jobs
;
};
struct
codes_jobmap_params_
dumpi
{
struct
codes_jobmap_params_
list
{
char
*
alloc_file
;
};
...
...
src/util/codes-jobmap.c
View file @
e5eea894
...
...
@@ -25,7 +25,7 @@ codes_jobmap_configure(enum codes_jobmap_type t, void const * params)
case
CODES_JOBMAP_DUMMY
:
c
->
impl
=
&
jobmap_dummy_impl
;
break
;
case
CODES_JOBMAP_
DUMPI
:
case
CODES_JOBMAP_
LIST
:
c
->
impl
=
&
jobmap_list_impl
;
break
;
default:
...
...
src/util/jobmap-impl/jobmap-list.c
View file @
e5eea894
...
...
@@ -15,7 +15,7 @@
return -1; \
}while(0)
struct
workload_params
{
struct
joblist
{
int
num_jobs
;
int
*
num_rank_job
;
int
**
lp_arrays
;
...
...
@@ -23,8 +23,8 @@ struct workload_params {
static
int
jobmap_list_configure
(
void
const
*
params
,
void
**
ctx
)
{
struct
codes_jobmap_params_
dumpi
const
*
p
=
params
;
struct
workload_params
*
wp
=
malloc
(
sizeof
(
*
wp
));
struct
codes_jobmap_params_
list
const
*
p
=
params
;
struct
joblist
*
wp
=
malloc
(
sizeof
(
*
wp
));
assert
(
wp
);
FILE
*
alloc_file_name
=
fopen
(
p
->
alloc_file
,
"r"
);
...
...
@@ -99,7 +99,7 @@ static int jobmap_list_configure(void const * params, void ** ctx)
static
struct
codes_jobmap_id
jobmap_list_to_local
(
int
id
,
void
const
*
ctx
)
{
struct
codes_jobmap_id
rtn
;
struct
workload_params
*
wp
=
(
struct
workload_params
*
)
ctx
;
struct
joblist
*
wp
=
(
struct
joblist
*
)
ctx
;
for
(
int
i
=
0
;
i
<
wp
->
num_jobs
;
i
++
)
{
...
...
@@ -124,7 +124,7 @@ static struct codes_jobmap_id jobmap_list_to_local(int id, void const * ctx)
static
int
jobmap_list_to_global
(
struct
codes_jobmap_id
id
,
void
const
*
ctx
)
{
struct
workload_params
*
wp
=
(
struct
workload_params
*
)
ctx
;
struct
joblist
*
wp
=
(
struct
joblist
*
)
ctx
;
if
(
id
.
job
<
wp
->
num_jobs
)
return
wp
->
lp_arrays
[
id
.
job
][
id
.
rank
];
...
...
@@ -134,7 +134,7 @@ static int jobmap_list_to_global(struct codes_jobmap_id id, void const * ctx)
int
jobmap_list_get_num_jobs
(
void
const
*
ctx
)
{
struct
workload_params
*
wp
=
(
struct
workload_params
*
)
ctx
;
struct
joblist
*
wp
=
(
struct
joblist
*
)
ctx
;
return
wp
->
num_jobs
;
}
...
...
@@ -142,7 +142,7 @@ int jobmap_list_get_num_jobs(void const * ctx)
static
void
jobmap_list_destroy
(
void
*
ctx
)
{
struct
workload_params
*
wp
=
(
struct
workload_params
*
)
ctx
;
struct
joblist
*
wp
=
(
struct
joblist
*
)
ctx
;
for
(
int
i
=
0
;
i
<
wp
->
num_jobs
;
i
++
){
free
(
wp
->
lp_arrays
[
i
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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