Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
BayesValidRox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inversemodeling
BayesValidRox
Commits
10adae8e
Commit
10adae8e
authored
5 years ago
by
Farid Mohammadi
Browse files
Options
Downloads
Patches
Plain Diff
[PyLink] minor changes.
parent
7daa1447
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BayesValidRox/PyLink/PyLinkForwardModel.py
+8
-8
8 additions, 8 deletions
BayesValidRox/PyLink/PyLinkForwardModel.py
with
8 additions
and
8 deletions
BayesValidRox/PyLink/PyLinkForwardModel.py
+
8
−
8
View file @
10adae8e
...
...
@@ -31,8 +31,8 @@ np.set_printoptions(formatter={'float_kind':float_formatter})
class
PyLinkForwardModel
:
def
__init__
(
self
):
self
.
Type
=
'
PyLink
'
self
.
nrCPUs
=
None
self
.
Name
=
None
self
.
nrCPUs
=
None
self
.
Name
=
None
self
.
InputFile
=
None
self
.
InputTemplate
=
None
self
.
AuxFile
=
None
...
...
@@ -259,12 +259,12 @@ class PyLinkForwardModel:
start_time
=
time
.
time
()
# Start a pool with the number of CPUs
if
self
.
nrCPUs
is
None
:
nrCPUs
=
multiprocessing
.
cpu_count
()
else
:
nrCPUs
=
self
.
nrCPUs
pool
=
multiprocessing
.
Pool
(
nrCPUs
)
if
self
.
nrCPUs
is
None
:
nrCPUs
=
multiprocessing
.
cpu_count
()
else
:
nrCPUs
=
self
.
nrCPUs
pool
=
multiprocessing
.
Pool
(
nrCPUs
)
# With Pool.starmap_async()
results
=
pool
.
starmap_async
(
self
.
Run_Model
,
[(
CollocationPoint
,
prevRun_No
+
Run_No
,
keyString
)
for
Run_No
,
CollocationPoint
in
enumerate
(
CollocationPoints
)]).
get
()
...
...
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