Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
cf53e67a
Commit
cf53e67a
authored
Jun 30, 2017
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
plot analysis: separate each MPI rank into its own file and associate with the appropriate figure
parent
57cfc386
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!360
Analyse script shows updates and sid
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/analyse_tasks_MPI.py
+13
-2
13 additions, 2 deletions
examples/analyse_tasks_MPI.py
examples/process_plot_tasks_MPI
+4
-2
4 additions, 2 deletions
examples/process_plot_tasks_MPI
with
17 additions
and
4 deletions
examples/analyse_tasks_MPI.py
+
13
−
2
View file @
cf53e67a
...
...
@@ -42,6 +42,9 @@ parser.add_argument("input", help="Thread data file (-y output)")
parser
.
add_argument
(
"
-v
"
,
"
--verbose
"
,
dest
=
"
verbose
"
,
help
=
"
Verbose output (default: False)
"
,
default
=
False
,
action
=
"
store_true
"
)
parser
.
add_argument
(
"
-r
"
,
"
--rank
"
,
dest
=
"
rank
"
,
help
=
"
Rank to process (default: all)
"
,
default
=
"
all
"
,
action
=
"
store
"
)
args
=
parser
.
parse_args
()
infile
=
args
.
input
...
...
@@ -78,6 +81,14 @@ print "# s_updates:", s_updates
nranks
=
int
(
max
(
data
[:,
0
]))
+
1
print
"
# Number of ranks:
"
,
nranks
if
args
.
rank
==
"
all
"
:
ranks
=
range
(
nranks
)
else
:
ranks
=
[
int
(
args
.
rank
)]
if
ranks
[
0
]
>=
nranks
:
print
"
Error: maximum rank is
"
+
str
(
nranks
-
1
)
sys
.
exit
(
1
)
maxthread
=
int
(
max
(
data
[:,
1
]))
+
1
print
"
# Maximum thread id:
"
,
maxthread
...
...
@@ -85,8 +96,8 @@ print "# Maximum thread id:", maxthread
sdata
=
data
[
data
[:,
5
]
!=
0
]
sdata
=
data
[
data
[:,
6
]
!=
0
]
# Now we process
all the
ranks.
for
rank
in
range
(
n
ranks
)
:
# Now we process
the required
ranks.
for
rank
in
ranks
:
print
"
# Rank
"
,
rank
data
=
sdata
[
sdata
[:,
0
]
==
rank
]
...
...
...
...
This diff is collapsed.
Click to expand it.
examples/process_plot_tasks_MPI
+
4
−
2
View file @
cf53e67a
...
...
@@ -62,7 +62,9 @@ nrank=$(($nrank-1))
# And process them,
echo "Processing thread info files..."
echo $list | xargs -P $NPROCS -n 3 /bin/bash -c "./plot_tasks_MPI.py --expand 1 --limit $TIMERANGE \$0 \$2 "
echo $list | xargs -P $NPROCS -n 3 /bin/bash -c "./analyse_tasks_MPI.py \$0 > \$2.stats"
for i in $(seq 0 $nrank); do
echo $list | xargs -P $NPROCS -n 3 /bin/bash -c "./analyse_tasks_MPI.py -r $i \$0 > \$2${i}.stats"
done
echo "Writing output index.html file"
# Construct document - serial.
...
...
@@ -93,7 +95,7 @@ EOF2
<img
src=
"step${s}r${i}.png"
>
<pre>
EOF2
cat step${s}r.stats >> step${s}r${i}.html
cat step${s}r
${i}
.stats >> step${s}r${i}.html
cat
<
<
EOF2
>
> step${s}r${i}.html
</pre>
</body>
...
...
...
...
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
sign in
to comment