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
37406de3
Commit
37406de3
authored
1 year ago
by
Jammer, Tim
Browse files
Options
Downloads
Patches
Plain Diff
string generation from instructions instead of blocks
parent
c8369980
Branches
Branches containing commit
No related tags found
1 merge request
!14
Infrastructure: Remove Instructionblock
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/Infrastructure/Template.py
+18
-4
18 additions, 4 deletions
scripts/Infrastructure/Template.py
with
18 additions
and
4 deletions
scripts/Infrastructure/Template.py
+
18
−
4
View file @
37406de3
...
@@ -114,9 +114,23 @@ class TemplateManager:
...
@@ -114,9 +114,23 @@ class TemplateManager:
Converts the TemplateManager to a string, replacing placeholders.
Converts the TemplateManager to a string, replacing placeholders.
"""
"""
version
=
self
.
get_version
()
version
=
self
.
get_version
()
block_string
=
""
code_string
=
""
for
block
in
self
.
_blocks
:
current_rank
=
'
all
'
block_string
+=
str
(
block
)
+
"
\n
"
for
inst
in
self
.
_instructions
:
if
inst
.
get_ranks_executing
!=
current_rank
:
if
current_rank
!=
'
all
'
:
code_string
=
code_string
+
"
}
\n
"
# end previous if
current_rank
=
inst
.
get_ranks_executing
()
if
current_rank
==
'
not0
'
:
code_string
=
code_string
+
"
if (rank!=0){
\n
"
elif
current_rank
!=
'
all
'
:
code_string
=
code_string
+
"
if (rank==%D){
\n
"
%
current_rank
code_string
+=
str
(
inst
)
+
"
\n
"
# end for inst
if
current_rank
!=
'
all
'
:
code_string
=
code_string
+
"
}
\n
"
# end previous if
init_string
=
""
init_string
=
""
if
self
.
_has_init
:
if
self
.
_has_init
:
...
@@ -135,7 +149,7 @@ class TemplateManager:
...
@@ -135,7 +149,7 @@ class TemplateManager:
.
replace
(
"
@{mpi_finalize}@
"
,
finalize_string
)
.
replace
(
"
@{mpi_finalize}@
"
,
finalize_string
)
.
replace
(
"
@{desc}@
"
,
self
.
_descr_full
)
.
replace
(
"
@{desc}@
"
,
self
.
_descr_full
)
.
replace
(
"
@{version}@
"
,
version
)
.
replace
(
"
@{version}@
"
,
version
)
.
replace
(
"
@{test_code}@
"
,
block
_string
))
.
replace
(
"
@{test_code}@
"
,
code
_string
))
def
register_instruction
(
self
,
inst
:
Instruction
|
typing
.
List
[
Instruction
]):
def
register_instruction
(
self
,
inst
:
Instruction
|
typing
.
List
[
Instruction
]):
"""
"""
...
...
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