[petsc-users] MKL BLAS interface inconsistency
Alexander Grayver
agrayver at gfz-potsdam.de
Thu Jan 19 08:30:39 CST 2012
Dear petsc team,
I've been struggling with this problem for a long time and seeking for
your advice now.
Let's take simple petsc program:
#include <petscksp.h>
int main(int argc,char **args)
{
Vec b;
PetscReal norm;
PetscInitialize(&argc,&args,(char *)0,NULL);
VecCreateSeq(PETSC_COMM_SELF,100,&b);
VecSet(b,2.0);
VecNorm(b,NORM_1_AND_2,&norm);
return 0;
}
This program works well if I compile petsc with non-mkl blas/lapack.
However, if I compile petsc with mkl blas/lapack this program crashes:
zdotc, FP=7fff8f121e30
VecNorm_Seq, FP=7fff8f121f90
VecNorm_Seq, FP=7fff8f1220f0
VecNorm, FP=7fff8f122230
main, FP=7fff8f122290
It crashes in zdotc. You call this routine as following:
*z = BLASdot_(&bn,xx,&one,xx,&one);
When I look at the zdotc interface in mkl.h I see:
void ZDOTC(MKL_Complex16 *pres, const MKL_INT *n, const MKL_Complex16
*x, const MKL_INT *incx, const MKL_Complex16 *y, const MKL_INT *incy);
I also found example here:
http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-blas-cblas-and-lapack-compilinglinking-functions-fortran-and-cc-calls/
There are 6 input parameters. But in "classical" BLAS implementation 5
input and 1 output.
For example, NORM_1 works well since interface to dzasum is the same.
Any ideas?
--
Regards,
Alexander
More information about the petsc-users
mailing list