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

1 visualizzazione (ultimi 30 giorni)
Shaily_T il 5 Giu 2022
Commentato: Shaily_T il 6 Giu 2022
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?
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Walter Roberson il 5 Giu 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 CommentoMostra NessunoNascondi Nessuno
Shaily_T il 6 Giu 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?

Accedi per commentare.

### Categorie

Scopri di più su Gaussian Mixture Models in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by