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
a941089a
Commit
a941089a
authored
Feb 2, 2024
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
simplified InvalidBuffer case
parent
5505e4b7
Branches
Branches containing commit
No related tags found
1 merge request
!6
More Work on infrastructure IV
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/Infrastructure/GeneratorManager.py
+0
-1
0 additions, 1 deletion
scripts/Infrastructure/GeneratorManager.py
scripts/errors/pt2pt/InvalidBuf.py
+53
-56
53 additions, 56 deletions
scripts/errors/pt2pt/InvalidBuf.py
scripts/main.py
+2
-2
2 additions, 2 deletions
scripts/main.py
with
55 additions
and
59 deletions
scripts/Infrastructure/GeneratorManager.py
+
0
−
1
View file @
a941089a
...
...
@@ -111,7 +111,6 @@ class GeneratorManager:
cases_generated
=
0
for
generator
in
generators_to_use
:
print
(
generator
)
for
result_error
in
generator
.
generate
(
generate_full_set
):
assert
isinstance
(
result_error
,
TemplateManager
)
...
...
This diff is collapsed.
Click to expand it.
scripts/errors/pt2pt/InvalidBuf.py
+
53
−
56
View file @
a941089a
...
...
@@ -9,19 +9,19 @@ from scripts.Infrastructure.TemplateFactory import get_send_recv_template
from
itertools
import
chain
sendrecv_funcs
=
[
"
mpi_sendrecv
"
,
"
mpi_sendrecv_replace
"
]
class
InvalidBufErrorP2P
(
ErrorGenerator
):
invalid_bufs
=
[
CorrectParameterFactory
().
buf_var_name
,
"
NULL
"
]
functions_to_check
=
[
"
mpi_send
"
,
"
mpi_recv
"
,
"
mpi_irecv
"
,
send_funcs
=
[
"
mpi_send
"
,
"
mpi_isend
"
,
"
mpi_ssend
"
,
"
mpi_issend
"
,
"
mpi_rsend
"
,
"
mpi_irsend
"
,
"
mpi_bsend
"
,
"
mpi_ibsend
"
,
"
mpi_send_init
"
,
"
mpi_ssend_init
"
,
"
mpi_bsend_init
"
,
"
mpi_rsend_init
"
,
"
mpi_psend_init
"
,
"
mpi_precv_init
"
,
"
mpi_recv_init
"
]
+
sendrecv_funcs
+
sendrecv_funcs
# chekc sendrecv funcs two times: the send and recv part
recv_funcs
=
[
"
mpi_recv
"
,
"
mpi_irecv
"
,
"
mpi_recv_init
"
,
"
mpi_precv_init
"
]
+
sendrecv_funcs
]
recv_funcs
=
[
"
mpi_recv
"
,
"
mpi_irecv
"
,
"
mpi_recv_init
"
,
"
mpi_precv_init
"
]
sendrecv_funcs
=
[
"
mpi_sendrecv
"
,
"
mpi_sendrecv_replace
"
]
def
__init__
(
self
):
pass
...
...
@@ -29,20 +29,9 @@ class InvalidBufErrorP2P(ErrorGenerator):
def
get_feature
(
self
):
return
[
"
P2P
"
]
def
generate
(
self
,
generate_full_set
):
for
send_func
in
self
.
functions_to_check
:
for
buf_to_use
in
self
.
invalid_bufs
:
check_receive
=
False
recv_func
=
"
mpi_irecv
"
if
send_func
in
self
.
recv_funcs
:
check_receive
=
True
recv_func
=
send_func
send_func
=
"
mpi_send
"
# TODO
# if i % len(self.functions_to_check) >= len(self.functions_to_check) - len(sendrecv_funcs):
# check the send part of sendrecv
def
generate_impl
(
self
,
send_func
,
recv_func
,
check_receive
):
for
buf_to_use
in
self
.
invalid_bufs
:
tm
=
get_send_recv_template
(
send_func
,
recv_func
)
if
buf_to_use
==
CorrectParameterFactory
().
buf_var_name
:
...
...
@@ -51,7 +40,6 @@ class InvalidBufErrorP2P(ErrorGenerator):
type
=
tm
.
get_block
(
"
alloc
"
).
get_operation
(
kind
=
'
all
'
,
index
=
1
).
get_type
()
tm
.
get_block
(
"
alloc
"
).
replace_operation
(
CorrectParameterFactory
.
dtype
[
0
]
+
"
*
"
+
name
+
"
;
"
,
kind
=
'
all
'
,
index
=
1
)
else
:
tm
.
get_block
(
"
alloc
"
).
replace_operation
(
CorrectParameterFactory
.
dtype
[
0
]
+
"
*
"
+
CorrectParameterFactory
.
buf_var_name
+
"
;
"
)
...
...
@@ -76,9 +64,18 @@ class InvalidBufErrorP2P(ErrorGenerator):
tm
.
get_block
(
"
MPICALL
"
).
get_operation
(
kind
=
1
,
index
=
0
).
set_has_error
()
yield
tm
# end for buf_to_use
def
generate
(
self
,
generate_full_set
):
for
func
in
self
.
send_funcs
:
yield
from
self
.
generate_impl
(
func
,
'
mpi_irecv
'
,
False
)
if
not
generate_full_set
:
return
for
func
in
self
.
recv_funcs
:
yield
from
self
.
generate_impl
(
"
mpi_send
"
,
func
,
True
)
yield
from
self
.
generate_impl
(
"
mpi_sendrecv
"
,
"
mpi_sendrecv
"
,
True
)
yield
from
self
.
generate_impl
(
"
mpi_sendrecv
"
,
"
mpi_sendrecv
"
,
False
)
yield
from
self
.
generate_impl
(
"
mpi_sendrecv_replace
"
,
"
mpi_sendrecv_replace
"
,
True
)
class
MessageRaceErrorSendRecv
(
ErrorGenerator
):
...
...
This diff is collapsed.
Click to expand it.
scripts/main.py
+
2
−
2
View file @
a941089a
...
...
@@ -2,8 +2,8 @@
from
scripts.Infrastructure.GeneratorManager
import
GeneratorManager
if
__name__
==
"
__main__
"
:
gm
=
GeneratorManager
(
"
./errors
"
)
#
gm = GeneratorManager("./errors/devel")
#
gm = GeneratorManager("./errors")
gm
=
GeneratorManager
(
"
./errors/devel
"
)
#gm.generate("../gencodes", try_compile=True, generate_full_set=False) # default
gm
.
generate
(
"
../gencodes
"
,
try_compile
=
True
,
generate_full_set
=
True
,
max_mpi_version
=
"
3.1
"
)
#all cases that can compile for my local mpi installation
...
...
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