renozao / NMF

NMF: A Flexible R package for Nonnegative Matrix Factorization
137 stars 41 forks source link

NMF in parallel mode runs only in two cores. #188

Open lincj1994 opened 1 month ago

lincj1994 commented 1 month ago

Hi @renozao @khughitt .

I ran NMF in parallel mode by setting .options = 'v2p8' in the Ubuntu terminal using R. However, it seems that NMF only uses 2 cores, regardless of the value I assign to p. Has anyone experienced this or know how to make better use of available cores?

Thanks!

> nmf_res = nmf(df, rank = 5:20, method = 'snmf/l', seed = 123, nrun = 100, .options = 'v2p8')
Compute NMF rank= 5  ... NMF algorithm: 'snmf/l'
Multiple runs: 100
# Setting up requested `foreach` environment: try-parallel [par]
# Check host compatibility ... OK
# Registering backend `doParallel` ... OK
# Setting up RNG ... OK
# Using foreach backend: doParallelMC [version 1.0.17]
Mode: parallel (2/16 core(s))
# Check shared memory capability ... NO
SAADAT-Abu commented 1 month ago

HI.

I am facing the same problem. Additionally, if you observe it is not using your seed but a random seed which is also happening to me when I am trying to run "nmfEstimateRank".