Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quickstart
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
exacb
examples
quickstart
Commits
446fcc35
Verified
Commit
446fcc35
authored
7 months ago
by
Jayesh Badwaik
Browse files
Options
Downloads
Patches
Plain Diff
+ energy measurement included
parent
b06666e2
No related branches found
No related tags found
No related merge requests found
Pipeline
#238069
failed
7 months ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
simple.yml
+10
-0
10 additions, 0 deletions
simple.yml
src/value.py
+12
-1
12 additions, 1 deletion
src/value.py
with
22 additions
and
1 deletion
simple.yml
+
10
−
0
View file @
446fcc35
...
@@ -119,6 +119,12 @@ patternset:
...
@@ -119,6 +119,12 @@ patternset:
pattern
:
pattern
:
-
name
:
success
-
name
:
success
_
:
$jube_pat_wrd
_
:
$jube_pat_wrd
-
name
:
energy_pattern
pattern
:
-
name
:
energy.start
_
:
'
energy_measure_start:$jube_pat_bl$jube_pat_fp'
-
name
:
energy.stop
_
:
'
energy_measure_stop:$jube_pat_bl$jube_pat_fp'
analyser
:
analyser
:
...
@@ -132,6 +138,8 @@ analyser:
...
@@ -132,6 +138,8 @@ analyser:
_
:
run.jobid
_
:
run.jobid
-
use
:
success_pattern
-
use
:
success_pattern
_
:
success
_
:
success
-
use
:
energy_pattern
_
:
energy.times
result
:
result
:
use
:
use
:
...
@@ -150,3 +158,5 @@ result:
...
@@ -150,3 +158,5 @@ result:
-
threadspertask
-
threadspertask
-
runtime
-
runtime
-
{
title
:
"
success"
,
_
:
success
}
-
{
title
:
"
success"
,
_
:
success
}
-
energy.start
-
energy.end
This diff is collapsed.
Click to expand it.
src/value.py
+
12
−
1
View file @
446fcc35
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
import
argparse
import
argparse
import
random
import
random
from
mpi4py
import
MPI
from
mpi4py
import
MPI
import
time
def
parser
():
def
parser
():
parser
=
argparse
.
ArgumentParser
(
description
=
"
Value of a number
"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"
Value of a number
"
)
...
@@ -10,6 +12,7 @@ def parser():
...
@@ -10,6 +12,7 @@ def parser():
parser
.
add_argument
(
"
--input
"
,
type
=
str
,
help
=
"
Input file
"
)
parser
.
add_argument
(
"
--input
"
,
type
=
str
,
help
=
"
Input file
"
)
return
parser
return
parser
# This is the main function
# This is the main function
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
comm
=
MPI
.
COMM_WORLD
comm
=
MPI
.
COMM_WORLD
...
@@ -20,5 +23,13 @@ if __name__ == "__main__":
...
@@ -20,5 +23,13 @@ if __name__ == "__main__":
problem_size
=
float
(
data
)
*
float
(
args
.
number
)
*
12
problem_size
=
float
(
data
)
*
float
(
args
.
number
)
*
12
runtime
=
problem_size
/
nproc
*
random
.
uniform
(
0.8
,
1.2
)
runtime
=
problem_size
/
nproc
*
random
.
uniform
(
0.8
,
1.2
)
string
=
"
"
*
random
.
randint
(
1
,
10
)
string
=
"
"
*
random
.
randint
(
1
,
10
)
time
.
sleep
(
random
.
randint
(
10
,
15
))
with
open
(
"
energy.times
"
,
"
w
"
)
as
g
:
g
.
write
(
"
energy_measure_start:
"
+
str
(
time
.
time
())
+
"
\n
"
)
if
comm
.
Get_rank
()
==
0
:
if
comm
.
Get_rank
()
==
0
:
print
(
"
Runtime={}{}
"
.
format
(
string
,
runtime
))
print
(
"
Runtime={}{}
"
.
format
(
string
,
runtime
))
with
open
(
"
energy.times
"
,
"
w
"
)
as
g
:
g
.
write
(
"
energy_measure_stop:
"
+
str
(
time
.
time
())
+
"
\n
"
)
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