CristianCastiglione / sgdGMF

Efficient stochastic gradient descent algorithms for the estimation of generalized matrix factorization models in R.
MIT License
7 stars 0 forks source link

Compile without OpenMP? #1

Open pfh opened 2 weeks ago

pfh commented 2 weeks ago

Hello! I was very excited to hear Davide Risso talk about this package at ABACBS, since it is exactly something I have been hoping someone would create. I especially appreciate the ability to supply a weights matrix, as I have data for which this is needed.

I ran into a problem compiling the package on my M1 MacBook, with errors from not being able to #include <omp.h>. I have so far not been able to work out how to install OpenMP in a way R will recognize.

Surrounding the OpenMP code with #ifdef _OPENMP ... #endif allowed me to compile the package and build the vignettes. Could this be added? There was one #include <omp.h> and the two calls to omp_set_num_threads(threads); that needed this.

CristianCastiglione commented 2 weeks ago

Hello! Thank you for your feedback and suggestions.

We will handle installation excluding OpenMP as soon as possible.

I just want to point out that the offset and weight parameters are visible in the R interface but they are not implemented yet in the C++ code. However, we are working to introduce these features. Hopefully, they will be available in a few days.