diff --git a/CRAN_Release.cmd b/CRAN_Release.cmd index 45eac55747..e268e202c7 100644 --- a/CRAN_Release.cmd +++ b/CRAN_Release.cmd @@ -166,14 +166,14 @@ tar xvf R-devel.tar.gz cd R-devel # Following R-exts#4.3.3 # (clang 3.6.0 works but gcc 4.9.2 fails in R's distance.c:256 error: ‘*.Lubsan_data0’ not specified in enclosing parallel) -./configure CC="clang-5.0 -fsanitize=undefined,address -fno-sanitize=float-divide-by-zero -fno-omit-frame-pointer" CFLAGS="-g -O0 -Wall -pedantic" --without-recommended-packages --disable-byte-compiled-packages +./configure CC="clang-5.0 -fsanitize=undefined,address -fno-sanitize=float-divide-by-zero -fno-omit-frame-pointer" CFLAGS="-g -Og -Wall -pedantic" --without-recommended-packages --disable-byte-compiled-packages make alias Rdevel='~/build/R-devel/bin/R --vanilla' Rdevel install.packages("bit64") # important to run tests using integer64 # Skip compatibility tests with other Suggests packages; unlikely UBSAN/ASAN problems there. q("no") -Rdevel CMD INSTALL ~/data.table_1.10.1.tar.gz +Rdevel CMD INSTALL data.table_1.10.5.tar.gz # Check UBSAN and ASAN flags appear in compiler output above. Rdevel was compiled with # them (above) so should be passed through to here Rdevel diff --git a/src/data.table.h b/src/data.table.h index 56e1ea5b79..441ac087c2 100644 --- a/src/data.table.h +++ b/src/data.table.h @@ -1,15 +1,10 @@ #include #define USE_RINTERNALS #include -#ifdef _OPENMP - #include -#else // so it still compiles on machines with compilers void of openmp support - #define omp_get_num_threads() 1 - #define omp_get_thread_num() 0 -#endif // #include // the debugging machinery + breakpoint aidee // raise(SIGINT); #include // for uint64_t rather than unsigned long long +#include "myomp.h" // data.table depends on R>=3.0.0 when R_xlen_t was introduced // Before R 3.0.0, RLEN used to be switched to R_len_t as R_xlen_t wasn't available. diff --git a/src/fread.h b/src/fread.h index d7a4f250a3..42279a9a86 100644 --- a/src/fread.h +++ b/src/fread.h @@ -3,15 +3,13 @@ #include // uint32_t #include // size_t #include // bool +#include "myomp.h" #ifdef DTPY - #include "myomp.h" #include "py_fread.h" #else - #include #include "freadR.h" #endif - // Ordered hierarchy of types typedef enum { NEG = -1, // dummy to force signed type; sign bit used for out-of-sample type bump management diff --git a/src/fwrite.c b/src/fwrite.c index 3715cb5ad5..24c075918b 100644 --- a/src/fwrite.c +++ b/src/fwrite.c @@ -17,7 +17,7 @@ #define WRITE write #define CLOSE close #endif -#include +#include "myomp.h" #include "fwrite.h" #define NUM_SF 15 diff --git a/src/myomp.h b/src/myomp.h new file mode 100644 index 0000000000..798d071e3c --- /dev/null +++ b/src/myomp.h @@ -0,0 +1,9 @@ +#ifdef _OPENMP + #include +#else + // for machines with compilers void of openmp support + #define omp_get_num_threads() 1 + #define omp_get_thread_num() 0 + #define omp_get_max_threads() 1 +#endif +