Repository navigation
check for systems pre-configured to use OpenMP - #294
Merged
Merged
Conversation
kevinushey
commented
May 5, 2020
| .Rproj.user | ||
| .Rhistory | ||
| .RData | ||
| inst/include/RcppArmadilloConfigGenerated.h |
Contributor
Author
There was a problem hiding this comment.
Because these are generated by their corresponding .in files, I think we can just .gitignore them.
eddelbuettel
reviewed
May 5, 2020
| 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]) |
Member
There was a problem hiding this comment.
That trailing 'already' looks a little wooden, I may reword that 'eventually',
eddelbuettel
approved these changes
May 5, 2020
eddelbuettel
reviewed
May 5, 2020
| fi | ||
|
|
||
| ## Use R to set CXX and CXXFLAGS | ||
| R=${R_HOME}/bin/R |
Member
There was a problem hiding this comment.
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.
Member
|
It also leaves three files around, we may want to remove those straight from In other words, for me |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #290.
With this PR,
RcppArmadilloshould 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 SHLIBon a C++ script using OpenMP. If we can compile and link that file directly, then we can skip the other OpenMP checks.