Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install in macOS Mojave with OpenMP support #17

Closed
alazarolop opened this issue Jul 30, 2019 · 7 comments
Closed

Can't install in macOS Mojave with OpenMP support #17

alazarolop opened this issue Jul 30, 2019 · 7 comments
Labels

Comments

@alazarolop
Copy link

alazarolop commented Jul 30, 2019

Hi,

I'm running macOS Mojave 10.14.5 and R 3.6.0 and I was able to install ClusterR without any issue, but when I tried to run any of the functions with multi-threads, it didn't work.

So I tried to fix it following indications in this link (https://stackoverflow.com/questions/40904488/openmp-r-and-macos). I had libomp installed using homebrew, so I just created ~.R/Makevars file with:

SHLIB_OPENMP_CFLAGS=-Xpreprocessor -fopenmp
SHLIB_OPENMP_CXXFLAGS=-Xpreprocessor -fopenmp

After that and while trying to install ClusterR again, I get this error:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘ClusterR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/3.6/site-library/00LOCK-ClusterR/00new/ClusterR/libs/ClusterR.so':
  dlopen(/usr/local/lib/R/3.6/site-library/00LOCK-ClusterR/00new/ClusterR/libs/ClusterR.so, 6): Symbol not found: ___kmpc_for_static_fini
  Referenced from: /usr/local/lib/R/3.6/site-library/00LOCK-ClusterR/00new/ClusterR/libs/ClusterR.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.6/site-library/00LOCK-ClusterR/00new/ClusterR/libs/ClusterR.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.6/site-library/ClusterR’
Warning in install.packages :
  installation of package ‘ClusterR’ had non-zero exit status

I also tried to follow the guide mention at the beginning of the link, but it didn't work too.

Is there anything I am missing? How could I fix it?
Thank you very much in advance.

@mlampros
Copy link
Owner

mlampros commented Jul 31, 2019

hi @alazarolop,

there was a similar issue regarding the installation of ClusterR on Macintosh with OpenMP enabled.
In the past I managed to use OpenMP on my Macintosh computer by following this tutorial, which was updated at 06/18/2017 ( highly probable there are more recent tutorials available on the web ) and is also mentioned in your web-link. I use an older version of Macintosh than Mojave and I'm not sure if currently OpenMP is enabled by default. I assume you want to avoid reconfiguring your personal computer and just enable OpenMP by adding the OPENMP flags in your ~.R/Makevars file.

@alazarolop
Copy link
Author

alazarolop commented Aug 5, 2019

Hi @mlampros, thanks for writing and sorry for the delay.

I've tried these days different indications, I'm getting the same outcome though .

Exactly, that's the point. I didn't want to install any other "clang" package manually and outside Homebrew as it's said in the guide. I reckon I will tray it step by step in a clean VM, so I can rule out and then I will write back.

@mlampros
Copy link
Owner

mlampros commented Aug 5, 2019

Hi @alazarolop,

if your intention is to find out if the ClusterR package fits your needs and you are familiar with docker, I can upload a dockerfile with Rstudio pre-installed so that you can build and run it on a linux instance where OpenMP is installed by default.

@alazarolop
Copy link
Author

Hi @mlampros , excuse me for my late answer. I didn't know about OpenMP where running in Linux by default, maybe I can give it a try then. The dockerfile would be very helpful.

Thank you for your concern.

@mlampros
Copy link
Owner

Hi @alazarolop,

I uploaded the Dockerfile and added details on how to build / run the docker image at the end of the README.md file. I tested it on Ubuntu 18.04.
Let me know if it works for you too.

@stale
Copy link

stale bot commented Aug 27, 2019

This is Robo-lampros because the Human-lampros is lazy. This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs. Feel free to re-open a closed issue and the Human-lampros will respond.

@stale stale bot added the stale label Aug 27, 2019
@stale stale bot closed this as completed Sep 3, 2019
@alazarolop
Copy link
Author

alazarolop commented Oct 17, 2019

@mlampros Sorry for my late response. I've finally got running ClusterR with OpenMP capability by using this guide. They key point was the gcc version I was using, so apparently one needs to manually create symlinks to Home-brew gcc in order to get it in working. Thank you for your help with the Dockerfile too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants