Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
436e5f8b
Commit
436e5f8b
authored
Mar 12, 2015
by
Jonathan Jenkins
Browse files
initial bgp cleaning
- fix noop workload ops - get rid of unused workload option
parent
25b032ed
Changes
6
Hide whitespace changes
Inline
Side-by-side
codes/codes-workload.h
View file @
436e5f8b
...
...
@@ -27,14 +27,11 @@ typedef struct dumpi_trace_params dumpi_trace_params;
struct
bgp_params
{
/* We have the number of ranks passed in from the bg/p model because
* the I/O lang workloads have no information about the number of ranks.
* Only the bg/p config file knows the number of ranks. */
/* the rank count is defined in the workload config file */
int
num_cns
;
/* flag - use path to find kernel files relative to the metafile */
int
use_relpath
;
char
io_kernel_meta_path
[
MAX_NAME_LENGTH_WKLD
];
char
bgp_config_file
[
MAX_NAME_LENGTH_WKLD
];
char
io_kernel_path
[
MAX_NAME_LENGTH_WKLD
];
char
io_kernel_def_path
[
MAX_NAME_LENGTH_WKLD
];
};
...
...
@@ -127,6 +124,10 @@ enum codes_workload_op_type
CODES_WK_WAITANY
,
/* Testall operation */
CODES_WK_TESTALL
,
/* for workloads that have events not yet handled
* (eg the workload language) */
CODES_WK_IGNORE
};
/* I/O operation paramaters */
...
...
src/workload/codes-workload-dump.c
View file @
436e5f8b
...
...
@@ -12,7 +12,7 @@
static
char
type
[
128
]
=
{
'\0'
};
static
darshan_params
d_params
=
{
""
,
0
};
static
bgp_params
b_params
=
{
0
,
0
,
""
,
""
,
""
,
""
};
static
bgp_params
b_params
=
{
0
,
0
,
""
,
""
,
""
};
static
recorder_params
r_params
=
{
""
,
0
};
static
int
n
=
-
1
;
...
...
@@ -23,7 +23,6 @@ static struct option long_opts[] =
{
"d-log"
,
required_argument
,
NULL
,
'l'
},
{
"d-aggregator-cnt"
,
required_argument
,
NULL
,
'a'
},
{
"i-meta"
,
required_argument
,
NULL
,
'm'
},
{
"i-bgp-config"
,
required_argument
,
NULL
,
'b'
},
{
"i-rank-cnt"
,
required_argument
,
NULL
,
'r'
},
{
"i-use-relpath"
,
no_argument
,
NULL
,
'p'
},
{
"r-trace-dir"
,
required_argument
,
NULL
,
'd'
},
...
...
@@ -40,7 +39,6 @@ void usage(){
"--d-log: darshan log file
\n
"
"--d-aggregator-cnt: number of aggregators for collective I/O in darshan
\n
"
"--i-meta: i/o language kernel meta file path
\n
"
"--i-bgp-config: i/o language bgp config file
\n
"
"--i-rank-cnt: i/o language rank count
\n
"
"--i-use-relpath: use i/o kernel path relative meta file path
\n
"
"--r-trace-dir: directory containing recorder trace files
\n
"
...
...
@@ -90,7 +88,7 @@ int main(int argc, char *argv[])
int64_t
num_testalls
=
0
;
char
ch
;
while
((
ch
=
getopt_long
(
argc
,
argv
,
"t:n:l:a:m:
b:
r:sp"
,
long_opts
,
NULL
))
!=
-
1
){
while
((
ch
=
getopt_long
(
argc
,
argv
,
"t:n:l:a:m:r:sp"
,
long_opts
,
NULL
))
!=
-
1
){
switch
(
ch
){
case
't'
:
strcpy
(
type
,
optarg
);
...
...
@@ -108,9 +106,6 @@ int main(int argc, char *argv[])
case
'm'
:
strcpy
(
b_params
.
io_kernel_meta_path
,
optarg
);
break
;
case
'b'
:
strcpy
(
b_params
.
bgp_config_file
,
optarg
);
break
;
case
'r'
:
b_params
.
num_cns
=
atoi
(
optarg
);
break
;
...
...
@@ -168,13 +163,6 @@ int main(int argc, char *argv[])
usage
();
return
1
;
}
/* TODO: unused in codes-base, codes-triton, but don't remove entirely for now
else if (b_params.bgp_config_file[0] == '\0'){
fprintf(stderr, "Expected \"--i-bgp-conf\" argument for bgp io workload\n");
usage();
return 1;
}
*/
wparams
=
(
char
*
)
&
b_params
;
}
...
...
@@ -202,6 +190,12 @@ int main(int argc, char *argv[])
/* if num_ranks not set, pull it from the workload */
if
(
n
==
-
1
){
n
=
codes_workload_get_rank_cnt
(
type
,
wparams
);
if
(
n
==
-
1
)
{
fprintf
(
stderr
,
"Unable to get rank count from workload. "
"Specify option --num-ranks
\n
"
);
return
1
;
}
}
for
(
i
=
0
;
i
<
n
;
i
++
){
...
...
@@ -299,6 +293,10 @@ int main(int argc, char *argv[])
case
CODES_WK_TESTALL
:
num_testalls
++
;
break
;
case
CODES_WK_END
:
break
;
case
CODES_WK_IGNORE
:
break
;
default:
fprintf
(
stderr
,
"WARNING: unknown workload op type (code %d)
\n
"
,
...
...
src/workload/codes-workload.c
View file @
436e5f8b
...
...
@@ -285,10 +285,12 @@ void codes_workload_print_op(FILE *f, struct codes_workload_op *op, int rank){
fprintf
(
f
,
"op: rank:? type:collective "
"bytes:%d
\n
"
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_IGNORE
:
break
;
default:
tw_error
(
TW_LOC
,
"codes_workload_print_op: unrecognized workload type "
"(op code %d)
\n
"
,
op
->
op_type
);
fprintf
(
stderr
,
"
%s:%d:
codes_workload_print_op: unrecognized workload type "
"(op code %d)
\n
"
,
__FILE__
,
__LINE__
,
op
->
op_type
);
}
}
...
...
src/workload/methods/codes-bgp-io-wrkld.c
View file @
436e5f8b
...
...
@@ -116,13 +116,13 @@ static int convertTypes(int inst)
case
CL_EXIT
:
return
CODES_WK_END
;
/* end of the operations/ no more operations in file */
case
CL_DELETE
:
return
-
2
;
return
CODES_WK_IGNORE
;
case
CL_GETRANK
:
return
-
3
;
/* defined in I/O lang but not in workloads API*/
return
CODES_WK_IGNORE
;
/* defined in I/O lang but not in workloads API*/
case
CL_GETSIZE
:
return
-
4
;
/* defined in I/O lang but not in workload API */
return
CODES_WK_IGNORE
;
/* defined in I/O lang but not in workload API */
default:
return
-
1
;
return
CODES_WK_IGNORE
;
}
}
...
...
@@ -143,6 +143,8 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op)
int
type
=
codes_kernel_helper_parse_input
(
next_wrkld
->
codes_pstate
,
&
(
next_wrkld
->
codes_context
),
&
(
next_wrkld
->
next_event
));
op
->
op_type
=
convertTypes
(
type
);
if
(
op
->
op_type
==
CODES_WK_IGNORE
)
return
;
switch
(
op
->
op_type
)
{
case
CODES_WK_WRITE
:
...
...
@@ -198,6 +200,7 @@ void bgp_io_workload_get_next(int rank, struct codes_workload_op *op)
break
;
default:
{
// Return error code
//printf("\n Invalid operation specified %d ", op->op_type);
}
...
...
tests/workload/codes-workload-mpi-replay.c
View file @
436e5f8b
...
...
@@ -159,8 +159,6 @@ int load_workload(char *conf_path, int rank)
/* get the bgp i/o params from the config file */
configuration_get_value
(
&
config
,
"PARAMS"
,
"io_kernel_meta_path"
,
NULL
,
b_params
.
io_kernel_meta_path
,
MAX_NAME_LENGTH_WKLD
);
configuration_get_value
(
&
config
,
"PARAMS"
,
"bgp_config_file"
,
NULL
,
b_params
.
bgp_config_file
,
MAX_NAME_LENGTH_WKLD
);
configuration_get_value
(
&
config
,
"PARAMS"
,
"rank_count"
,
NULL
,
rank_count
,
10
);
strcpy
(
b_params
.
io_kernel_path
,
""
);
strcpy
(
b_params
.
io_kernel_def_path
,
""
);
...
...
tests/workload/codes-workload-test.c
View file @
436e5f8b
...
...
@@ -36,7 +36,6 @@ static int num_clients_per_lp = -1;
void
workload_set_params
()
{
char
io_kernel_meta_path
[
MAX_NAME_LENGTH_WKLD
];
char
bgp_config_file
[
MAX_NAME_LENGTH_WKLD
];
configuration_get_value
(
&
config
,
"PARAMS"
,
"workload_type"
,
NULL
,
workload_type
,
MAX_NAME_LENGTH_WKLD
);
if
(
strcmp
(
workload_type
,
"bgp_io_workload"
)
==
0
)
...
...
@@ -47,9 +46,6 @@ void workload_set_params()
configuration_get_value
(
&
config
,
"PARAMS"
,
"io_kernel_meta_path"
,
NULL
,
io_kernel_meta_path
,
MAX_NAME_LENGTH_WKLD
);
strcpy
(
bgparams
.
io_kernel_meta_path
,
io_kernel_meta_path
);
configuration_get_value
(
&
config
,
"PARAMS"
,
"bgp_config_file"
,
NULL
,
bgp_config_file
,
MAX_NAME_LENGTH_WKLD
);
strcpy
(
bgparams
.
bgp_config_file
,
bgp_config_file
);
}
}
...
...
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