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
a8e371ba
Commit
a8e371ba
authored
1 year ago
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring: Moved the collective Generator to collective
parent
bf4a0fe6
Branches
Branches containing commit
No related tags found
1 merge request
!4
Devel tj
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/errors/coll/InvalidRank.py
+38
-0
38 additions, 0 deletions
scripts/errors/coll/InvalidRank.py
scripts/errors/coll/__init__.py
+0
-0
0 additions, 0 deletions
scripts/errors/coll/__init__.py
scripts/errors/pt2pt/InvalidRank.py
+0
-30
0 additions, 30 deletions
scripts/errors/pt2pt/InvalidRank.py
with
38 additions
and
30 deletions
scripts/errors/coll/InvalidRank.py
0 → 100644
+
38
−
0
View file @
a8e371ba
#! /usr/bin/python3
from
scripts.Infrastructure.ErrorGenerator
import
ErrorGenerator
from
scripts.Infrastructure.InstructionBlock
import
InstructionBlock
from
scripts.Infrastructure.MPICallFactory
import
MPICallFactory
,
CorrectMPICallFactory
from
scripts.Infrastructure.CorrectParameter
import
CorrectParameterFactory
,
get_matching_recv
from
scripts.Infrastructure.Template
import
TemplateManager
from
scripts.Infrastructure.TemplateFactory
import
get_send_recv_template
,
get_collective_template
class
InvalidRankErrorColl
(
ErrorGenerator
):
invalid_ranks
=
[
"
-1
"
,
"
size
"
,
"
MPI_PROC_NULL
"
]
functions_to_use
=
[
"
mpi_reduce
"
,
"
mpi_bcast
"
]
def
__init__
(
self
):
pass
def
get_num_errors
(
self
):
return
len
(
self
.
invalid_ranks
)
*
len
(
self
.
functions_to_use
)
# the number of errors to produce in the extended mode (all possible combinations)
def
get_num_errors_extended
(
self
):
return
len
(
self
.
invalid_ranks
)
*
len
(
self
.
functions_to_use
)
def
get_feature
(
self
):
return
[
"
COLL
"
]
def
generate
(
self
,
i
):
rank_to_use
=
self
.
invalid_ranks
[
i
//
len
(
self
.
functions_to_use
)]
func_to_use
=
self
.
functions_to_use
[
i
%
len
(
self
.
functions_to_use
)]
tm
=
get_collective_template
(
func_to_use
,
seperate
=
False
)
arg_to_replace
=
"
root
"
tm
.
set_description
(
"
InvalidParam-Rank-
"
+
func_to_use
,
"
Invalid Rank: %s
"
%
rank_to_use
)
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
'
all
'
,
index
=
0
).
set_arg
(
arg_to_replace
,
rank_to_use
)
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
'
all
'
,
index
=
0
).
set_has_error
()
return
tm
This diff is collapsed.
Click to expand it.
scripts/errors/coll/__init__.py
0 → 100644
+
0
−
0
View file @
a8e371ba
This diff is collapsed.
Click to expand it.
scripts/errors/pt2pt/InvalidRank.py
+
0
−
30
View file @
a8e371ba
...
...
@@ -35,33 +35,3 @@ class InvalidRankErrorP2P(ErrorGenerator):
return
tm
class
InvalidRankErrorColl
(
ErrorGenerator
):
invalid_ranks
=
[
"
-1
"
,
"
size
"
,
"
MPI_PROC_NULL
"
]
functions_to_use
=
[
"
mpi_reduce
"
,
"
mpi_bcast
"
]
def
__init__
(
self
):
pass
def
get_num_errors
(
self
):
return
len
(
self
.
invalid_ranks
)
*
len
(
self
.
functions_to_use
)
# the number of errors to produce in the extended mode (all possible combinations)
def
get_num_errors_extended
(
self
):
return
len
(
self
.
invalid_ranks
)
*
len
(
self
.
functions_to_use
)
def
get_feature
(
self
):
return
[
"
COLL
"
]
def
generate
(
self
,
i
):
rank_to_use
=
self
.
invalid_ranks
[
i
//
len
(
self
.
functions_to_use
)]
func_to_use
=
self
.
functions_to_use
[
i
%
len
(
self
.
functions_to_use
)]
tm
=
get_collective_template
(
func_to_use
,
seperate
=
False
)
arg_to_replace
=
"
root
"
tm
.
set_description
(
"
InvalidParam-Rank-
"
+
func_to_use
,
"
Invalid Rank: %s
"
%
rank_to_use
)
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
'
all
'
,
index
=
0
).
set_arg
(
arg_to_replace
,
rank_to_use
)
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
'
all
'
,
index
=
0
).
set_has_error
()
return
tm
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