>>>>>>>
balay@sb /home/balay/petsc (maint=)
$ git grep MatCreateMPIAIJMKL maint-3.8
maint-3.8:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:   MatCreateMPIAIJMKL - 
Creates a sparse parallel matrix whose local
maint-3.8:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:PetscErrorCode  
MatCreateMPIAIJMKL(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt M,PetscInt 
N,PetscInt d_nz,const PetscInt d_nnz[],PetscInt o_nz,const PetscInt o_nnz[],Mat 
*A)
maint-3.8:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:.seealso: 
MatCreateMPIAIJMKL(), MATSEQAIJMKL, MATMPIAIJMKL
maint-3.8:src/mat/impls/aij/seq/aijmkl/aijmkl.c:.seealso: MatCreate(), 
MatCreateMPIAIJMKL(), MatSetValues()
balay@sb /home/balay/petsc (maint=)
$ git grep MatCreateMPIAIJMKL maint
maint:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:   MatCreateMPIAIJMKL - Creates 
a sparse parallel matrix whose local
maint:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:PetscErrorCode  
MatCreateMPIAIJMKL(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt M,PetscInt 
N,PetscInt d_nz,const PetscInt d_nnz[],PetscInt o_nz,const PetscInt o_nnz[],Mat 
*A)
maint:src/mat/impls/aij/mpi/aijmkl/mpiaijmkl.c:.seealso: MatCreateMPIAIJMKL(), 
MATSEQAIJMKL, MATMPIAIJMKL
maint:src/mat/impls/aij/seq/aijmkl/aijmkl.c:.seealso: MatCreate(), 
MatCreateMPIAIJMKL(), MatSetValues()
balay@sb /home/balay/petsc (maint=)
$ 
<<<<<<<<<<<

MatCreateMPIAIJMKL() exists in both petsc-3.8 and petsc-3.10. However
the public interface is missing from both of these versions. So I'm
surprised you don't get the same error with petsc-3.8

Can you try the following change?

diff --git a/include/petscmat.h b/include/petscmat.h
index 1b8ac69377..c66f727994 100644
--- a/include/petscmat.h
+++ b/include/petscmat.h
@@ -223,7 +223,8 @@ typedef enum 
{DIFFERENT_NONZERO_PATTERN,SUBSET_NONZERO_PATTERN,SAME_NONZERO_PATT
 
 #if defined PETSC_HAVE_MKL_SPARSE
 PETSC_EXTERN PetscErrorCode 
MatCreateBAIJMKL(MPI_Comm,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,const
 PetscInt[],PetscInt,const PetscInt[],Mat*);
-PETSC_EXTERN PetscErrorCode MatCreateSeqBAIJMKL(MPI_Comm comm,PetscInt 
bs,PetscInt m,PetscInt n,PetscInt nz,const PetscInt nnz[],Mat *A);
+PETSC_EXTERN PetscErrorCode 
MatCreateSeqBAIJMKL(MPI_Comm,PetscInt,PetscInt,PetscInt,PetscInt,const 
PetscInt[],Mat*);
+PETSC_EXTERN PetscErrorCode  
MatCreateMPIAIJMKL(MPI_Comm,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,const 
PetscInt[],PetscInt,const PetscInt[],Mat*);
 #endif
 
 PETSC_EXTERN PetscErrorCode 
MatCreateSeqSELL(MPI_Comm,PetscInt,PetscInt,PetscInt,const PetscInt[],Mat*);


Also note: - this routine is available only when PETSc is built with Intel MKL

Satish

On Tue, 26 Mar 2019, Kun Jiao via petsc-users wrote:

> [kjiao@hyi0016 src/lsqr]% make
> [ 50%] Building CXX object lsqr/CMakeFiles/p_lsqr.dir/lsqr.cc.o
> /wgdisk/hy3300/source_code_dev/imaging/kjiao/src/git/src/lsqr/lsqr.cc(318): 
> error: identifier "MatCreateMPIAIJMKL" is undefined
>     ierr = 
> MatCreateMPIAIJMKL(comm,m,n,M,N,maxnz,dialens,maxnz,offlens,&A);CHKERRQ(ierr);
>            ^
> 
> /wgdisk/hy3300/source_code_dev/imaging/kjiao/src/git/src/lsqr/lsqr.cc(578): 
> error: identifier "MatCreateMPIAIJMKL" is undefined
>     ierr = 
> MatCreateMPIAIJMKL(comm,m,n,M,N,maxnz,dialens,maxnz,offlens,&A);CHKERRQ(ierr);
>            ^
> 
> compilation aborted for 
> /wgdisk/hy3300/source_code_dev/imaging/kjiao/src/git/src/lsqr/lsqr.cc (code 2)
> 
> Thanks.
> 
> 
> From: Mark Adams <mfad...@lbl.gov>
> Sent: Tuesday, March 26, 2019 9:22 AM
> To: Kun Jiao <kj...@slb.com>
> Cc: petsc-users@mcs.anl.gov
> Subject: Re: [Ext] Re: [petsc-users] error: identifier "MatCreateMPIAIJMKL" 
> is undefined in 3.10.4
> 
> I assume the whole error message will have the line of code. Please send the 
> whole error message and line of offending code if not included.
> 
> On Tue, Mar 26, 2019 at 10:08 AM Kun Jiao 
> <kj...@slb.com<mailto:kj...@slb.com>> wrote:
> It is compiling error, error message is:
> 
> error: identifier "MatCreateMPIAIJMKL" is undefined.
> 
> 
> 
> 
> 
> From: Mark Adams <mfad...@lbl.gov<mailto:mfad...@lbl.gov>>
> Sent: Tuesday, March 26, 2019 6:48 AM
> To: Kun Jiao <kj...@slb.com<mailto:kj...@slb.com>>
> Cc: petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov>
> Subject: [Ext] Re: [petsc-users] error: identifier "MatCreateMPIAIJMKL" is 
> undefined in 3.10.4
> 
> Please send the output of the error (runtime, compile time, link time?)
> 
> On Mon, Mar 25, 2019 at 10:50 PM Kun Jiao via petsc-users 
> <petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov>> wrote:
> Hi Petsc Experts,
> 
> Is MatCreateMPIAIJMKL retired in 3.10.4?
> 
> I got this error with my code which works fine in 3.8.3 version.
> 
> Regards,
> Kun
> 
> 
> 
> Schlumberger-Private
> 
> 
> Schlumberger-Private
> 
> 
> Schlumberger-Private
> 

Reply via email to