Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
COBREXA.jl
Manage
Activity
Members
Plan
External wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LCSB-BioCore
COBREXA.jl
Commits
ac01d755
Unverified
Commit
ac01d755
authored
3 years ago
by
St. Elmo
Browse files
Options
Downloads
Patches
Plain Diff
error with parallel warmup
parent
c367af2f
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/analysis/sampling/hit_and_run.jl
+2
-5
2 additions, 5 deletions
src/analysis/sampling/hit_and_run.jl
src/analysis/sampling/warmup.jl
+8
-3
8 additions, 3 deletions
src/analysis/sampling/warmup.jl
with
10 additions
and
8 deletions
src/analysis/sampling/hit_and_run.jl
+
2
−
5
View file @
ac01d755
...
...
@@ -63,14 +63,11 @@ function hit_and_run(
model
,
optimizer
;
modifications
=
modifications
,
warmup_points
=
warmup_indices
,
workers
=
workers
,
# parallel
)
# load warmup points to workers
map
(
fetch
,
save_at
.
(
workers
,
:
ws
,
Ref
(
:
(
$
ws
))))
map
(
fetch
,
save_at
.
(
workers
,
:
lbs
,
Ref
(
:
(
$
lbs
))))
map
(
fetch
,
save_at
.
(
workers
,
:
ubs
,
Ref
(
:
(
$
ubs
))))
save_at
.
(
workers
,
:
_cobrexa_hit_and_run_warmup
,
Ref
(
:
(
$
ws
,
$
lbs
,
$
ubs
)))
# do in parallel!
samples
=
dpmap
(
...
...
@@ -134,7 +131,7 @@ function _serial_hit_and_run(ws, lbs, ubs, samplesize, keepevery, N)
end
if
λmax
<=
λmin
||
λmin
==
-
Inf
||
λmax
==
Inf
# this sometimes can happen
@warn
"Infeasible direction at iteration
$(n)
..."
#
@warn "Infeasible direction at iteration $(n)..."
# noisy
continue
end
...
...
This diff is collapsed.
Click to expand it.
src/analysis/sampling/warmup.jl
+
8
−
3
View file @
ac01d755
...
...
@@ -22,17 +22,22 @@ function warmup(
mod
(
model
,
optmodel
)
end
map
(
fetch
,
save_at
.
(
workers
,
:
warmup_model
,
Ref
(
:
(
$
optmodel
))))
save_model
=
:
(
$
optmodel
)
map
(
fetch
,
save_at
.
(
workers
,
:
cobrexa_hit_and_run_warmup_model
,
Ref
(
save_model
)))
ret
=
m
->
value
.
(
m
[
:
x
])
# get all the fluxes
# error occurs here :/
fluxes
=
dpmap
(
rid
->
:
(
$
COBREXA
.
_FVA_optimize_reaction
(
warmup_model
,
$
rid
,
$
ret
)),
rid
->
:
(
$
COBREXA
.
_FVA_optimize_reaction
(
cobrexa_hit_and_run_
warmup_model
,
$
rid
,
$
ret
)),
CachingPool
(
workers
),
[
-
warmup_points
warmup_points
],
)
# free the data on workers
map
(
fetch
,
remove_from
.
(
workers
,
:
warmup_model
))
map
(
fetch
,
remove_from
.
(
workers
,
:
cobrexa_hit_and_run_
warmup_model
))
lbs
,
ubs
=
get_bound_vectors
(
optmodel
)
return
fluxes
,
lbs
,
ubs
...
...
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