Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
swiftmpistepsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
swiftmpistepsim
Commits
db32f19a
Commit
db32f19a
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to scale all message sizes
parent
1e3af608
No related branches found
No related tags found
1 merge request
!7
Add a scale factor for messages
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swiftmpistepsim.c
+16
-2
16 additions, 2 deletions
swiftmpistepsim.c
with
16 additions
and
2 deletions
swiftmpistepsim.c
+
16
−
2
View file @
db32f19a
...
...
@@ -38,6 +38,9 @@ static int verbose = 0;
/* Attempt to keep original injection time differences. */
static
int
usetics
=
1
;
/* Scale to apply to the size of the messages we send. */
static
float
messagescale
=
1
.
0
;
/* Integer types of send and recv tasks, must match log. */
static
const
int
task_type_send
=
22
;
static
const
int
task_type_recv
=
23
;
...
...
@@ -336,6 +339,9 @@ static void pick_logs(void) {
if
(
log
->
rank
==
myrank
&&
log
->
activation
)
{
if
(
log
->
type
==
task_type_send
||
log
->
type
==
task_type_recv
)
{
/* Scale size. */
log
->
size
*=
messagescale
;
/* Allocate space for data. */
log
->
data
=
calloc
(
log
->
size
,
1
);
...
...
@@ -366,7 +372,8 @@ static void pick_logs(void) {
static
void
usage
(
char
*
argv
[])
{
fprintf
(
stderr
,
"Usage: %s [-vf] SWIFT_mpiuse-log-file.dat logfile.dat
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
" options: -v verbose, -f fast injections
\n
"
);
fprintf
(
stderr
,
" options: -v verbose, -f fast injections, "
"-s message size (bytes)
\n
"
);
fflush
(
stderr
);
}
...
...
@@ -392,7 +399,7 @@ int main(int argc, char *argv[]) {
/* Handle the command-line, we expect a mpiuse data file to read and various
* options. */
int
opt
;
while
((
opt
=
getopt
(
argc
,
argv
,
"vf"
))
!=
-
1
)
{
while
((
opt
=
getopt
(
argc
,
argv
,
"vf
s:
"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'f'
:
usetics
=
0
;
...
...
@@ -400,6 +407,9 @@ int main(int argc, char *argv[]) {
case
'v'
:
verbose
=
1
;
break
;
case
's'
:
messagescale
=
atof
(
optarg
);
break
;
default:
if
(
myrank
==
0
)
usage
(
argv
);
return
1
;
...
...
@@ -438,6 +448,10 @@ int main(int argc, char *argv[]) {
if
(
myrank
==
0
)
{
message
(
"Start of MPI tests"
);
message
(
"=================="
);
if
(
messagescale
!=
1
.
0
f
)
{
message
(
" "
);
message
(
" Using message scale of %f"
,
messagescale
);
}
}
/* Make three threads, one for injecting tasks and two to check for
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment