Created
March 20, 2017 17:37
-
-
Save mratsim/51d269490fd676d282815bb2641a1993 to your computer and use it in GitHub Desktop.
~/.R/Makevars to compile R package with OpenMP and all compiler optimizations
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
| # ~/.R/Makevars | |
| PKG_LIBS = -fopenmp -lgomp | |
| PKG_CFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native | |
| #-- Compiler and Linker Flags | |
| # -march (or -mcpu) builds exclusively for an architecture | |
| # -mtune optimizes for an architecture, but builds for whole processor family | |
| CPPFLAGS=-D_FORTIFY_SOURCE=2 | |
| CFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native | |
| CXXFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native | |
| LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro | |
| #-- Make Flags: change this for DistCC/SMP systems | |
| MAKEFLAGS=-j8 | |
| #-- Debugging flags | |
| DEBUG_CFLAGS=-g -fvar-tracking-assignments | |
| DEBUG_CXXFLAGS=-g -fvar-tracking-assignments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment