-
Notifications
You must be signed in to change notification settings - Fork 56
Disable OpenMP on macOS + Vignette Fix #168
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
Changes from all commits
22ae851
be50006
6921ff5
7272da3
4627019
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.DS_Store | ||
src/*.o | ||
src/*.so | ||
src/*.dll |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,6 @@ License: GPL (>= 2) | |
LazyLoad: yes | ||
LinkingTo: Rcpp | ||
Imports: Rcpp (>= 0.11.0), stats, utils, methods | ||
Suggests: RUnit, Matrix, pkgKitten, reticulate | ||
Suggests: RUnit, Matrix, pkgKitten, reticulate, highlight | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is you deciding you need to throw this in. As I said yesterday, it does not throw a warning or note for me when checking, nor did CRAN comment on it. As such it is not clearly needed. It surely does not belong into a hotfix-PR about OpenMP. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to address the build error happening on Ripley's machine. When we discussed this, the conclusion was to add it alongside of the OpenMP fix to save a PR. I guess the slogan should be:
😆 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I doubt that. When we talked about the BDR failure we concluded it was a segfault neither one of us understood or was able to replicate. In any event, the two commits were right and good, and I took it as opportunity to learn some more magit and cherry-picked them into a distinct PR which by now is in master. So the vignette issue is taken care of. Leaves
|
||
URL: http://dirk.eddelbuettel.com/code/rcpp.armadillo.html | ||
BugReports: https://github.com/RcppCore/RcppArmadillo/issues |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,11 +19,11 @@ inlineCxxPlugin <- function(...) { | |
plugin <- | ||
Rcpp::Rcpp.plugin.maker( | ||
include.before = "#include <RcppArmadillo.h>", | ||
libs = "$(SHLIB_OPENMP_CFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)", | ||
libs = "@HAVE_OPENMP_R_CFLAG@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making this a package configure-time check doesn't feel right to me, IMHO. This implies that a package built on CRAN might detect OpenMP support, and that assumption will remain in place when the Rcpp binary is later served to the user. However, that assumption will fail if the user has not installed the CRAN LLVM toolchain. I would prefer that we just checked this at runtime, rather than configure time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but how do you suggest we go about it? I started down the road of 'grep'ing CXXFLAGS and looking for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No matter what, we do need a compile time check to set the My only thought to that line of detection is the possibility of checking for the directory existence of |
||
package = "RcppArmadillo" | ||
) | ||
settings <- plugin() | ||
settings$env$PKG_CPPFLAGS <- "-I../inst/include $(SHLIB_OPENMP_CXXFLAGS)" | ||
settings$env$PKG_CPPFLAGS <- "-I../inst/include @HAVE_OPENMP_R_CXXFLAG@" | ||
settings | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comingles unrelated issues.
All Suggests are skipped by default. This worked (for me) for years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, wait, maybe this is different as we didn't use highlight before -- because we also forgot it as vignette engine.