"Unhandled exception at * Access violation at location *" Openblas

428 views
Skip to first unread message

XuFeng Lin

unread,
Aug 8, 2014, 5:25:48 PM8/8/14
to openbla...@googlegroups.com
Hi, all

I am using armadillo with openblas, but recently I encountered one problem:
"Unhandled exception at 0x0000000300905a4d in armaTest.exe: 0xC0000005: Access violation at location 0x0000000300905a4d."

The codes are very simple:
#include <armadillo>
using namespace arma;

int main()
{
fmat G(60, 60);
fmat R = G * G;
return 0;
}

I was working with vs2010 under win7 64-bit OS and I complied the above code in x64 configuration with OpenBLAS-v0.2.10-Win64-int32.zip, which was downloaded from http://sourceforge.net/projects/openblas/files/v0.2.10/ . It is weird that this problem only happens in the case of release mode and a little bit large matrix multiplication. When I switched to version OpenBLAS-v0.2.9.rc2-x86_64-Win, everything works fine! So I think this may be a bug in verison v0.2.10. Any thoughts on this?


Thanks,
Xufeng

Zhang Xianyi

unread,
Aug 9, 2014, 5:42:31 AM8/9/14
to XuFeng Lin, openbla...@googlegroups.com
Hi Xufeng,

Thank you for the feedback.
What's your CPU?

Xianyi



--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openblas-user...@googlegroups.com.
To post to this group, send email to openbla...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

XuFeng Lin

unread,
Aug 9, 2014, 1:33:07 PM8/9/14
to openbla...@googlegroups.com, lxf...@gmail.com
Hi, Xianyi

Thanks for your quick respond. My CUP is Inter(R) Core(TM) i5-3470 3.2GHz 4 cores. By setting OPENBLAS_NUM_THREADS = 1 does not solve the problem.

Cheers,
Xufeng

在 2014年8月9日星期六UTC+1上午10时42分31秒,Zhang Xianyi写道:

Zongying Gong

unread,
Aug 30, 2014, 8:21:38 AM8/30/14
to openbla...@googlegroups.com
Hi, all

   I encountered similar problem. I ran a simple test program ( C = A * B, all type mat) on Visual Studio 2013, windows 8.1 64 bit with 64int (Intel Core i7-4770).

   On debug mode x64 configuration, I got "on entry to dgemm parameter number 3 had an illegal value"
   On release mode x64 configuration, I got "Unhandled exception at 0x000000006ECD6890 (libopenblas.dll) in Oblas.exe: 0xC0000005: Access violation writing location 0x000004BD33668438."

   I've tried OpenBLAS version 0.2.10/0.2.11 win64 int64 and OpenBLAS-v0.2.9.rc2-x86_64-Win with armadillo 4.320.0. I got the same result.

   However, when I reduce the size of A and B to 6 x 6 or less, or change the type from mat to imat (Mat<double> to Mat<sword>), everything was fine.
  
   Hope this may help.

Zongying

Werner Saar

unread,
Aug 30, 2014, 10:15:10 AM8/30/14
to openbla...@googlegroups.com
Hi,

I think, there is mismatch of the types int, long and long long on Windows.

if you download the file OpenBLAS-v0.2.11-Win64-int32.zip, the sizes of
int and long are 32bit and you
should use long, when calling a fortran blas function.

But if you use OpenBLAS-v0.2.11-Win64-int64.zip, you have to use 64bit
for fortran integer parameters, on
Windows you have to use long long.

I hope, that this will help you

Best regards
Werner






Zongying Gong

unread,
Aug 30, 2014, 10:46:10 AM8/30/14
to openbla...@googlegroups.com
Hi Werner:

    Thank you for your reply. I'm using Visual Studio Express to compile and run C++ script. From my experience (may be I'm wrong), the problem lies in double and float numbers rather than int. Because with mat and fmat (Mat<double> and Mat<float>), the error persists.

    By the way, when I switch from OpenBLAS to x64 netlib BLAS library provided by armadillo, everything is fine.

Best regards
Zongying

Zongying Gong

unread,
Aug 31, 2014, 11:46:33 PM8/31/14
to openbla...@googlegroups.com
Hi Werner:

       Thank you for your tips. Problem solved. I uncommented  #define ARMA_BLAS_LONG and  #define ARMA_BLAS_LONG_LONG in config.h of armadillo. It's indeed the int problem with Windows.

Cheers

Zongying

On Saturday, August 30, 2014 10:15:10 PM UTC+8, Werner Saar wrote:

Kenny ZHANG

unread,
Jun 26, 2015, 11:41:37 AM6/26/15
to openbla...@googlegroups.com
Hi,

I still confront this problem by now in running the small program in the first post, even after uncommenting #define ARMA_BLAS_LONG and/or  #define ARMA_BLAS_LONG_LONG as suggested in previous post.

This is the error information:

    Unhandled exception at 0x0000000300905a4d in openBlasTest.exe: 0xC0000005: Access violation at location 0x0000000300905a4d.

My system configuration is: Win7 64bit + vs2010, Debug+x64 build option, CPU Inter(R) Core(TM) i7-3770.  and the libraries I use are OpenBLAS-v0.2.14-Win64-int32 / OpenBLAS-v0.2.14-Win64-int64 and armadillo-5.200.2.

The error will appear on both OpenBLAS-v0.2.14-Win64-int32 and OpenBLAS-v0.2.14-Win64-int64.

Any advise are welcome.

Thanks in advance.

Kenny

Zhang Xianyi

unread,
Jun 26, 2015, 3:28:19 PM6/26/15
to Kenny ZHANG, openbla...@googlegroups.com
Could you try the develop branch?

Xianyi

lxfhfut

unread,
Jul 23, 2015, 12:07:58 PM7/23/15
to Zhang Xianyi, openbla...@googlegroups.com
Hi, Xianyi

I compiled the develop branch on my own machine and fortunately the problem has gone! The problem is still unknown to me, but anyway, thanks for the suggestion and help!

Regards,
Xufeng
You received this message because you are subscribed to a topic in the Google Groups "OpenBLAS-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openblas-users/lRzmnA8X1FU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openblas-user...@googlegroups.com.

lxfhfut

unread,
Jul 23, 2015, 12:08:08 PM7/23/15
to Zhang Xianyi, openbla...@googlegroups.com
Hi, Xianyi

I compiled the develop branch on my own machine and fortunately the problem has gone! The problem is still unknown to me, but anyway, thanks for the suggestion and help!

Regards,
Xufeng
On 6/26/2015 7:28 PM, Zhang Xianyi wrote:
You received this message because you are subscribed to a topic in the Google Groups "OpenBLAS-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openblas-users/lRzmnA8X1FU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openblas-user...@googlegroups.com.

nagy...@gmail.com

unread,
Feb 3, 2016, 6:26:01 AM2/3/16
to OpenBLAS-users
Reply all
Reply to author
Forward
0 new messages