Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sds-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
sds-tests
Commits
4c652521
Commit
4c652521
authored
Dec 11, 2018
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only print usage info on rank 0
parent
692a2524
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
30 deletions
+19
-30
perf-regression/margo-p2p-bw.c
perf-regression/margo-p2p-bw.c
+19
-30
No files found.
perf-regression/margo-p2p-bw.c
View file @
4c652521
...
@@ -41,7 +41,7 @@ struct options
...
@@ -41,7 +41,7 @@ struct options
#define BW_TOTAL_MEM_SIZE 2147483648UL
#define BW_TOTAL_MEM_SIZE 2147483648UL
static
void
parse_args
(
int
argc
,
char
**
argv
,
struct
options
*
opts
);
static
int
parse_args
(
int
argc
,
char
**
argv
,
struct
options
*
opts
);
static
void
usage
(
void
);
static
void
usage
(
void
);
MERCURY_GEN_PROC
(
bw_rpc_in_t
,
MERCURY_GEN_PROC
(
bw_rpc_in_t
,
...
@@ -122,7 +122,13 @@ int main(int argc, char **argv)
...
@@ -122,7 +122,13 @@ int main(int argc, char **argv)
printf
(
"Process %d of %d is on %s
\n
"
,
printf
(
"Process %d of %d is on %s
\n
"
,
rank
,
nranks
,
processor_name
);
rank
,
nranks
,
processor_name
);
parse_args
(
argc
,
argv
,
&
g_opts
);
ret
=
parse_args
(
argc
,
argv
,
&
g_opts
);
if
(
ret
<
0
)
{
if
(
rank
==
0
)
usage
();
exit
(
EXIT_FAILURE
);
}
/* allocate one big buffer for rdma transfers */
/* allocate one big buffer for rdma transfers */
g_buffer
=
calloc
(
g_buffer_size
,
1
);
g_buffer
=
calloc
(
g_buffer_size
,
1
);
...
@@ -318,7 +324,7 @@ int main(int argc, char **argv)
...
@@ -318,7 +324,7 @@ int main(int argc, char **argv)
return
0
;
return
0
;
}
}
static
void
parse_args
(
int
argc
,
char
**
argv
,
struct
options
*
opts
)
static
int
parse_args
(
int
argc
,
char
**
argv
,
struct
options
*
opts
)
{
{
int
opt
;
int
opt
;
int
ret
;
int
ret
;
...
@@ -340,70 +346,53 @@ static void parse_args(int argc, char **argv, struct options *opts)
...
@@ -340,70 +346,53 @@ static void parse_args(int argc, char **argv, struct options *opts)
if
(
!
opts
->
diag_file_name
)
if
(
!
opts
->
diag_file_name
)
{
{
perror
(
"strdup"
);
perror
(
"strdup"
);
exit
(
EXIT_FAILURE
);
return
(
-
1
);
}
}
break
;
break
;
case
'x'
:
case
'x'
:
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
xfer_size
);
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
xfer_size
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
{
return
(
-
1
);
usage
();
exit
(
EXIT_FAILURE
);
}
break
;
break
;
case
'c'
:
case
'c'
:
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
concurrency
);
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
concurrency
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
{
return
(
-
1
);
usage
();
exit
(
EXIT_FAILURE
);
}
break
;
break
;
case
'T'
:
case
'T'
:
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
threads
);
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
threads
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
{
return
(
-
1
);
usage
();
exit
(
EXIT_FAILURE
);
}
break
;
break
;
case
'D'
:
case
'D'
:
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
duration_seconds
);
ret
=
sscanf
(
optarg
,
"%d"
,
&
opts
->
duration_seconds
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
{
return
(
-
1
);
usage
();
exit
(
EXIT_FAILURE
);
}
break
;
break
;
case
't'
:
case
't'
:
ret
=
sscanf
(
optarg
,
"%u,%u"
,
&
opts
->
mercury_timeout_client
,
&
opts
->
mercury_timeout_server
);
ret
=
sscanf
(
optarg
,
"%u,%u"
,
&
opts
->
mercury_timeout_client
,
&
opts
->
mercury_timeout_server
);
if
(
ret
!=
2
)
if
(
ret
!=
2
)
{
return
(
-
1
);
usage
();
exit
(
EXIT_FAILURE
);
}
break
;
break
;
case
'n'
:
case
'n'
:
opts
->
na_transport
=
strdup
(
optarg
);
opts
->
na_transport
=
strdup
(
optarg
);
if
(
!
opts
->
na_transport
)
if
(
!
opts
->
na_transport
)
{
{
perror
(
"strdup"
);
perror
(
"strdup"
);
exit
(
EXIT_FAILURE
);
return
(
-
1
);
}
}
break
;
break
;
default:
default:
usage
();
return
(
-
1
);
exit
(
EXIT_FAILURE
);
}
}
}
}
if
(
opts
->
xfer_size
<
1
||
opts
->
concurrency
<
1
||
opts
->
duration_seconds
<
1
||
!
opts
->
na_transport
)
if
(
opts
->
xfer_size
<
1
||
opts
->
concurrency
<
1
||
opts
->
duration_seconds
<
1
||
!
opts
->
na_transport
)
{
{
usage
();
return
(
-
1
);
exit
(
EXIT_FAILURE
);
}
}
return
;
return
(
0
)
;
}
}
static
void
usage
(
void
)
static
void
usage
(
void
)
...
...
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