Git Product home page Git Product logo

Comments (21)

yixuan avatar yixuan commented on June 5, 2024 2

Hi everyone, now I can confirm that this issue CAN be reproduced when -O3 is defined AND -DNDEBUG is NOT defined in the compilation flag.

from rcppeigen.

aadler avatar aadler commented on June 5, 2024 2

Lurking here, but core R for Windows (which mainly means recommended packages) overwrites -O3 with -O2 for C++ (lines 74 and 77 of R_HOME/src/gnuwin32/fixed/etc/Makeconf) and has done so for a very long timeβ€”not just for the gcc 4.9.3 based Rtools. As there may be other package issues with -O3, would suggesting -O2 for the time being be appropriate?

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024 2

And I just got email from Uwe (or rather his bot) that a new RcppEigen has been built.

from rcppeigen.

f-rousset avatar f-rousset commented on June 5, 2024 1

I have now had an exchange with Uwe Ligges about the compilation flags on win-builder and his latest response can be summarized as "ARGH!". We can expect that they will be fixed back to the expected -DNDEBUG and -O2.

from rcppeigen.

yixuan avatar yixuan commented on June 5, 2024 1

Great! Thank everyone who provided help.

from rcppeigen.

dcdillon avatar dcdillon commented on June 5, 2024

I must be an idiot but have browsed all the docs for this issue and I can't find a usable error message. Can someone clarify what the error message actually is?

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

If you follow the first link in the email by Francois Rousset you get to the CRAN tests results for Eigen which flashes a bright red for Windows and this link. Now that's of course just R CMD check and once again not the actual error.

Which we still need to reproduce.

from rcppeigen.

dcdillon avatar dcdillon commented on June 5, 2024

Gotcha. Thanks
On May 22, 2016 3:13 PM, "Dirk Eddelbuettel" [email protected]
wrote:

If you follow the first link in the email by Francois Rousset you get to
the CRAN tests results for Eigen which flashes a bright red for Windows and this
link
https://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/RcppEigen-00check.html.
Now that's of course just R CMD check and once again not the actual
error.

Which we still need to reproduce.

β€”
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#34 (comment)

from rcppeigen.

kevinushey avatar kevinushey commented on June 5, 2024

FWIW, I can't reproduce the R CMD check failure on my Windows machine (32bit R, using R-patched 3.3.0, r70654; dev version of RcppEigen) :-/

> sessionInfo()
R version 3.3.0 Patched (2016-05-20 r70654)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

@yixuan you are very, very impressive.

Now where do we go from here? I vaguely recall that -DNDEBUG was recommended already. Behaviour that varies with/without certain optimization flags is more commonly compiler-related.

from rcppeigen.

kevinushey avatar kevinushey commented on June 5, 2024

Here's the (mostly unhelpful) output from WinDbg:

(2e40.2550): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Users\kevin\R\win-library\3.3\RcppEigen\libs\i386\RcppEigen.dll - 
eax=2c28d000 ebx=70daf5ce ecx=6e2c28d0 edx=00000002 esi=000001ce edi=6e2c28d0
eip=6e2b5685 esp=0141b668 ebp=00000000 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246
RcppEigen!ZN5Eigen8internal11gebp_kernelIddiLi2ELi2ELb0ELb0EEclEPdiPKdS5_iiidiiiiS3_+0x275:
6e2b5685 dd00            fld     qword ptr [eax] ds:002b:2c28d000=????????????????
 # ChildEBP RetAddr  
WARNING: Stack unwind information not available. Following frames may be wrong.
00 00000000 00000000 RcppEigen!ZN5Eigen8internal11gebp_kernelIddiLi2ELi2ELb0ELb0EEclEPdiPKdS5_iiidiiiiS3_+0x275

The demangled name (in case someone wanted to dive in)

C:\Users\kevin>c++filt -n _ZN5Eigen8internal11gebp_kernelIddiLi2ELi2ELb0ELb0EEclEPdiPKdS5_iiidiiii
Eigen::internal::gebp_kernel<double, double, int, 2, 2, false, false>::operator()(double*, int, double const*, double const*, int, int, int, double, int, int, int, int)

IMHO the best solution is for us to just force -O2 for compilation.

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

I just got this email but it was probably tickled by someone else :)

Date: Mon, 23 May 2016 16:47:06 +0200                                                                                                                                                                               
From: [email protected]                                                                                                                                                                                      
To: [email protected]                                                                                                                                                                                                  
Cc: [email protected]                                                                                                                                                                                        
Subject: winbuilder: Package RcppEigen_666.3.2.8.1.tar.gz has been checked and built                                                                                                                                

Dear package maintainer,

this notification has been generated automatically.
Your package RcppEigen_666.3.2.8.1.tar.gz has been built (if working) and checked for Windows.
Please check the log files and (if working) the binary package at:
http://win-builder.r-project.org/QlY633B1xgv5
The files will be removed after roughly 72 hours.
Installation time in seconds: 61
Check time in seconds: 364
Status: 2 NOTEs
R Under development (unstable) (2016-05-23 r70656)

All the best,
Uwe Ligges
(CRAN maintainer of binary packages for Windows)

from rcppeigen.

f-rousset avatar f-rousset commented on June 5, 2024

Hi,

yes I submitted to win-builder RcppEigen_666.3.2.8.1.tar.gz, which is RcppEigen_0.3.2.8.1.tar.gz with -O2 and -DNDEBUG added in Makevars.win, to check whether it would pass the tests that the current version does not. I forgot to change the maintainer email address, so you can see that this works.

Thanks to everyone for caring about this issue.

F.

from rcppeigen.

kevinushey avatar kevinushey commented on June 5, 2024

Another option is to force -fno-omit-frame-pointer in Makevars.win as this seems to sidestep the compilation issue when -O3 and -UNDEBUG are both applied (perhaps it indirectly disables some optimization that is breaking here?)

from rcppeigen.

f-rousset avatar f-rousset commented on June 5, 2024

I just tried -fno-omit-frame-pointer on win-builder and it indeed works.

(For definiteness: I modified he RcppEigen``Makevars.win to contain

ifeq "${R_ARCH}" "/i386"
PKG_CXXFLAGS= -I../inst/include -fno-omit-frame-pointer
else
PKG_CXXFLAGS = -I../inst/include 
endif

)

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

You can add it unconditionally. It won't do harm for x86_64.

I can't quite recall where but we used it before methinks. Or maybe I just kept it around in ~/.R/Makevars.

from rcppeigen.

aadler avatar aadler commented on June 5, 2024

@f-rousset Have you tried -O2 without -DNDEBUG?

from rcppeigen.

f-rousset avatar f-rousset commented on June 5, 2024

@aadler -O2 without -DNDEBUG fails to pass the tests for RcppEigen. It fails in the same way as the current RcppEigen version, as far as the win-builder logs show.

from rcppeigen.

aadler avatar aadler commented on June 5, 2024

@f-rousset Thanks. For what it is worth, in the hidden machinations of R for windows (R_HOME/src/gnuwin32/fixed/etc/Makeconf, otherwise known as "Here Be Monsters") has "R_XTRA_CPPFLAGS = -I"$(R_HOME)/include" -DNDEBUG" on line 165.

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

Very nice -- thanks so much for reporting back and getting it settled upstream at winbuilder!

from rcppeigen.

eddelbuettel avatar eddelbuettel commented on June 5, 2024

And now got email from Uwe himself, so I think we can close this.

Kudos to @f-rousset for following this through.

from rcppeigen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.