Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniformReal : Access violation reading location 0xFFFFFFFFFFFFFFFF with a specific congifuration #29

Open
izsahara opened this issue Sep 2, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@izsahara
Copy link

izsahara commented Sep 2, 2021

Hi so the error occurs in GenericPacketMath.h here (line 452) (In Eigen)

/** \internal copy the packet \a from to \a *to, (un-aligned store) */
template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline void pstoreu(Scalar* to, const Packet& from)
{  (*to) = from; }

The code I ran is this, and the error occurs when debugging the line where i define my X variable

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> CMatrix;
using Eigen::Rand::Vmt19937_64;
using Eigen::Rand::uniformReal;
Vmt19937_64 gen_eigen;
CMatrix X = uniformReal<CMatrix>(5, 3, gen_eigen);

Any ideas?

Edit:
These work.

CMatrix X1 = uniformReal<CMatrix>(2, 3, gen_eigen);
CMatrix X1 = uniformReal<CMatrix>(5, 2, gen_eigen);
CMatrix X2 = uniformReal<CMatrix>(100, 2, gen_eigen);
CMatrix X3 = uniformReal<CMatrix>(100, 3, gen_eigen);
CMatrix X4 = uniformReal<CMatrix>(100, 10, gen_eigen);

Is there something wrong with the specific configuration of 5 rows and 3 columns?

Im using:
Eigen 3.3.9 specifically (https://gitlab.com/libeigen/eigen/-/tree/5f25bcf7d6918f5c6091fb4e961e5607e13b7324)

@izsahara izsahara changed the title Access violation reading location 0xFFFFFFFFFFFFFFFF uniformReal : Access violation reading location 0xFFFFFFFFFFFFFFFF with a specific congifuration Sep 2, 2021
@bab2min bab2min added the bug Something isn't working label Sep 4, 2021
@bab2min
Copy link
Owner

bab2min commented Sep 4, 2021

Hi @izsahara
It seems to be related to vectorization.
Could you share your CPU and build information including compile options?
It will be very helpful to reproduce this error.

@izsahara
Copy link
Author

izsahara commented Sep 5, 2021

MS Windows 10 Version 10.0.19042 Build 19042 (CPU: Processor Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, 3401 Mhz, 4 Core(s), 8 Logical Processor(s))

Used Visual Studio 2019 for this (Configuration: Debug x64),

// tests.cpp
#include <iostream>
#include <Eigen/Dense>
#include <EigenRand/EigenRand>

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> CMatrix;
using Eigen::Rand::Vmt19937_64;
using Eigen::Rand::uniformReal;

int main()
{
    Vmt19937_64 gen_eigen;
    CMatrix X = uniformReal<CMatrix>(5, 3, gen_eigen);
}

Compiler : (MSVC) Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x86
Compiler Args (as obtained from VS build info)

/c /I"E:\User\Module\include\Eigen" /I"E:\User\Module\include\EigenRand" /ZI /JMC /nologo /W3 /WX- /diagnostics:column /sdl /Od /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\\" /Fd"x64\Debug\vc142.pdb" /external:W3 /Gd /TP /FC /errorReport:prompt tests.cpp

@bab2min
Copy link
Owner

bab2min commented Sep 5, 2021

@izsahara Thank you for sharing details.
I tried to reproduce it, but it failed. The code you shared is working well in AMD Ryzen7 3700X. Maybe it's from difference of hardware.
So, would you mind if I ask to share your debug x64 binary(.exe) or a full stack trace for Access violation reading location 0xFFFFFFFFFFFFFFFF?

@izsahara
Copy link
Author

Hi, sorry for such a late response, I apologize for my inability to complete your request. If you could show me some steps or point me to an article that would help me with your request Id be happy to help,
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants