roldao
Newbie level 4
how to run two matlab function same time
Hello Everyone.
I´m computing a FDTD simulator to study the radio channel characteristics using power delay profile. I use a scenario 2550px x 2550px and I need more than 2 hours to have some kind of results. I´m reading about parallel computing with parallel computing toolbox and I tried some stuff...without good results...
Tried to use spmd with drange-for inside some functions, because I have a function that is the more important in the all simulator, that have a for inside other for (3 times separately) and I did some thing like this:
function .....
(same procedure for the 3 cases)
%case 1
spmd
drange-for
drange-for
%function body with array operations
end
end
end
with this solution my simulation became slower. I think that is because spmd replicated this exactly same code for the 4 workers that I create with the matlabpool.
Then I tried to use codistributor arrays with the same solution said before...nothing...
I think that I need a solution please... to use just one computer with multi-core.
What I exactly need is a solution that permit different function be computed at same time with no replicated code and that workin parallel for example like.
%main file
function1 -> worker 1
function2 -> worker 2
function3 -> worker 3
running at same time.
Or for example the first situation described with the for stuff but like:
%worker 1
for
for
end
end
%worker 2
for
for
end
end
%worker 3
for
for
end
end
Which will working in parallel and the simulator, I suppose that become quicker....
I appreciate help.
Thank you very much
Joao Roldao
Hello Everyone.
I´m computing a FDTD simulator to study the radio channel characteristics using power delay profile. I use a scenario 2550px x 2550px and I need more than 2 hours to have some kind of results. I´m reading about parallel computing with parallel computing toolbox and I tried some stuff...without good results...
Tried to use spmd with drange-for inside some functions, because I have a function that is the more important in the all simulator, that have a for inside other for (3 times separately) and I did some thing like this:
function .....
(same procedure for the 3 cases)
%case 1
spmd
drange-for
drange-for
%function body with array operations
end
end
end
with this solution my simulation became slower. I think that is because spmd replicated this exactly same code for the 4 workers that I create with the matlabpool.
Then I tried to use codistributor arrays with the same solution said before...nothing...
I think that I need a solution please... to use just one computer with multi-core.
What I exactly need is a solution that permit different function be computed at same time with no replicated code and that workin parallel for example like.
%main file
function1 -> worker 1
function2 -> worker 2
function3 -> worker 3
running at same time.
Or for example the first situation described with the for stuff but like:
%worker 1
for
for
end
end
%worker 2
for
for
end
end
%worker 3
for
for
end
end
Which will working in parallel and the simulator, I suppose that become quicker....
I appreciate help.
Thank you very much
Joao Roldao