Re: [Lapackpp-devel] A strange bug with Blas_H_Dot_Prod
Status: Beta
Brought to you by:
cstim
|
From: Christian S. <sti...@tu...> - 2006-07-20 08:59:10
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear Cheng Guo,
thank you for this detailed question. However, as for your
Blas_H_Dot_Prod problem, I cannot reproduce this here with
lapackpp-2.4.10. The output, as expected, is (3,0) which is the expected
dot product. This is both with gcc-3.3.5, blas-3.0, lapack-3.0 on SuSE
9.3 and also with gcc-4.0.2, blas-3.0, lapack-3.0 on SuSE 10.0.
Oh, I just see you mentioned x86_64. Stand by - I will check more on
this architecture.
As for the other bug: As you wrote yourself, this doesn't occur on
gcc-3.x, only on the gcc-2.97. So this is obviously an issue due to
different compiler behaviour. I'm actually not really willing to spend a
lot of effort on supporting the old gcc-2.9x compiler, because it is
just so old and there are much newer compilers around for a long time. I
understand you might be forced to use that old version on the True64
computer, but in that case I'm afraid I have to say I cannot really
support this architecture.
I'll look into the x86_64 more closely and report back in some time.
Christian
Cheng Guo schrieb:
> Dear Christian,
>
> I found the function Blas_H_Dot_Prod doesn't work on my computer. My cpu
> is P4 with EM64t, and my OS is SuSE 10.0 for x86_64.
> The testing program is:
> *****************************************
> int main()
> {
> LaVectorComplex a(3),b(3);
> a=LaComplex(1,0);
> b=LaComplex(1,0);
> cout<<a<<endl;
> cout<<Blas_H_Dot_Prod(a,b)<<endl;
> }
> *****************************************
>
> The output is:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> (1,0)
> (1,0)
> (1,0)
>
> (2.31779e-310,4.94066e-323)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> So the result of Blas_H_Dot_Prod(a,b) is incorrect. The strange thing is
> that when I deleted the line "cout<<a<<endl;" the result of
> Blas_H_Dot_Prod(a,b) changed to (2,1) which is also wrong.
>
>
> By the way, in the email I sent to you on May 29, I also reported a bug.
> I still don't konw how to solve it so I include this bug here:
>
> My test program is
> ****************************
> #include <cstdlib>
> #include <iostream>
> #include <laindex.h>
> #include <lavd.h>
> #include <gmd.h>
> using namespace std;
> int main()
> {
> LaVectorDouble m,n;
> m.resize(3,1);
> m=2;
> n.resize(2,1);
> n=1;
> m(LaIndex(0,1)).inject(n);
> cout<<m<<endl;
> }
> ***************************
> I expect get the result
>
> 1
> 1
> 2
>
> which is what I get on my PC(suse 10,gcc-4.02)
> But I got this
>
> 2
> 2
> 2
>
> on the Tru64 UNIX (gcc-2.97)
> I have tested lapackpp2.4.10 and 2.4.8, neither gave the right answer.
>
> This bug seems not affecting LaGenMatDouble, for the following test code
> works correctly on Tru64
> ****************************
> #include <cstdlib>
> #include <iostream>
> #include <laindex.h>
> #include <lavd.h>
> #include <gmd.h>
> using namespace std;
> int main()
> {
> LaGenMatDouble m,n;
> m.resize(3,3);
> m=2;
> n.resize(2,2);
> n=1;
> m(LaIndex(0,1),LaIndex(0,1)).inject(n);
> cout<<m<<endl;
> }
> ***************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBRL9Fv2XAi+BfhivFAQLuTwQAqpavSg307G/YqIKMxuGxm5LC1o2EvlLp
aITYrzuG6HK1isuy7V37Tga3BddAP74n7pHomCGrI+szAqARzUNQB/NYj0pT6crv
XiJLtz50loQwe+W0nU6Dkr67m7VzWhBcPJAnqkem7ca5JjxAJAvJkz2KYGAv59Fm
XxEZ+U9LdUw=
=VOQO
-----END PGP SIGNATURE-----
|