parallelizing optimization tasks for functions evaluated by external devices
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I need to optimize two functions of different variables, let's call them F1(X1) and F2(X2), using GA algorithm. The functions are evaluated on an external device which allows for parallelization: you pass two variable sets {X1,X2} and get back two scalars {F1,F2} in just one step. A single step takes long time, so I am forced to do evaluations in parallel. I am trying to use Parallel Comp. Toolbox construct 'spmd' and having difficulty synchronizing function evaluations in the two labs running two different GA sessions. I had an idea to use 'gcat(X)' command to consolidate arguments {X1,X2} from different labs in order to pass them to external HW, but I don't know how to access arguments of GA and how to synchronize function calls from different labs. Any help ?? - Thank you.
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de Oct. de 2011
labSend() and labReceive() and labBarrier() perhaps?
3 comentarios
Walter Roberson
el 11 de Oct. de 2011
spmd a chunk of code. The first thing the chunk of code checks is labindex. If it is 0, then make that invocation the mediator. Otherwise (other labs), call GA with a function handle, and in the function so designated, extract the current arguments and labSend them to lab 0, then labReceive to wait for the processed reply, and continue with the GA.
Más respuestas (1)
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!