[petsc-dev] To add a PETSc dependent package to PETSc as an external package.

Xuefei (Rebecca) Yuan xyuan at lbl.gov
Wed Aug 17 15:19:22 CDT 2011


Dear all,

We are trying to add a PETSc dependent package called PDSLin to PETSc as an external package. PDSLin is a hybrid linear solver and we would like to have it been imported to PETSc as SuperLU_DIST used to be, and it provides an alternative way to solving a linear system in parallel.

Even though the package has not been released yet (should be released soon) and it is under testing for some problems, we are still interesting in putting it as an external package to PETSc for now.

I did some search of the old threads to the petsc-dev team and there is a request from Lious for the PaStiX a few years ago.

My understanding to add a package is the following steps:

1) create a python code called "PDSLin.py" under /petsc-dev/config/PETSc/packages

2) write an interface file between PETSc and PDSLin.

As PDSLin is very similar to SuperLU_DIST, and it also depending on PETSc (similar to Prometheus), the PDSLin.py is created based on SuperLU_DIST.py and Prometheus.py. 

Before putting the interface file in some places under petsc-dev directory, would you please help me understand how those option calls go to this interface file?

a) am I missing another file to create/modify to have those options connected to PDSLin in a very similar way to SuperLU_DIST?

b) do I have some flexibility to add more options called from PETSc to this package?

Moreover, I am not sure how to put the interface file in the dev package.

c) where shall it go? The SuperLU_DIST is located at

./src/mat/impls/aij/mpi/superlu_dist/superlu_dist.c

shall I put it as

./src/mat/impls/aij/mpi/pdslin/pdslin.c  ?

d) what is the rule of writing this interface file?

In superlu_dist.c, the extern functions are

extern PetscErrorCode MatFactorInfo_SuperLU_DIST(Mat,PetscViewer);
extern PetscErrorCode MatLUFactorNumeric_SuperLU_DIST(Mat,Mat,const MatFactorInfo *);
extern PetscErrorCode MatDestroy_SuperLU_DIST(Mat);
extern PetscErrorCode MatView_SuperLU_DIST(Mat,PetscViewer);
extern PetscErrorCode MatSolve_SuperLU_DIST(Mat,Vec,Vec);
extern PetscErrorCode MatLUFactorSymbolic_SuperLU_DIST(Mat,Mat,IS,IS,const MatFactorInfo *);
extern PetscErrorCode MatDestroy_MPIAIJ(Mat);

What kind of functions should I have in the interface file for PDSLin?

I am not sure if I have stated the problem clearly, in short is that we would like to add some package to PETSc but not sure the right way and steps to approach the goal.

Thanks very much!

Best regards,

Rebecca

Xuefei (Rebecca) Yuan
Postdoctoral Fellow
Lawrence Berkeley National Laboratory
Tel: 1-510-486-7031





More information about the petsc-dev mailing list