Skip to content

Commit 0b3b4b7

Browse files
committed
Added write_to_file function
1 parent 1b2f875 commit 0b3b4b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/distributed/optigraph.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,4 +944,13 @@ function MOI.Utilities.drop_optimizer(rgraph::RemoteOptiGraph)
944944
MOI.Utilities.drop_optimizer(lgraph)
945945
end
946946
return fetch(f)
947+
end
948+
949+
function JuMP.write_to_file(rgraph::RemoteOptiGraph, filename::String)
950+
darray = rgraph.graph
951+
952+
f = @spawnat graph.worker begin
953+
lgraph = Plasmo.local_graph(darray)
954+
JuMP.write_to_file(lgraph, filename)
955+
end
947956
end

0 commit comments

Comments
 (0)