[R-SIG-Win] An update on the windows toolchain developments

Avraham Adler avraham.adler at gmail.com
Mon Aug 31 15:48:51 CEST 2015


On Mon, Aug 31, 2015 at 9:22 AM, Avraham Adler <avraham.adler at gmail.com> wrote:
> Hello, Jeroen.
>
> Regarding the Rf_error, does the issue still exist in v4 of GCC 4.9.2
> and is a regression in 4.9.3, or has it never been solved in 4.9.2
> either?
>
> Regarding the Rcpp error, wouldn't throwing no-sse also prevents the
> use of almost all vecotrizations (sse2-4.1 and avx/avx2), slowing
> results down noticeably?
>
>
> Avi
>
> On Mon, Aug 31, 2015 at 9:14 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote:
>> A new version of the toolchain based on gcc 4.9.3 and corresponding
>> build of R-devel are available from [1]. See the readme.txt [2] for
>> details. The installer should work out of the box and make it easy for
>> Windows users to compile and test R packages with the new toolchain.
>>
>> The bad news: unfortunately it appears that the sjlj problem on win64
>> (triggered by Rf_error) is still not completely solved in the latest
>> mingw-w64. Therefore I restored -fno-asynchronous-unwind-tables in
>> CXXFLAGS in the latest build of R. This workaround allows us to move
>> forward while we investigate this problem.
>>
>> Even with -fno-asynchronous-unwind-tables there are still two Rcpp
>> unit tests that crash on win64: test.Module.member and
>> test.Module.property. These tests segfault when an exception is raised
>> within a module. The problem still exists in the latest Rcpp version
>> from Github. It is unclear if this is related to the sjlj bug above,
>> or a separate problem in Rcpp / R-devel. The issue can be worked
>> around by changing Rcpp's Makevars.win to:
>>
>>    PKG_CXXFLAGS=-mno-sse
>>
>> With this fix, Rcpp is able to execute all unit tests on both win32
>> and win64. All tests pass, except for an issue with dates (also only
>> on win64) that is reported at [3].
>>
>> [1] http://www.stat.ucla.edu/~jeroen/mingw-w64/
>> [2] http://www.stat.ucla.edu/~jeroen/mingw-w64/readme.txt
>> [3] https://github.com/RcppCore/Rcpp/issues/359
>>
>> _______________________________________________
>> R-SIG-windows mailing list
>> R-SIG-windows at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-windows


Is this error [1] dependent on using RToolsTest (for which I get
package ‘RToolTest’ is not available (for R version 3.2.2 Patched) )?

In my test compilation of R and Rcpp using the 4.9.2 toolchain, given:

#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
SEXP ctor_mdy() {
  Date dt = Date(12,31,2005);
  return wrap(dt);
}

// [[Rcpp::export]]
SEXP ctor_ymd() {
  Date dt = Date(2005,12,31);
  return wrap(dt);
}

I get

> ctor_mdy()
[1] "2005-12-31"
> ctor_ymd()
[1] "2005-12-31"

If it matters, EOPTS in MkRules.local were -march=ivybridge
-mtune=ivybridge --param l1-cache-line-size=64 --param
l1-cache-size=32 --param l2-cache-size=256 -pipe

.R/Makevars CXXFLAGS= -std=gnu++11 -O2 -march=ivybridge
-mtune=ivybridge --param l1-cache-line-size=64 --param
l1-cache-size=32 --param l2-cache-size=256 -pipe


Thank you,

Avi


[1] https://github.com/RcppCore/Rcpp/issues/359



More information about the R-SIG-windows mailing list