-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OptiNode Parallel Processing #132
Comments
Hi @SolidAhmad, good questions. @jalving may also have some feedback, but here are some initial considerations:
node_membership_vector = [i for i in 1:length(num_nodes(g))]
partition = Plasmo.Partition(g, node_membership_vector)
apply_partition!(g, partition) Note that you will have to set the subgraph objectives to use the node objectives by calling
sgs = local_subgraphs(graph)
Threads.@threads for i in 1:length(sgs)
optimize!(sgs[i]
end However, you should know that Plasmo does not yet support distributing memory, so this approach does not yield benefits to memory usage. It can potentially speedup your overall solve time though if you have multiple threads available.
Does that help? |
@dlcole3 This is extremely helpful;I appreciate the time you took to address my question comprehensively. As you suggested, I will look at your sources and attempt to formulate my problem in subgraphs rather than nodes. I guess one follow-up question I have is, what do you see as a major limitation in facilitating a distributed memory framework for this approach? |
Distributing memory requires use of some other packages that need to be incorporated on top of Plasmo. Ideally, each subgraph in Plasmo could be distributed to a different processor, but this would require some changes to the existing OptiGraph abstraction. I think this would require a nontrivial extension to Plasmo.jl, but I think this is very possible to do. |
I am exploring Plasmo.jl as a potential tool for tackling a large MILP problem that I've decomposed into 144 OptiNodes. Each OptiNode subproblem is substantial in size, and I’m interested in understanding whether the problem could be solved efficiently by leveraging multiple physical cores (potentially across several compute nodes) to solve each OptiNode using HiGHS.
Does Plasmo.jl currently support such a setup directly? If not, what would be the best approach to implement this workflow? Additionally, does this approach align with the intended design of Plasmo.jl, and are there any nuances or considerations I should be aware of? I’d appreciate any feedback or guidance to ensure I’m on the right track.
The text was updated successfully, but these errors were encountered: