Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
5c18392e
Commit
5c18392e
authored
Nov 25, 2013
by
Shane Snyder
Browse files
updates to darshan workload api to implement _get_info function
parent
1a56a92c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/workload/codes-darshan-io-wrkld.c
View file @
5c18392e
...
...
@@ -47,8 +47,6 @@ static void *darshan_io_workload_get_info(int rank);
static
void
darshan_read_events
(
struct
rank_events_context
*
rank_context
,
int
ind_flag
);
static
struct
codes_workload_op
darshan_event_to_codes_workload_op
(
struct
darshan_event
event
);
struct
rank_events_context
*
rank_events
=
NULL
;
/* workload method name and function pointers for the CODES workload API */
struct
codes_workload_method
darshan_io_workload_method
=
{
...
...
@@ -58,6 +56,12 @@ struct codes_workload_method darshan_io_workload_method =
.
codes_workload_get_info
=
darshan_io_workload_get_info
,
};
/* linked list of context structs for each rank participating in the workload */
static
struct
rank_events_context
*
rank_events
=
NULL
;
/* info about this darshan workload group needed by bgp model */
static
struct
codes_workload_info
darshan_workload_info
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
/* load the workload generator for this rank, given input params */
static
int
darshan_io_workload_load
(
const
char
*
params
,
int
rank
)
{
...
...
@@ -182,6 +186,15 @@ static int darshan_io_workload_load(const char *params, int rank)
new
->
next
=
rank_events
;
rank_events
=
new
;
/* fill out the info required for this workload group */
if
(
darshan_workload_info
.
group_id
==
-
1
)
{
darshan_workload_info
.
group_id
=
1
;
darshan_workload_info
.
min_rank
=
0
;
darshan_workload_info
.
max_rank
=
nprocs
-
1
;
darshan_workload_info
.
num_lrank
=
nprocs
;
}
free
(
rank_offsets
);
return
0
;
...
...
@@ -303,7 +316,7 @@ static void darshan_io_workload_get_next(int rank, struct codes_workload_op *op)
/* for now, no info needed by the simulator regarding darshan workloads */
static
void
*
darshan_io_workload_get_info
(
int
rank
)
{
return
NULL
;
return
&
(
darshan_workload_info
)
;
}
/* read events from the event file -- ind_flag is set if reading independent events */
...
...
src/workload/codes-workload.c
View file @
5c18392e
...
...
@@ -18,6 +18,7 @@ extern struct codes_workload_method bgp_io_workload_method;
#ifdef USE_DARSHAN
extern
struct
codes_workload_method
darshan_io_workload_method
;
#endif
static
struct
codes_workload_method
*
method_array
[]
=
{
&
test_workload_method
,
...
...
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