Which Parallel Computing method to use for my software
Show older comments
hellow,
I wrote software in a serial way that performs the same sequence of actions a very large number of times until a solution is found.
Now I am interested in entering for the first time into the field of Parallel Computing to improve the runtime of the code, I read the tutorials in the documentation and could not figure out which method is best for me.
My algorithm works as follows: (RRT* algorithm )
In general, the method takes a random line from a matrix containing all of the data, executes operations on it, and generates a number of other lines from it.
Then, for each new row, a check is conducted to see if a similar row already exists in the matrix; if so, the row in the matrix is updated; if not, a new row is added to the matrix.
Following this sequence of procedures, a fresh random row from the matrix is chosen and the operations are carried out on it.
This is my algorithm's pseudo code:
% Data = matrix of data.
while(1)
row = Data(randi(n),:);
NewRows = MyFunction(row);
for NewRow in NewRows
if NewRow exists in Data
update spacific row in Data;
else
add NewRow to data;
end
end
end
I considered assigning a row from the matrix to each worker with the MyFnction(), the new rows that worker generates are passed to a client, who feeds them into the matrix as described.
Because break is used within MyFunction, I realized that spmd is not appropriate.
How should I go about doing what I've described? Or are there better ways to decrease running time?
I have Parallal computing toolbox...
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!