Rank: 334727 based on 0 downloads (last 30 days) and 0 file submitted



Personal Profile:


Watch this Author's files


Comments and Ratings by Mohsen View all
Updated File Comments Rating
13 Jun 2013 Worker Object Wrapper Simplifies managing resources such as large data within PARFOR loops and SPMD blocks Author: Parallel Computing Team

Thanks for the nice file!

However, I have tried to use it in my code in the following way and it resulted in an increase of the simulation running time compared to the non-parallelized version of the code.

I am dealing with large arrays and data files and have to calculate some statistics for a very large number of different cases.

In the initial non-parallelized version of my code, I calculate the statistics for case 1 to case 10^7 inside a for loop.

Non-parallelized Code:

... "read many files"
... "generate large arrays"

for i:1=10^7
... "Calculate statistics"

... "Write statistics in a text file"

In the parallelized version of the code, I use a PARFOR loop. However, I cannot have all the codes to calculate the statistics directly inside the PARFOR loop due to Matlab restrictions and errors. So, I had to create a new function called STAT and copy all the codes to calculate the statistics in this function.

Parallelized Code:

... "read many files"
... "generate large arrays"


parfor i:1=10^7

STAT(w1.Value, w2.Value, w3.Value, arg1, arg2, arg3, arg4);
..."slice STAT"


... "Write statistics in a text file"

The problem with my parallelized version of the code is that it takes much longer than the non-parallelized version. Inside the PARFOR loop, I have to call a function (STAT) and pass many large arrays (w1.Value) at each iteration.

Does anyone know what is the best way to optimize/parallelize this code?

Many thanks!

19 Jul 2011 Attractors Nonlinear systems generating attractors. Author: Giampiero Campa


I am modelling population growth using Lotka-Volterra competitive equations (not the predatory - prey ones).

Did you use these equations in a model as well?

Contact us