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
91e29056
Commit
91e29056
authored
Feb 8, 2024
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
added rank field for Instruction
parent
7b684fd6
No related branches found
No related tags found
1 merge request
!14
Infrastructure: Remove Instructionblock
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/Infrastructure/AllocCall.py
+4
-2
4 additions, 2 deletions
scripts/Infrastructure/AllocCall.py
scripts/Infrastructure/Instruction.py
+13
-1
13 additions, 1 deletion
scripts/Infrastructure/Instruction.py
scripts/Infrastructure/MPICall.py
+5
-2
5 additions, 2 deletions
scripts/Infrastructure/MPICall.py
with
22 additions
and
5 deletions
scripts/Infrastructure/AllocCall.py
+
4
−
2
View file @
91e29056
#! /usr/bin/python3
from
__future__
import
annotations
from
typing_extensions
import
override
from
scripts.Infrastructure.Instruction
import
Instruction
...
...
@@ -26,7 +28,7 @@ alloc_template = """
class
AllocCall
(
Instruction
):
@override
def
__init__
(
self
,
type
:
str
,
num_elements
:
str
,
name
:
str
=
"
buf
"
,
use_malloc
:
bool
=
False
,
identifier
:
str
=
None
):
rank
:
str
|
int
=
'
all
'
,
identifier
:
str
=
None
):
"""
Creates a New allocation Call
...
...
@@ -36,7 +38,7 @@ class AllocCall(Instruction):
name: name of buffer variable
use_malloc: True: use Malloc, False: use calloc for allocation
"""
super
().
__init__
(
""
,
identifier
)
super
().
__init__
(
""
,
rank
,
identifier
)
self
.
_use_malloc
=
use_malloc
self
.
_type
=
type
self
.
_num_elements
=
num_elements
...
...
This diff is collapsed.
Click to expand it.
scripts/Infrastructure/Instruction.py
+
13
−
1
View file @
91e29056
#! /usr/bin/python3
from
__future__
import
annotations
from
scripts.Infrastructure.Variables
import
ERROR_MARKER_COMMENT_BEGIN
,
ERROR_MARKER_COMMENT_END
...
...
@@ -9,10 +10,13 @@ class Instruction(object):
the identifier is used, in order to reference that instruction in the Template Manager (e.g. to change it). can be None
"""
def
__init__
(
self
,
str_representation
:
str
,
identifier
:
str
=
None
):
def
__init__
(
self
,
str_representation
:
str
,
rank
:
str
|
int
=
'
all
'
,
identifier
:
str
=
None
):
self
.
_str_representation
=
str_representation
self
.
_has_error
=
False
self
.
_identifier
=
identifier
if
isinstance
(
rank
,
str
):
assert
rank
in
[
'
all
'
,
'
not0
'
]
self
.
_rank
=
rank
def
set_has_error
(
self
,
has_error
:
bool
=
True
):
self
.
_has_error
=
has_error
...
...
@@ -23,6 +27,14 @@ class Instruction(object):
def
set_identifier
(
self
,
identifier
:
str
):
self
.
_identifier
=
identifier
def
get_ranks_executing
(
self
)
->
str
|
int
:
return
self
.
_rank
def
set_ranks_executing
(
self
,
rank
:
str
|
int
):
if
isinstance
(
rank
,
str
):
assert
rank
in
[
'
all
'
,
'
not0
'
]
self
.
_rank
=
rank
def
__str__
(
self
):
if
self
.
_has_error
:
return
ERROR_MARKER_COMMENT_BEGIN
+
self
.
_str_representation
+
ERROR_MARKER_COMMENT_END
...
...
This diff is collapsed.
Click to expand it.
scripts/Infrastructure/MPICall.py
+
5
−
2
View file @
91e29056
#! /usr/bin/python3
from
__future__
import
annotations
import
typing
from
typing_extensions
import
override
...
...
@@ -9,8 +11,9 @@ from scripts.Infrastructure.Variables import ERROR_MARKER_COMMENT_BEGIN, ERROR_M
class
MPICall
(
Instruction
):
@override
def
__init__
(
self
,
function
:
str
,
args
:
typing
.
OrderedDict
[
str
,
str
],
version
:
str
,
identifier
:
str
=
None
):
super
().
__init__
(
""
,
identifier
)
def
__init__
(
self
,
function
:
str
,
args
:
typing
.
OrderedDict
[
str
,
str
],
version
:
str
,
rank
:
str
|
int
=
'
all
'
,
identifier
:
str
=
None
):
super
().
__init__
(
""
,
rank
,
identifier
)
self
.
_function
=
function
self
.
_args
=
args
self
.
_version
=
version
...
...
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