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
b391da60
Commit
b391da60
authored
1 year ago
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
Added Local Concurrency generator
parent
0743c3ca
No related branches found
No related tags found
1 merge request
!6
More Work on infrastructure IV
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/errors/pt2pt/LocalConcurrency.py
+65
-0
65 additions, 0 deletions
scripts/errors/pt2pt/LocalConcurrency.py
with
65 additions
and
0 deletions
scripts/errors/pt2pt/LocalConcurrency.py
0 → 100644
+
65
−
0
View file @
b391da60
#! /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
from
itertools
import
chain
from
scripts.Infrastructure.Variables
import
ERROR_MARKER_COMMENT
sendrecv_funcs
=
[
"
mpi_sendrecv
"
,
"
mpi_sendrecv_replace
"
]
class
LocalConcurrencyErrorP2P
(
ErrorGenerator
):
functions_to_check
=
[
"
mpi_irecv
"
,
"
mpi_isend
"
,
"
mpi_issend
"
,
"
mpi_irsend
"
,
"
mpi_ibsend
"
,
"
mpi_send_init
"
,
"
mpi_ssend_init
"
,
"
mpi_bsend_init
"
,
"
mpi_rsend_init
"
,
"
mpi_psend_init
"
,
"
mpi_precv_init
"
,
"
mpi_recv_init
"
]
recv_funcs
=
[
"
mpi_irecv
"
,
"
mpi_recv_init
"
,
"
mpi_precv_init
"
]
def
__init__
(
self
):
pass
def
get_num_errors
(
self
):
# send + receive = only check the first two functions
return
1
*
2
# the number of errors to produce in the extended mode (all possible combinations)
def
get_num_errors_extended
(
self
):
return
1
*
len
(
self
.
functions_to_check
)
def
get_feature
(
self
):
return
[
"
P2P
"
]
def
generate
(
self
,
i
):
send_func
=
self
.
functions_to_check
[
i
]
check_receive
=
False
recv_func
=
"
mpi_irecv
"
if
send_func
in
self
.
recv_funcs
:
check_receive
=
True
recv_func
=
send_func
send_func
=
"
mpi_isend
"
tm
=
get_send_recv_template
(
send_func
,
recv_func
)
if
check_receive
:
tm
.
set_description
(
"
LocalConcurrency-receive-
"
+
recv_func
,
"
usage of receive buffer before operation is completed
"
)
else
:
tm
.
set_description
(
"
LocalConcurrency-send-
"
+
send_func
,
"
usage of send buffer before operation is completed
"
)
if
check_receive
:
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
0
,
index
=
0
).
set_has_error
()
tm
.
get_block
(
"
MPICALL
"
).
register_operation
(
"
buf[2]=1;
"
+
ERROR_MARKER_COMMENT
,
kind
=
1
)
else
:
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
1
,
index
=
0
).
set_has_error
()
tm
.
get_block
(
"
MPICALL
"
).
register_operation
(
"
buf[2]=1;
"
+
ERROR_MARKER_COMMENT
,
kind
=
1
)
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