matlabparallel-processingsimulated-annealingspmd

Matlab Spmd Termination


I'm implementing a simulated annealing algorithm in matlab using spmd. I will compare different implentation types. One of them is asynchronous paralellism. 12 workers will run the code. if one of them meets the criteria(error<0.01) code will stop the search. Is there any command to do that? If I use labBroadcast or labsend/labreceive it will be synchronus.


Solution

  • I would start all 12 Processes using jobs. You can check if one of the already completed jobs matches your criteria, then cancel the other jobs.

    http://www.mathworks.com/help/distcomp/cancel.html http://www.mathworks.com/help/distcomp/create-simple-independent-jobs.html