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
c5f4297d
Commit
c5f4297d
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Formatting
parent
d22af55a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mpiuse.c
+11
-11
11 additions, 11 deletions
mpiuse.c
swiftmpistepsim.c
+14
-9
14 additions, 9 deletions
swiftmpistepsim.c
with
25 additions
and
20 deletions
mpiuse.c
+
11
−
11
View file @
c5f4297d
...
...
@@ -182,7 +182,8 @@ void mpiuse_dump_logs(int nranks, const char *dumpfile) {
fd
=
fopen
(
dumpfile
,
"w"
);
/* Header. */
fprintf
(
fd
,
"# logticin logtic injtic endtic dtic step rank otherrank itype "
fprintf
(
fd
,
"# logticin logtic injtic endtic dtic step rank otherrank itype "
" isubtype tag size nr_tests tsum tmin tmax
\n
"
);
fclose
(
fd
);
}
...
...
@@ -208,22 +209,21 @@ void mpiuse_dump_logs(int nranks, const char *dumpfile) {
for
(
size_t
k
=
0
;
k
<
nlogs
;
k
++
)
{
struct
mpiuse_log_entry
*
log
=
&
mpiuse_log
[
k
];
if
(
log
->
rank
==
myrank
&&
log
->
endtic
>
0
)
{
fprintf
(
fd
,
"%lld %.4f %.4f %.4f %.6f %d %d %d %d %d %d %zd %d %.4f %.6f %.6f
\n
"
,
log
->
tic
,
clocks_from_ticks
(
log
->
tic
),
clocks_from_ticks
(
log
->
injtic
-
clocks_start_ticks
),
clocks_from_ticks
(
log
->
end
tic
-
clocks_start_ticks
),
clocks_from_ticks
(
log
->
endtic
-
lo
g
->
inj
tic
),
log
->
step
,
log
->
rank
,
log
->
otherrank
,
log
->
type
,
log
->
subtype
,
log
->
tag
,
log
->
size
,
log
->
nr_tests
,
clocks_from_ticks
(
log
->
tsum
),
fprintf
(
fd
,
"%lld %.4f %.4f %.4f %.6f %d %d %d %d %d %d %zd %d %.4f %.6f "
"%.6f
\n
"
,
log
->
tic
,
clocks_from_ticks
(
log
->
tic
),
clocks_from_ticks
(
log
->
inj
tic
-
clocks_start_ticks
),
clocks_from_ticks
(
log
->
endtic
-
c
lo
cks_start_
tic
ks
),
clocks_from_ticks
(
log
->
endtic
-
log
->
injtic
)
,
log
->
step
,
log
->
rank
,
log
->
otherrank
,
log
->
type
,
log
->
subtype
,
log
->
tag
,
log
->
size
,
log
->
nr_tests
,
clocks_from_ticks
(
log
->
tsum
),
clocks_from_ticks
(
log
->
tmin
),
clocks_from_ticks
(
log
->
tmax
));
}
}
fclose
(
fd
);
}
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
swiftmpistepsim.c
+
14
−
9
View file @
c5f4297d
...
...
@@ -17,12 +17,12 @@
*
******************************************************************************/
#include
<limits.h>
#include
<mpi.h>
#include
<pthread.h>
#include
<unistd.h>
#include
<limits.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<unistd.h>
#include
"atomic.h"
#include
"clocks.h"
...
...
@@ -353,7 +353,8 @@ static void pick_logs(void) {
* @brief usage help.
*/
static
void
usage
(
char
*
argv
[])
{
fprintf
(
stderr
,
"Usage: %s [-vf] SWIFT_mpiuse-log-file.dat logfile.dat
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
"Usage: %s [-vf] SWIFT_mpiuse-log-file.dat logfile.dat
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
" options: -v verbose, -f fast injections
\n
"
);
fflush
(
stderr
);
}
...
...
@@ -382,11 +383,15 @@ int main(int argc, char *argv[]) {
int
opt
;
while
((
opt
=
getopt
(
argc
,
argv
,
"vf"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'f'
:
usetics
=
0
;
break
;
case
'v'
:
verbose
=
1
;
break
;
default:
if
(
myrank
==
0
)
usage
(
argv
);
return
1
;
case
'f'
:
usetics
=
0
;
break
;
case
'v'
:
verbose
=
1
;
break
;
default:
if
(
myrank
==
0
)
usage
(
argv
);
return
1
;
}
}
if
(
optind
>=
argc
-
1
)
{
...
...
@@ -394,7 +399,7 @@ int main(int argc, char *argv[]) {
return
1
;
}
char
*
infile
=
argv
[
optind
];
char
*
logfile
=
argv
[
optind
+
1
];
char
*
logfile
=
argv
[
optind
+
1
];
/* Now we read the SWIFT MPI logger output that defines the communcations
* we will undertake and the time differences between injections into the
...
...
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