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

check if R CMD SHLIB can compile OpenMP directly #4374

Merged

Conversation

kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Apr 11, 2020

Part of #4348.

The intention here is that if the user has already modified src/Makevars such that OpenMP "just works", then that should be detected by explicitly validating that R CMD SHLIB can compile with OpenMP.

This allows data.table to compile using OpenMP for me when using the following Makevars:

CPPFLAGS     += -I/usr/local/opt/libomp/include -Xpreprocessor -fopenmp
LDFLAGS      += -L/usr/local/opt/libomp/lib -lomp

SHLIB_OPENMP_CFLAGS   =
SHLIB_OPENMP_CXXFLAGS =

Asking whether we can set those flags (or similar) in R 4.0.0 is a separate question, I think.

Copy link
Member

@jangorecki jangorecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank @kevinushey for this PR.
Works fine on my local Xubuntu.
GitLab pipeline (unfortunately we don't have Mac build there yet #3326) revealed that clean up is not working good enough:

* checking if this is a source package ... NOTE
 Found the following apparent object files/libraries:
   test-omp.o
 Object files/libraries should not be included in a source package.

* checking top-level files ... NOTE
 Non-standard file/directory found at top level:
   ‘test-omp.o’

@mattdowle could you please invite Kevin to our members group, so he can push directly to Rdatatable/data.table branches?

@codecov
Copy link

codecov bot commented Apr 12, 2020

Codecov Report

Merging #4374 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4374   +/-   ##
=======================================
  Coverage   99.61%   99.61%           
=======================================
  Files          73       73           
  Lines       14104    14104           
=======================================
  Hits        14049    14049           
  Misses         55       55           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc5e11a...3c28fa7. Read the comment docs.

@mattdowle
Copy link
Member

Thanks, @kevinushey! As Jan suggested, I've invited you to be project member, and will add you to contributors list.

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

Successfully merging this pull request may close these issues.

None yet

4 participants