Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MDANSE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Scientific Software
MDANSE
Commits
810b1a67
Commit
810b1a67
authored
Dec 10, 2019
by
eric pellegrini
Committed by
Remi Perenon
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the name server is now correctly shutdowned
the Test fake analysis now does real computation for better modelling
parent
7dbcd4e3
Pipeline
#7172
failed with stages
in 27 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
Src/Framework/Jobs/IJob.py
Src/Framework/Jobs/IJob.py
+12
-8
Src/Framework/Jobs/Test.py
Src/Framework/Jobs/Test.py
+3
-1
No files found.
Src/Framework/Jobs/IJob.py
View file @
810b1a67
...
...
@@ -140,13 +140,15 @@ class IJob(Configurable):
# Otherwise, start a new one.
except
Pyro
.
errors
.
NamingError
:
subprocess
.
Popen
([
sys
.
executable
,
'-O'
,
'-c'
,
"import Pyro.naming; Pyro.naming.main([])"
],
stdout
=
subprocess
.
PIPE
)
p
=
subprocess
.
Popen
([
sys
.
executable
,
'-O'
,
'-c'
,
"import Pyro.naming; Pyro.naming.main([])"
],
stdout
=
subprocess
.
PIPE
)
ns
=
None
while
ns
is
None
:
try
:
ns
=
locator
.
getNS
()
except
Pyro
.
errors
.
NamingError
:
pass
return
p
@
property
def
name
(
self
):
...
...
@@ -261,7 +263,7 @@ class IJob(Configurable):
def
_run_remote
(
self
):
IJob
.
set_pyro_server
()
self
.
_pyro_process
=
IJob
.
set_pyro_server
()
import
MDANSE.DistributedComputing.MasterSlave
as
MasterSlave
...
...
@@ -279,14 +281,16 @@ class IJob(Configurable):
_
,
_
,
(
idx
,
x
)
=
tasks
.
retrieveResult
(
"run_step"
)
self
.
combine
(
idx
,
x
)
if
self
.
_status
is
not
None
:
if
self
.
_status
.
is_stopped
():
self
.
_status
.
cleanup
()
return
else
:
self
.
_status
.
update
()
if
self
.
_status
is
not
None
:
if
self
.
_status
.
is_stopped
():
self
.
_status
.
cleanup
()
break
else
:
self
.
_status
.
update
()
tasks
.
shutdown
()
self
.
_pyro_process
.
terminate
()
_runner
=
{
"monoprocessor"
:
_run_monoprocessor
,
"multiprocessor"
:
_run_multiprocessor
,
"remote"
:
_run_remote
}
...
...
Src/Framework/Jobs/Test.py
View file @
810b1a67
...
...
@@ -44,6 +44,8 @@ class Test(IJob):
self
.
numberOfSteps
=
self
.
configuration
[
'n_steps'
][
'value'
]
self
.
results
=
numpy
.
zeros
((
5
,
5
),
dtype
=
numpy
.
int
)
self
.
_matrix
=
numpy
.
random
.
uniform
(
0
,
10
,(
8000
,
8000
))
def
run_step
(
self
,
index
):
...
...
@@ -57,7 +59,7 @@ class Test(IJob):
#. atomicMSD (numpy.array): The calculated mean square displacement for atom index
"""
time
.
sleep
(
self
.
configuration
[
'sleep'
][
'value'
]
)
inv
=
numpy
.
linalg
.
inv
(
self
.
_matrix
)
return
index
,
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment