Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MPI-BugBench
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
High Performance Computing - Public
MPI-BugBench
Commits
221bf89f
Commit
221bf89f
authored
1 year ago
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring: Renamed Parameter
parent
983c7710
No related branches found
No related tags found
1 merge request
!6
More Work on infrastructure IV
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/Infrastructure/Template.py
+9
-9
9 additions, 9 deletions
scripts/Infrastructure/Template.py
scripts/errors/pt2pt/InvalidComm.py
+2
-2
2 additions, 2 deletions
scripts/errors/pt2pt/InvalidComm.py
with
11 additions
and
11 deletions
scripts/Infrastructure/Template.py
+
9
−
9
View file @
221bf89f
...
...
@@ -187,7 +187,7 @@ class TemplateManager:
raise
ValueError
(
"
Neither Both block name nor index is given
"
)
def
insert_block
(
self
,
new_block
,
block_name
=
None
,
idx
=
None
):
def
insert_block
(
self
,
new_block
,
after_
block_name
=
None
,
after_
idx
=
None
):
"""
inserts the given Instruction Block AFTER the one specified Either by name or by index
Raises IndexError if the specified block is not found
...
...
@@ -195,13 +195,13 @@ class TemplateManager:
Raises ValueError if Both a block name and index are given (or none is given)
Args:
new_block (InstructionBlock): the block to insert
block_name (str): The name of the InstructionBlock to receive
idx (int): index of the InstructionBlock to retrieve
after_
block_name (str): The name of the InstructionBlock to receive
after_
idx (int): index of the InstructionBlock to retrieve
"""
if
block_name
is
not
None
:
if
idx
is
not
None
:
if
after_
block_name
is
not
None
:
if
after_
idx
is
not
None
:
raise
ValueError
(
"
Both block name and index are given
"
)
to_return
=
[
b
for
b
in
self
.
_blocks
if
b
.
name
==
block_name
]
to_return
=
[
b
for
b
in
self
.
_blocks
if
b
.
name
==
after_
block_name
]
if
len
(
to_return
)
==
0
:
raise
IndexError
(
"
Block Not Found
"
)
if
len
(
to_return
)
>
1
:
...
...
@@ -209,10 +209,10 @@ class TemplateManager:
self
.
_blocks
.
insert
(
self
.
_blocks
.
index
(
to_return
[
0
])
+
1
,
new_block
)
return
if
idx
is
not
None
:
if
block_name
is
not
None
:
if
after_
idx
is
not
None
:
if
after_
block_name
is
not
None
:
raise
ValueError
(
"
Both block name and index are given
"
)
self
.
_blocks
.
insert
(
idx
+
1
,
new_block
)
self
.
_blocks
.
insert
(
after_
idx
+
1
,
new_block
)
return
raise
ValueError
(
"
Neither Both block name nor index is given
"
)
...
...
This diff is collapsed.
Click to expand it.
scripts/errors/pt2pt/InvalidComm.py
+
2
−
2
View file @
221bf89f
...
...
@@ -72,10 +72,10 @@ class InvalidCommErrorP2P(ErrorGenerator):
if
comm_to_use
in
self
.
missmatching_comms
and
comm_to_use
!=
"
MPI_COMM_SELF
"
:
b
=
get_communicator
(
comm_to_use
,
comm_to_use
)
tm
.
insert_block
(
b
,
block_name
=
"
alloc
"
)
tm
.
insert_block
(
b
,
after_
block_name
=
"
alloc
"
)
if
comm_to_use
in
self
.
intercomms
:
b
=
get_intercomm
(
comm_to_use
,
comm_to_use
)
tm
.
insert_block
(
b
,
block_name
=
"
alloc
"
)
tm
.
insert_block
(
b
,
after_
block_name
=
"
alloc
"
)
error_string
=
"
ParamMatching
"
if
comm_to_use
in
self
.
invalid_comm
:
...
...
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