[petsc-users] MKL BLAS interface inconsistency

Matthew Knepley knepley at gmail.com
Thu Apr 5 07:42:52 CDT 2012


On Thu, Apr 5, 2012 at 7:22 AM, Alexander Grayver
<agrayver at gfz-potsdam.de>wrote:

> **
> On 05.04.2012 14:13, Jed Brown wrote:
>
> On Thu, Apr 5, 2012 at 04:54, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:
>
>> The inconsistency is still there. I pulled petsc-dev today and came
>> across with the same problem:
>>
>> src/vec/vec/impls/seq/bvec2.c
>> 239:    *z = PetscRealPart(BLASdot_(&bn,xx,&one,xx,&one));
>> 240:    *z = PetscSqrtReal(*z);
>>
>> This doesn't work with Intel MKL. However in one of the mailing list
>> discussions it was said there is now check for that.
>> This check didn't work for me apparently. Any ideas why?
>>
>
> As always, we need configure.log.
>
>  Please find it attached.
>

Please ALWAYS ALWAYS ALWAYS send configure.log to petsc-maint at mcs.anl.gov.
They are too
big for the public list.

Second, your problem is that we get a link error tying to test this so it
looks like
your BLAS have no complex implementations:

sh: /opt/mpi/intel/openmpi-1.4.2/bin/mpicc  -o
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest    -wd1572
-Qoption,cpp,--extended_float_type -g
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.o  -ldl
-L/opt/mpi/intel/openmpi-1.4.2/lib -lmpi -lopen-rte -lopen-pal -lnsl -lutil
-L/opt/mpi/intel/openmpi-1.4.2/lib
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L//opt/intel/Compiler/11.1/072/lib/intel64
-L/usr/lib64/gcc/x86_64-suse-linux/4.3
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L/usr/x86_64-suse-linux/lib -limf -lsvml -lipgo -ldecimal -lgcc_s -lirc
-lpthread -lirc_s -L/opt/mpi/intel/openmpi-1.4.2/lib
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L//opt/intel/Compiler/11.1/072/lib/intel64
-L/usr/lib64/gcc/x86_64-suse-linux/4.3
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L/usr/x86_64-suse-linux/lib -ldl
Executing: /opt/mpi/intel/openmpi-1.4.2/bin/mpicc  -o
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest    -wd1572
-Qoption,cpp,--extended_float_type -g
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.o  -ldl
-L/opt/mpi/intel/openmpi-1.4.2/lib -lmpi -lopen-rte -lopen-pal -lnsl -lutil
-L/opt/mpi/intel/openmpi-1.4.2/lib
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L//opt/intel/Compiler/11.1/072/lib/intel64
-L/usr/lib64/gcc/x86_64-suse-linux/4.3
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L/usr/x86_64-suse-linux/lib -limf -lsvml -lipgo -ldecimal -lgcc_s -lirc
-lpthread -lirc_s -L/opt/mpi/intel/openmpi-1.4.2/lib
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L//opt/intel/Compiler/11.1/072/lib/intel64
-L/usr/lib64/gcc/x86_64-suse-linux/4.3
-L/opt/intel/Compiler/11.1/072/ipp/em64t/lib
-L/opt/intel/Compiler/11.1/072/mkl/interfaces/fftw3xf
-L/usr/x86_64-suse-linux/lib -ldl
sh:
Possible ERROR while running linker:
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.o: In function `main':
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.c:14: undefined
reference to `zdotc_'
 output: ret = 256
error message = {/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.o:
In function `main':
/tmp/petsc-8AEO1f/config.packages.BlasLapack/conftest.c:14: undefined
reference to `zdotc_'
}


    Matt


> In include/petscblaslapack_uscore.h (and other places), you will find the
> following. So we need to know why PETSC_COMPLEX_DOT_RESULT_ARGUMENT was not
> found by configure.
>
> This I can see...
>
>
>
>  #ifdef PETSC_COMPLEX_DOT_RESULT_ARGUMENT
> EXTERN_C_BEGIN
> extern void zdotc_(PetscScalar *,const PetscBLASInt*,const
> PetscScalar*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*);
> PETSC_STATIC_INLINE PetscScalar BLASdot_(const PetscBLASInt *n,const
> PetscScalar *x,const PetscBLASInt *sx,const PetscScalar *y,const
> PetscBLASInt *sy) {
>   PetscScalar tmpz;
>   zdotc_(&tmpz,n,x,sx,y,sy);
>   return tmpz;
> }
> EXTERN_C_END
> #else
> #  define BLASdot_     zdotc_
> #endif
>
>
>
> --
> Regards,
> Alexander
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120405/1ebd68ae/attachment.htm>


More information about the petsc-users mailing list