Borrar filtros
Borrar filtros

What is the number of cores that my fit code uses for running and the efficiency of running it on a cluster?

2 visualizaciones (últimos 30 días)
I have a matlab code for fitting a custom model to a series of data. The actual number of data I have is about 600000. I can run the code for a selection of the data (6000 points) and it works fine. But I need to know the answer for the actual data size and when I run the fit code it takes a long time on my laptop for running and it doesn't get to work. I am wondering how can I undrestand how many cores of my laptop are used when the code is running? My laptop has 4 physical cores and when I run Matlab code the Activity Monitor on my MAC says 100% for CPU usage.
I am thinking of runnig my code on a cluster but if in the current laptop it is not using all the available cores I don't think runnig it on a cluster would be helpful. The algorithm of my fit code is not something that I can write it as a suitable format for parallel computing.
Do you have any thoughts?
Thank you inadvance!

Respuestas (1)

Walter Roberson
Walter Roberson el 5 de Jun. de 2022
All of your cores are probably being used. The calculations to go from x and proposed model parameters to residues, are typically vectorized. But it depends on the details of the model calculations.
Also, increasing the number of cores too high can reduce performance, due to the increase in communications overhead. Parallel processing with groups of about 6 to 8 cores per worker can sometimes be more effective.
  1 comentario
Shaily_T
Shaily_T el 6 de Jun. de 2022
Thanks for your response! Can we parallelize a fit code if our fit type function value depends on the value of the other points? I think in my code, parallelization is not possible. Could you please elaborate more on "Parallel processing with groups of about 6 to 8 cores per worker can sometimes be more effective."?
If my code can not be parallelized, is there a way to speed up running? Does running it on a cluster and increasing the number of cores make it faster?

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Parallel Server 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!

Translated by