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
a19e0095
Commit
a19e0095
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Attempt to synchronize old and new times for better comparison
Still have a problem keeping up with the initial injections
parent
e7aa1b62
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
+5
-2
5 additions, 2 deletions
mpiuse.c
swiftmpistepsim.c
+12
-6
12 additions, 6 deletions
swiftmpistepsim.c
with
17 additions
and
8 deletions
mpiuse.c
+
5
−
2
View file @
a19e0095
...
...
@@ -204,15 +204,18 @@ void mpiuse_dump_logs(int nranks, const char *dumpfile) {
fd
=
fopen
(
dumpfile
,
"a"
);
/* And append our logs. Note log->tic is not necessarily from this
machine, so the conversion to ms may be suspect. */
* machine, so the conversion to ms may be suspect. We also rebase a
* version to match the expected injection times for this new run. */
size_t
nlogs
=
mpiuse_log_count
;
ticks
basetics
=
0
;
for
(
size_t
k
=
0
;
k
<
nlogs
;
k
++
)
{
struct
mpiuse_log_entry
*
log
=
&
mpiuse_log
[
k
];
if
(
log
->
rank
==
myrank
&&
log
->
endtic
>
0
)
{
if
(
basetics
==
0
)
basetics
=
log
->
tic
;
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
),
log
->
tic
,
clocks_from_ticks
(
log
->
tic
-
basetics
),
clocks_from_ticks
(
log
->
injtic
-
clocks_start_ticks
),
clocks_from_ticks
(
log
->
endtic
-
clocks_start_ticks
),
clocks_from_ticks
(
log
->
endtic
-
log
->
injtic
),
log
->
step
,
...
...
This diff is collapsed.
Click to expand it.
swiftmpistepsim.c
+
12
−
6
View file @
a19e0095
...
...
@@ -80,6 +80,8 @@ static void *inject_thread(void *arg) {
ticks
basetic
=
reqs_queue
[
0
]
->
tic
;
ticks
looptics
=
0
;
double
deadtime
=
0
.
0
;
struct
timespec
sleep
;
sleep
.
tv_sec
=
0
;
while
(
ind_req
<
nr_reqs
)
{
struct
mpiuse_log_entry
*
log
=
reqs_queue
[
ind_req
];
...
...
@@ -96,8 +98,6 @@ static void *inject_thread(void *arg) {
* ticks of the log file into nanoseconds, that requires the original
* CPU frequency. */
if
(
dt
>
looptics
)
{
struct
timespec
sleep
;
sleep
.
tv_sec
=
0
;
/* Remember to be fair and remove the looptics, then convert to
* nanoseconds. */
...
...
@@ -149,12 +149,11 @@ static void *inject_thread(void *arg) {
ind_req
++
;
/* Set looptics on the first pass. Assumes MPI_Isend and MPI_Irecv are
* equally timed. Note we include a nanosleep, they are slow, and a fudge
* factor. */
* equally timed. Note we include a nanosleep, they are slow. */
if
(
looptics
==
0
&&
usetics
)
{
sleep
.
tv_nsec
=
1
;
nanosleep
(
&
sleep
,
NULL
);
looptics
=
(
getticks
()
-
starttics
)
*
2
;
looptics
=
(
getticks
()
-
starttics
);
if
(
verbose
)
message
(
"injection loop took %.3f %s."
,
clocks_from_ticks
(
looptics
),
clocks_getunit
());
...
...
@@ -352,6 +351,12 @@ static void pick_logs(void) {
/* Sort into increasing time. */
qsort
(
reqs_queue
,
nr_reqs
,
sizeof
(
struct
mpiuse_log_entry
*
),
cmp_logs
);
/* Check. */
for
(
int
k
=
0
;
k
<
nr_reqs
-
1
;
k
++
)
{
if
(
reqs_queue
[
k
]
->
tic
>
reqs_queue
[
k
+
1
]
->
tic
)
message
(
"reqs_queue: %lld > %lld"
,
reqs_queue
[
k
]
->
tic
,
reqs_queue
[
k
+
1
]
->
tic
);
}
}
/**
...
...
@@ -426,7 +431,8 @@ int main(int argc, char *argv[]) {
/* Each rank requires its own queue, so extract them. */
pick_logs
();
/* Time to start time. */
/* Time to start time. Try to make it synchronous across the ranks. */
MPI_Barrier
(
MPI_COMM_WORLD
);
clocks_set_cpufreq
(
0
);
if
(
myrank
==
0
)
{
message
(
"Start of MPI tests"
);
...
...
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