Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature/openmp off on macos #170
Conversation
|
FYI, it works on my macOS(10.12.6). |
|
Thanks, @binxiangni. That makes it 2:0. Are you running the same version as @coatless, assuming the newest (ElCapitan, if I have that right). |
|
10.12.6 is Sierra, the newest system. |
|
@eddelbuettel: the macOS version of R is built on El Capitan. As I'm on Sierra, |
|
Will RcppArmadillo support OpenMP on macOS again in the future? I followed @coatless' directions for making R & OpenMP play nice, but RcppArmadillo still has OpenMP turned off. I'm running macOS 10.12 & R 3.4.1. A related question. Will all R packages that depend on the Rcpp suite be lacking OpenMP support on macOS for the time being, or would that only be the case sometimes? Please excuse my lack of knowledge with regards to Rcpp and RcppArmadillo. |
|
@danfulop: This is only the case for RcppArmadillo. Using OpenMP on macOS with Rcpp is possible via You can manually regain OpenMP by modifying the local install of RcppArmadillo's |
|
Would it not be better if the |
|
Yes, of course it would be. In an ideal world R would do this reliably for us as it does for most other things on most platforms. @coatless and I looked into this repeatedly, but it still difficult to impossible given the current setup particularly on macOS. While things work pretty well on Linux, it is a sadder story on macOS. |
|
@yaccos I've recently looked into this again except using OpenMP detection routine used by c.f. Results can be found here: coatless@3f1aed6#diff-67e997bcfdac55191033d57a16d1408a Notice we still fall victim to not detecting OpenMP using the devtools::install_github('coatless/rcpparmadillo', ref = 'feature/macos-openmp-detection')
|
|
@eddelbuettel - What about a check based on apple_compiler=$($CXX --version 2>&1 | grep -i -c -e 'apple llvm')Works well on my macOS system. |
|
Actually, @eddelbuettel the use of the |
|
@kthohr That line we could do. But ... then what? @coatless has been trying to get me to make this better for years now yet it seems that a combination of moving targets and incomplete support on the R / macOS side do not allow it. Now, I would be all for an opt-in solution for macOS power users. Maybe you guys can set an env var, or some other handshake, and then RcppArmadillo checks and sets things up. I just fear that "normal" macOS users just want something to work... |
|
@eddelbuettel A little spaghetti code :-) See line 65 onwards: https://github.com/kthohr/RcppArmadillo/blob/macOS-openMP/configure.ac I then modified the existing macOS check (line 135 in that file). I've tested this using regular (Apple) clang++, and clang 6.0 and gcc 7.0 from MacPorts. |
|
Sure - if @coatless could provide any feedback using his build (i.e., clang4), that would be great |
|
I volunteer as an additional Mac tester |
|
@danfulop - Can you try to install using: devtools:::install_github("kthohr/RcppArmadillo",ref="macOS-openMP") |
|
it worked perfectly! |
|
It also worked on my side(macOS 10.13.4) |
|
Works for me too (macOS 10.13.4 and clang version 5.0.1). Does someone know if there are other R packages which could need the same fix? Life with macOS and openmp would be a lot easier if the default apple llvm supported openmp. |
|
@coatless and I discussed this a little. In principle, all this is fine, and I can probably be persuaded to use the @kthohr patch. I won't be able to test it though. And one general issue that with the 450+ reverse depends we have some responsibility to CRAN to no change this too much / require too many uploads. But we can certainly think about folding improvements in at the so-far bi-monthly cycle. |
|
I'll move this to a new PR. |
@kevinushey : @coatless already test drove this and said it worked on his macOS box. Could you possibly give it a spin too, maybe even on two different macOS variants (hoping / thinking you may have access to more than one).