[petsc-users] MKL BLAS interface inconsistency

Barry Smith bsmith at mcs.anl.gov
Thu Apr 5 08:05:42 CDT 2012


   Matt,

    It doesn't look like that link line is even linking against the MKL libraries?

   Barry

On Apr 5, 2012, at 7:54 AM, Alexander Grayver wrote:

> On 05.04.2012 14:42, Matthew Knepley wrote:
>> 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.
> 
> Sorry, next time I will.
> 
>> 
>> Second, your problem is that we get a link error tying to test this so it looks like
>> your BLAS have no complex implementations:
> 
> It does have zdotc. Old petsc-dev works with it fine (after I patched vec implementaton myself to get around this issue).
> 
> home> nm /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_lp64.a | grep zdotc
> cblas_zdotci_lp64.o:
> 0000000000000000 T cblas_zdotci_sub
> cblas_zdotc_lp64.o:
> 0000000000000000 T cblas_zdotc_sub
>                  U zdotc
> _zdotci_lp64.o:
>                  U mkl_blas_zdotci
> 0000000000000000 T zdotci
> 0000000000000000 T zdotci_
> _zdotc_lp64.o:
>                  U mkl_blas_zdotc
> 0000000000000000 T zdotc
> 0000000000000000 T zdotc_
> home>
> 
>> 
>> 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
> 
> 
> -- 
> Regards,
> Alexander
> 



More information about the petsc-users mailing list