-
Notifications
You must be signed in to change notification settings - Fork 55
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
check for systems pre-configured to use OpenMP #294
Conversation
@@ -1,6 +1,8 @@ | |||
.Rproj.user | |||
.Rhistory | |||
.RData | |||
inst/include/RcppArmadilloConfigGenerated.h |
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.
Because these are generated by their corresponding .in
files, I think we can just .gitignore
them.
can_use_openmp="no" | ||
|
||
## Check if R is configured to compile programs using OpenMP out-of-the-box. | ||
AC_MSG_CHECKING([whether R can compile programs using OpenMP already]) |
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.
That trailing 'already' looks a little wooden, I may reword that 'eventually',
## Use R to set CXX and CXXFLAGS | ||
R=${R_HOME}/bin/R |
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.
One can do this, and then use R
as below, I found it helpful to to keep the longer ${R_HOME}/bin/R
to remind myself of the many time KH had to remind me to not use use R
from the path. So weak personal preference for the longer form.
It also leaves three files around, we may want to remove those straight from In other words, for me |
Closes #290.
With this PR,
RcppArmadillo
should enable OpenMP if it detects that OpenMP appears to work "out of the box", without any extra flags. Output on my machine:This PR works by just calling
R CMD SHLIB
on a C++ script using OpenMP. If we can compile and link that file directly, then we can skip the other OpenMP checks.