[petsc-users] Accessing MUMPS INFOG values

Barry Smith bsmith at mcs.anl.gov
Thu May 29 13:43:54 CDT 2014


  We should add direct support for this. Thus beasties are all stored by MUMPS in the data structure DMUMPS_STRUC_C which is defined in dmumps_c.h
(versions also for single precision and complex).  So what PETSc should provide in mumps.c is a function something like

#undef __FUNCT__
#define __FUNCT__ "MatMUMPSGetStruc"
PetscErrorCode MatMUMPSGetStruc(Mat A,void **struc)
{
  Mat_MUMPS      *mumps=(Mat_MUMPS*)A->spptr;

  PetscFunctionBegin;
  *struc = (void *) mumps->id
  PetscFunctionReturn(0);
}
so stick this function into src/mat/impls/aij/mpi/mumps/mumps.c run make at the root directory of PETSc to have PETSc libraries recompiled 
Also add a prototype for this function in petscmat.h

  
Now your code would include dumps_c.h and then call MatMUMPSGetStruc() and then you can directly access any thing you like.

Let us know how it goes and we’ll get this stuff into the development version of PETSc.

  Barry




On May 29, 2014, at 10:38 AM, M Asghar <masghar1397 at gmail.com> wrote:

> Hi,
> 
> Is it possible to access the contents of MUMPS array INFOG (and INFO, RINFOG etc) via the PETSc interface?
> 
> I am working with SLEPc and am using MUMPS for the factorisation. I would like to access the contents of their INFOG array within our code particularly when an error occurs in order to determine whether any remedial action can be taken. The error code returned from PETSc is useful; any additional information from MUMPS that can be accessed from within ones code would be very helpful also.
> 
> Many thanks in advance.
> 
> M Asghar
> 



More information about the petsc-users mailing list