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
a645fe19
Commit
a645fe19
authored
Aug 25, 2015
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine workload configuration interface/impl
parent
8815fdde
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
17 deletions
+41
-17
codes/codes-workload.h
codes/codes-workload.h
+6
-1
src/workload/codes-workload-method.h
src/workload/codes-workload-method.h
+2
-1
src/workload/codes-workload.c
src/workload/codes-workload.c
+6
-3
src/workload/methods/codes-checkpoint-wrkld.c
src/workload/methods/codes-checkpoint-wrkld.c
+8
-2
src/workload/methods/codes-darshan-io-wrkld.c
src/workload/methods/codes-darshan-io-wrkld.c
+9
-4
src/workload/methods/codes-iolang-wrkld.c
src/workload/methods/codes-iolang-wrkld.c
+10
-6
No files found.
codes/codes-workload.h
View file @
a645fe19
...
...
@@ -208,9 +208,14 @@ typedef struct
void
*
params
;
}
codes_workload_config_return
;
// NOTE: some workloads (iolang, checkpoint) require information about the
// total number of ranks to correctly process traces/config files, etc. Other
// workload generators (darshan) ignore it
codes_workload_config_return
codes_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
);
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
);
void
codes_workload_free_config_return
(
codes_workload_config_return
*
c
);
...
...
src/workload/codes-workload-method.h
View file @
a645fe19
...
...
@@ -26,7 +26,8 @@ struct codes_workload_method
{
char
*
method_name
;
/* name of the generator */
void
*
(
*
codes_workload_read_config
)
(
ConfigHandle
*
handle
,
char
const
*
section_name
);
ConfigHandle
*
handle
,
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
);
int
(
*
codes_workload_load
)(
const
char
*
params
,
int
app_id
,
int
rank
);
void
(
*
codes_workload_get_next
)(
int
app_id
,
int
rank
,
struct
codes_workload_op
*
op
);
int
(
*
codes_workload_get_rank_cnt
)(
const
char
*
params
,
int
app_id
);
...
...
src/workload/codes-workload.c
View file @
a645fe19
...
...
@@ -72,7 +72,9 @@ static struct rank_queue *ranks = NULL;
codes_workload_config_return
codes_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
)
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
)
{
char
type
[
MAX_NAME_LENGTH_WKLD
];
codes_workload_config_return
r
;
...
...
@@ -80,7 +82,7 @@ codes_workload_config_return codes_workload_read_config(
r
.
params
=
NULL
;
int
rc
=
configuration_get_value
(
handle
,
section_name
,
"type"
,
NULL
,
type
,
MAX_NAME_LENGTH_WKLD
);
annotation
,
type
,
MAX_NAME_LENGTH_WKLD
);
if
(
rc
<=
0
)
return
r
;
...
...
@@ -91,7 +93,8 @@ codes_workload_config_return codes_workload_read_config(
if
(
m
->
codes_workload_read_config
==
NULL
)
r
.
params
=
NULL
;
else
r
.
params
=
m
->
codes_workload_read_config
(
handle
,
section_name
);
r
.
params
=
m
->
codes_workload_read_config
(
handle
,
section_name
,
annotation
,
num_ranks
);
}
}
...
...
src/workload/methods/codes-checkpoint-wrkld.c
View file @
a645fe19
...
...
@@ -29,7 +29,9 @@ enum checkpoint_status
static
void
*
checkpoint_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
);
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
);
static
int
checkpoint_workload_load
(
const
char
*
params
,
int
app_id
,
int
rank
);
static
void
checkpoint_workload_get_next
(
int
app_id
,
int
rank
,
struct
codes_workload_op
*
op
);
...
...
@@ -76,7 +78,9 @@ struct codes_workload_method checkpoint_workload_method =
static
void
*
checkpoint_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
)
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
)
{
checkpoint_wrkld_params
*
p
=
malloc
(
sizeof
(
*
p
));
assert
(
p
);
...
...
@@ -99,6 +103,8 @@ static void * checkpoint_workload_read_config(
&
p
->
mtti
);
assert
(
!
rc
);
p
->
nprocs
=
num_ranks
;
return
p
;
}
...
...
src/workload/methods/codes-darshan-io-wrkld.c
View file @
a645fe19
...
...
@@ -45,7 +45,9 @@ struct rank_io_context
static
void
*
darshan_io_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
);
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
);
/* Darshan workload generator's implementation of the CODES workload API */
static
int
darshan_io_workload_load
(
const
char
*
params
,
int
app_id
,
int
rank
);
static
void
darshan_io_workload_get_next
(
int
app_id
,
int
rank
,
struct
codes_workload_op
*
op
);
...
...
@@ -110,7 +112,9 @@ static int rank_tbl_pop = 0;
static
void
*
darshan_io_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
)
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
)
{
darshan_params
*
d
=
malloc
(
sizeof
(
*
d
));
assert
(
d
);
...
...
@@ -118,16 +122,17 @@ static void * darshan_io_workload_read_config(
d
->
aggregator_cnt
=
-
1
;
int
rc
=
configuration_get_value_relpath
(
handle
,
section_name
,
"darshan_log_file"
,
NULL
,
d
->
log_file_path
,
"darshan_log_file"
,
annotation
,
d
->
log_file_path
,
MAX_NAME_LENGTH_WKLD
);
assert
(
rc
>
0
);
int
tmp
;
rc
=
configuration_get_value_int
(
&
config
,
"workload"
,
"darshan_aggregator_count"
,
NULL
,
&
tmp
);
"darshan_aggregator_count"
,
annotation
,
&
tmp
);
assert
(
rc
==
0
);
d
->
aggregator_cnt
=
tmp
;
return
d
;
}
/* load the workload generator for this rank, given input params */
static
int
darshan_io_workload_load
(
const
char
*
params
,
int
app_id
,
int
rank
)
{
...
...
src/workload/methods/codes-iolang-wrkld.c
View file @
a645fe19
...
...
@@ -23,7 +23,9 @@ the BG/P storage model */
static
void
*
iolang_io_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
);
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
);
/* load the workload file */
static
int
iolang_io_workload_load
(
const
char
*
params
,
int
app_id
,
int
rank
);
...
...
@@ -63,7 +65,9 @@ struct codes_iolang_wrkld_state_per_rank
static
void
*
iolang_io_workload_read_config
(
ConfigHandle
*
handle
,
char
const
*
section_name
)
char
const
*
section_name
,
char
const
*
annotation
,
int
num_ranks
)
{
iolang_params
*
p
=
malloc
(
sizeof
(
*
p
));
assert
(
p
);
...
...
@@ -73,13 +77,13 @@ static void * iolang_io_workload_read_config(
p
->
io_kernel_path
[
0
]
=
'\0'
;
int
rc
=
configuration_get_value_relpath
(
handle
,
section_name
,
"io_kernel_meta_path"
,
NULL
,
p
->
io_kernel_meta_path
,
"io_kernel_meta_path"
,
annotation
,
p
->
io_kernel_meta_path
,
MAX_NAME_LENGTH_WKLD
);
assert
(
rc
>
0
);
rc
=
configuration_get_value_int
(
handle
,
section_name
,
"num_ranks"
,
NULL
,
&
p
->
num_cns
);
rc
=
configuration_get_value_int
(
handle
,
section_name
,
"num_ranks"
,
annotation
,
&
p
->
num_cns
);
if
(
rc
!=
0
)
p
->
num_cns
=
-
1
;
p
->
num_cns
=
num_ranks
;
return
p
;
}
...
...
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