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
78d81acd
Unverified
Commit
78d81acd
authored
3 years ago
by
St. Elmo
Browse files
Options
Downloads
Patches
Plain Diff
strange behaviour
parent
d2880846
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
src/analysis/sampling/warmup.jl
+7
-10
7 additions, 10 deletions
src/analysis/sampling/warmup.jl
with
7 additions
and
10 deletions
src/analysis/sampling/warmup.jl
+
7
−
10
View file @
78d81acd
...
...
@@ -14,40 +14,37 @@ function warmup(
optimizer
;
warmup_points
::
Vector
{
Int
},
modifications
=
[],
workers
=
[
myid
()],
worker
id
s
=
[
myid
()],
)
# create optimization problem, apply constraints, load on all workers
save_model
=
:
(
begin
optmodel
=
$
COBREXA
.
make_optimization_model
(
$
model
,
$
optimizer
)
for
mod
in
$
modifications
mod
(
$
model
,
optmodel
)
end
optmodel
end
)
map
(
fetch
,
save_at
.
(
workers
,
:
cobrexa_
hit_and_run
_warmup_model
,
Ref
(
save_model
)))
map
(
fetch
,
save_at
.
(
worker
id
s
,
:
cobrexa_
sampling
_warmup_
opt
model
,
Ref
(
save_model
)))
ret
=
m
->
value
.
(
m
[
:
x
])
# get all the fluxes
fluxes
=
dpmap
(
rid
->
:
(
$
COBREXA
.
_FVA_optimize_reaction
(
cobrexa_
hit_and_run
_warmup_model
,
cobrexa_
sampling
_warmup_
opt
model
,
$
rid
,
$
ret
,
)),
CachingPool
(
workers
),
CachingPool
(
worker
id
s
),
[
-
warmup_points
warmup_points
],
)
# get constraints from one of the workers
lbs
,
ubs
=
get_val_from
(
workers
[
1
],
:
(
COBREXA
.
get_bound_vectors
(
cobrexa_
hit_and_run
_warmup_model
)),
worker
id
s
[
1
],
:
(
$
COBREXA
.
get_bound_vectors
(
cobrexa_
sampling
_warmup_
opt
model
)),
)
# free the data on workers
map
(
fetch
,
remove_from
.
(
workers
,
:
cobrexa_
hit_and_run
_warmup_model
))
map
(
fetch
,
remove_from
.
(
worker
id
s
,
:
cobrexa_
sampling
_warmup_
opt
model
))
return
fluxes
,
lbs
,
ubs
end
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