------- Comment From [email protected] 2016-03-22 12:24 EDT-------
This looks like a programming error in the library to me.
The function DTPUMatCholeskyFactor suffers from a type mismatch when
calling dpptrf. INFO is of type ffinteger which is defined to long (64 bit)
in dsdplapack.h while dpptrf appears to just set an integer part (32 bit) of
it.
When assigning this to *flag which is again an int we take the "wrong"
part of INFO since we are a big endian target.
Apparently ffinteger was changed intentionally from int to long. I
think that change broke it.
That it worked with -O2 but not with -O3 is just a coincidence. The
uninitialized value accessed here just happened to contain a 0 in the
-O2 case what indicates success.
src/vecmat/dlpack.c:
static int DTPUMatCholeskyFactor(void* AA, int *flag){
dtpumat* A=(dtpumat*) AA;
int i;
ffinteger INFO,LDA=1,N=A->n;
double *AP=A->val,*ss=A->sscale,*v;
char UPLO=A->UPLO;
if (N<=0) LDA=1;
else LDA=N;
if (A->scaleit){
for (v=AP,i=0;i<N;i++){ ss[i]=*v;v+=(i+2);}
for (i=0;i<N;i++){ ss[i]=1.0/sqrt(fabs(ss[i])+1.0e-8); }
dtpuscalemat(AP,ss,N);
}
dpptrf(&UPLO, &N, AP, &INFO );
*flag=INFO;
return 0;
}
dsdplapack.h:
#if !defined(DSDPLAPACK)
#define DSDPLAPACK
/*!
\file dsdplapack.h
\brief DSDP uses BLAS and LAPACK for many of its operations.
*/
typedef long int ffinteger;
/*
typedef int ffinteger;
*/
** Tags added: bugnameltc-136932 severity-high
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1543982
Title:
dsdp tests hang on s390x when package is built with -O3
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dsdp/+bug/1543982/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs