Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submitting R package that use OpenMP

Tags:

c++

r

openmp

I tried to submit R package which support OpenMP (This package can be compiled in Linux if openmp is available).

I have got this error when I checked may package.

checking compilation flags in Makevars ... WARNING Non-portable flags in variable ‘PKG_CXXFLAGS’: -fopenmp

How can I suppress this error and submit it to the CRAN.

like image 400
user1436187 Avatar asked Dec 26 '22 18:12

user1436187


1 Answers

From the R Extensions Manual, you need:

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)

See here for a recent R-help post with example CRAN packages and more information.

like image 121
Kevin Ushey Avatar answered Dec 28 '22 10:12

Kevin Ushey