Commits

Satish Balay committed b6d6499

remove dscpack interface as its been unused/unmaintained for the past few releases

Hg-commit: b4a56a5226a6394c9382bc82d021edeedbc6de93

  • Participants
  • Parent commits 4336a9e

Comments (0)

Files changed (14)

File bin/TOPSInstaller.py

              if f > 0: i = i[0:f]
              args.append('--download-'+i+'=1')
 
-        packages = ["Spooles (parallel sparse direct solvers)","  DSCPack","  MUMPS","Parmetis (parallel partitioning)","  Chaco","  Jostle","  Party","  PTScotch","Prometheus (parallel preconditioner)","  ml","  SPAI","Matlab"]
+        packages = ["Spooles (parallel sparse direct solvers)","  MUMPS","Parmetis (parallel partitioning)","  Chaco","  Jostle","  Party","  PTScotch","Prometheus (parallel preconditioner)","  ml","  SPAI","Matlab"]
         reply = multchoicebox("Pick the other packages to install.\n\nAgain, only select the packages you truly need.",title, packages)
         for i in reply:
              i = i.lower().replace(' ','')
         if [ "${LIBNAME}" = "libpetsc" ]; then OTHERLIBS="${PETSC_EXTERNAL_LIB_BASIC}   ${SYS_LIB}  ${OTHERSHAREDLIBS}  ${SL_LINKER_LIBS} -lm -lc "; fi;\
         if [ "${LIBNAME}" = "libpetscsys" ]; then OTHERLIBS="  ${SYS_LIB}  ${OTHERSHAREDLIBS}  ${SL_LINKER_LIBS} -lm -lc "; fi;\
         if [ "${LIBNAME}" = "libpetscvec" ]; then OTHERLIBS="${HYPRE_LIB} ${PETSC_SYS_LIB_BASIC}"  ; fi;\
-        if [ "${LIBNAME}" = "libpetscmat" ]; then OTHERLIBS="${PLAPACK_LIB} ${SCOTCH_LIB} ${PARTY_LIB} ${CHACO_LIB} ${JOSTLE_LIB} ${SUPERLU_LIB} ${SUPERLU_DIST_LIB} ${SPOOLES_LIB} ${MUMPS_LIB} ${SCALAPACK_LIB} ${BLACS_LIB} ${PARMETIS_LIB} ${UMFPACK_LIB} ${LUSOL_LIB} ${DSCPACK_LIB} ${PETSC_VEC_LIB_BASIC}"  ; fi;\
+        if [ "${LIBNAME}" = "libpetscmat" ]; then OTHERLIBS="${PLAPACK_LIB} ${SCOTCH_LIB} ${PARTY_LIB} ${CHACO_LIB} ${JOSTLE_LIB} ${SUPERLU_LIB} ${SUPERLU_DIST_LIB} ${SPOOLES_LIB} ${MUMPS_LIB} ${SCALAPACK_LIB} ${BLACS_LIB} ${PARMETIS_LIB} ${UMFPACK_LIB} ${LUSOL_LIB} ${PETSC_VEC_LIB_BASIC}"  ; fi;\
         if [ "${LIBNAME}" = "libpetscdm" ]; then OTHERLIBS="${TRIANGLE_LIB} ${TETGEN_LIB} ${HYPRE_LIB} ${PETSC_MAT_LIB_BASIC} ${MPI_LIB}"  ; fi;\
         if [ "${LIBNAME}" = "libpetscksp" ]; then OTHERLIBS="${HYPRE_LIB} ${PETSC_CHARACTERISTIC_LIB_BASIC}"  ; fi;\
         if [ "${LIBNAME}" = "libpetscsnes" ]; then OTHERLIBS="${PETSC_KSP_LIB_BASIC}"  ; fi;\

File config/PETSc/packages/PaStiX.py

                          ['libpastix.a','libpthread.a','librt.a']]
     self.functions    = ['pastix']
     self.includes     = ['pastix.h']
+    self.downloadfilename = 'pastix'
     self.complex      = 0
     self.fc           = 1
     return

File include/finclude/petscmatdef.h

 #define MATORDERINGRCM 'rcm'
 #define MATORDERINGQMD 'qmd'
 #define MATORDERINGROWLENGTH 'rowlength'
-#define MATORDERINGDSC_ND 'dsc_nd'
-#define MATORDERINGDSC_MMD 'dsc_mmd'
-#define MATORDERINGDSC_MDF 'dsc_mdf'
-
 !
 !  Matrix types
 !
 #define MATSOLVERLUSOL        'lusol'
 #define MATSOLVERMUMPS        'mumps'
 #define MATSOLVERPASTIX       'pastix'
-#define MATSOLVERDSCPACK      'dscpack'
 #define MATSOLVERMATLAB       'matlab'
 #define MATSOLVERPETSC        'petsc'
 #define MATSOLVERPLAPACK      'plapack'

File include/petscmat.h

 #define MATSOLVERLUSOL        "lusol"
 #define MATSOLVERMUMPS        "mumps"
 #define MATSOLVERPASTIX       "pastix"
-#define MATSOLVERDSCPACK      "dscpack"
 #define MATSOLVERMATLAB       "matlab"
 #define MATSOLVERPETSC        "petsc"
 #define MATSOLVERPLAPACK      "plapack"
 #define MATORDERINGRCM         "rcm"
 #define MATORDERINGQMD         "qmd"
 #define MATORDERINGROWLENGTH   "rowlength"
-#define MATORDERINGDSC_ND      "dsc_nd"         /* these three are only for DSCPACK, see its documentation for details */
-#define MATORDERINGDSC_MMD     "dsc_mmd"
-#define MATORDERINGDSC_MDF     "dsc_mdf"
 #define MATORDERINGAMD         "amd"            /* only works if UMFPACK is installed with PETSc */
 
 extern PetscErrorCode  MatGetOrdering(Mat,const MatOrderingType,IS*,IS*);

File src/docs/tex/manual/acknowl.tex

                      \href{http://www.mcs.anl.gov/adic}{http://www.mcs.anl.gov/adic},
                      \href{http://www.mcs.anl.gov/adifor}{http://www.mcs.anl.gov/adifor},
   \item Chaco -     A graph partitioning package, \href{ http://www.cs.sandia.gov/CRF/chac.html}{ http://www.cs.sandia.gov/CRF/chac.html}
-  \item DSCPACK -    see page \pageref{sec_externalsol}, Domain-Separator Codes for solving sparse symmetric
-                      positive-definite systems, 
-                     developed by Padma Raghavan,   
-                     \href{http://www.cse.psu.edu/~raghavan/Dscpack/}{http://www.cse.psu.edu/~raghavan/Dscpack/},
   \item ESSL -         IBM's math library for fast sparse direct LU factorization,
   \item Euclid  -   parallel ILU(k) developed by David Hysom, accessed through the Hypre interface,
   \item Hypre -    the LLNL preconditioner library, \href{http://www.llnl.gov/CASC/hypre}{http://www.llnl.gov/CASC/hypre}

File src/docs/tex/manual/part2.tex

 {\bf MatType}  & {\bf PCType} & {\bf MatSolverPackage} & {\bf Package} \\
                &              &                        & (\trl{-pc_factor_mat_solver_package)}\\
 \hline
- baij         & cholesky     &  MATSOLVERDSCPACK         & \trl{dscpack}\\
  seqaij       & lu           &  MATSOLVERESSL            & \trl{essl}\\
  seqaij       & lu           &  MATSOLVERLUSOL           & \trl{lusol}\\
  seqaij       & lu           &  MATSOLVERMATLAB          & \trl{matlab}\\

File src/docs/website/documentation/linearsolvertable.html

       </td>
       <td style="width: 134px;" height="19"><br>
       </td>
-      <td style="width: 147px;"><a
- href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MATSEQSBAIJ.html">seqsbaij</a></td>
-      <td style="width: 152px;" height="19"><a
- href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MATSOLVERDSCPACK.html">DSCPACK</a>
-(Penn State)</td>
-      <td style="width: 66px;" align="center" height="19">X</td>
-      <td style="width: 70px;" align="center" height="19"><br>
-      </td>
-    </tr>
-    <tr>
-      <td style="width: 101px;" height="19"><br>
-      </td>
-      <td style="width: 170px;" height="19"><br>
-      </td>
-      <td style="width: 134px;" height="19"><br>
-      </td>
       <td style="width: 147px;">dense</td>
       <td style="width: 152px;" height="19"><a
  href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MATSOLVERPLAPACK.html">PLAPACK</a></td>

File src/docs/website/miscellaneous/external.html

 
 
 
-        <li><a href="http://www.cse.psu.edu/%7Eraghavan/">DSCPACK </a>- a
-Domain-Separator Cholesky Package for solving sparse&nbsp; symmetric
-positive-definite developed by Padma Raghavan. </li>
-
-
-
-
-
-
-
         <li>ESSL - IBM's math library for fast sparse direct LU
 factorization. </li>
 

File src/ksp/ksp/examples/tests/ex30.c

         -help -ksp_view                  \n\
         -num_numfac <num_numfac> -num_rhs <num_rhs> \n\
         -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package spooles or superlu or superlu_dist or mumps \n\
-        -ksp_type preonly -pc_type cholesky -pc_factor_mat_solver_package spooles or dscpack or mumps \n\
+        -ksp_type preonly -pc_type cholesky -pc_factor_mat_solver_package spooles or mumps \n\
    mpiexec -n <np> ex30 -f0 <datafile> -ksp_type cg -pc_type asm -pc_asm_type basic -sub_pc_type icc -mat_type sbaij
 
    ./ex30 -f0 $D/small -mat_sigma -3.999999999999999 -ksp_type fgmres -pc_type lu -pc_factor_mat_solver_package superlu -mat_superlu_conditionnumber -ckerror -mat_superlu_diagpivotthresh 0

File src/ksp/ksp/examples/tutorials/ex10.c

         -help -ksp_view                  \n\
         -num_numfac <num_numfac> -num_rhs <num_rhs> \n\
         -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package spooles or superlu or superlu_dist or mumps \n\
-        -ksp_type preonly -pc_type cholesky -pc_factor_mat_solver_package spooles or dscpack or mumps \n\   
+        -ksp_type preonly -pc_type cholesky -pc_factor_mat_solver_package spooles or mumps \n\   
    mpiexec -n <np> ./ex10 -f0 <datafile> -ksp_type cg -pc_type asm -pc_asm_type basic -sub_pc_type icc -mat_type sbaij
  \n\n";
 */

File src/mat/impls/baij/mpi/dscpack/dscpack.c

-
-/* 
-        Provides an interface to the DSCPACK (Domain-Separator Codes) sparse direct solver
-*/
-
-#include <../src/mat/impls/baij/seq/baij.h>
-#include <../src/mat/impls/baij/mpi/mpibaij.h>
-
-EXTERN_C_BEGIN
-#include <dscmain.h>
-EXTERN_C_END
-
-typedef struct {
-  DSC_Solver	My_DSC_Solver;  
-  PetscInt      num_local_strucs, *local_struc_old_num,
-                num_local_cols, num_local_nonz, 
-                *global_struc_new_col_num,
-                *global_struc_new_num, *global_struc_owner,  
-                dsc_id,bs,*local_cols_old_num,*replication; 
-  PetscInt      order_code,scheme_code,factor_type, stat, 
-                LBLASLevel,DBLASLevel,max_mem_allowed;             
-  MatStructure  flg;
-  IS            my_cols,iden,iden_dsc;
-  Vec           vec_dsc;
-  VecScatter    scat;
-  MPI_Comm      comm_dsc;
-
-  /* A few inheritance details */
-  PetscMPIInt    size;
-
-  PetscBool  CleanUpDSCPACK;
-} Mat_DSCPACK;
-
-
-/* DSC function */
-#undef __FUNCT__  
-#define __FUNCT__ "isort2"
-void isort2(PetscInt size, PetscInt *list, PetscInt *idx_dsc) {
-  /* in increasing order */
-  /* idx_dsc will contain indices such that */
-  /* list can be accessed in sorted order */
-  PetscInt i, j, x, y;
-  
-  for (i=0; i<size; i++) idx_dsc[i] =i;
-
-  for (i=1; i<size; i++){
-    y= idx_dsc[i];
-    x=list[idx_dsc[i]];
-    for (j=i-1; ((j>=0) && (x<list[idx_dsc[j]])); j--)
-      idx_dsc[j+1]=idx_dsc[j];
-    idx_dsc[j+1]=y;
-  }
-}/*end isort2*/
-
-#undef __FUNCT__  
-#define __FUNCT__ "BAIJtoMyANonz"
-PetscErrorCode  BAIJtoMyANonz( PetscInt *AIndex, PetscInt *AStruct, PetscInt bs,
-		    RealNumberType *ANonz, PetscInt NumLocalStructs, 
-                    PetscInt NumLocalNonz,  PetscInt *GlobalStructNewColNum,                
-		    PetscInt *LocalStructOldNum,
-                    PetscInt *LocalStructLocalNum,
-		    RealNumberType **adr_MyANonz)
-/* 
-   Extract non-zero values of lower triangular part
-   of the permuted matrix that belong to this processor.
-
-   Only output parameter is adr_MyANonz -- is malloced and changed.
-   Rest are input parameters left unchanged.
-
-   When LocalStructLocalNum == PETSC_NULL,
-        AIndex, AStruct, and ANonz contain entire original matrix A 
-        in PETSc SeqBAIJ format,
-        otherwise,
-        AIndex, AStruct, and ANonz are indeces for the submatrix
-        of A whose colomns (in increasing order) belong to this processor.
-
-   Other variables supply information on ownership of columns
-   and the new numbering in a fill-reducing permutation
-
-   This information is used to setup lower half of A nonzeroes
-   for columns owned by this processor
- */ 
-{  
-  PetscErrorCode ierr;
-  PetscInt       i, j, k, iold,inew, jj, kk, bs2=bs*bs,*idx, *NewColNum, MyANonz_last, max_struct=0, struct_size;
-  RealNumberType *MyANonz;             
-
-  PetscFunctionBegin;
-
-  /* loop: to find maximum number of subscripts over columns
-     assigned to this processor */
-  for (i=0; i <NumLocalStructs; i++) {
-    /* for each struct i (local) assigned to this processor */
-    if (LocalStructLocalNum){
-      iold = LocalStructLocalNum[i];
-    } else {
-      iold = LocalStructOldNum[i];
-    }
-    
-    struct_size = AIndex[iold+1] - AIndex[iold];
-    if ( max_struct <= struct_size) max_struct = struct_size; 
-  }
-
-  /* allocate tmp arrays large enough to hold densest struct */
-  ierr = PetscMalloc2(max_struct,PetscInt,&NewColNum,max_struct,PetscInt,&idx);CHKERRQ(ierr);
-  
-  ierr = PetscMalloc(NumLocalNonz*sizeof(RealNumberType),&MyANonz);CHKERRQ(ierr);  
-  *adr_MyANonz = MyANonz;
-
-  /* loop to set up nonzeroes in MyANonz */  
-  MyANonz_last = 0 ; /* points to first empty space in MyANonz */
-  for (i=0; i <NumLocalStructs; i++) {
-
-    /* for each struct i (local) assigned to this processor */		
-    if (LocalStructLocalNum){
-      iold = LocalStructLocalNum[i];
-    } else {
-      iold = LocalStructOldNum[i];
-    }
-
-    struct_size = AIndex[iold+1] - AIndex[iold];    
-    for (k=0, j=AIndex[iold]; j<AIndex[iold+1]; j++){
-      NewColNum[k] = GlobalStructNewColNum[AStruct[j]];
-      k++;
-    }
-    isort2(struct_size, NewColNum, idx);
-                      
-    kk = AIndex[iold]*bs2; /* points to 1st element of iold block col in ANonz */  
-    inew = GlobalStructNewColNum[LocalStructOldNum[i]];
-
-    for (jj = 0; jj < bs; jj++) {
-      for (j=0; j<struct_size; j++){
-        for ( k = 0; k<bs; k++){      
-          if (NewColNum[idx[j]] + k >= inew)
-            MyANonz[MyANonz_last++] = ANonz[kk + idx[j]*bs2 + k*bs + jj];
-        }
-      }
-      inew++;
-    }
-  } /* end outer loop for i */
-
-  ierr = PetscFree2(NewColNum); 
-  if (MyANonz_last != NumLocalNonz) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_PLIB,"MyANonz_last %d != NumLocalNonz %d\n",MyANonz_last, NumLocalNonz);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "MatDestroy_DSCPACK"
-PetscErrorCode MatDestroy_DSCPACK(Mat A)
-{
-  Mat_DSCPACK    *lu=(Mat_DSCPACK*)A->spptr;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  if (lu && lu->CleanUpDSCPACK) {
-    if (lu->dsc_id != -1) {
-      if(lu->stat) DSC_DoStats(lu->My_DSC_Solver);
-      DSC_FreeAll(lu->My_DSC_Solver);
-      DSC_Close0(lu->My_DSC_Solver);
-
-      ierr = PetscFree(lu->local_cols_old_num);CHKERRQ(ierr);
-    }
-    DSC_End(lu->My_DSC_Solver);
-
-    ierr = MPI_Comm_free(&lu->comm_dsc);CHKERRQ(ierr);
-    ierr = ISDestroy(lu->my_cols);CHKERRQ(ierr);
-    ierr = PetscFree(lu->replication);CHKERRQ(ierr);
-    ierr = VecDestroy(lu->vec_dsc);CHKERRQ(ierr);
-    ierr = ISDestroy(lu->iden_dsc);CHKERRQ(ierr);
-    ierr = VecScatterDestroy(lu->scat);CHKERRQ(ierr);
-    if (lu->size >1 && lu->iden) {ierr = ISDestroy(lu->iden);CHKERRQ(ierr);}
-  }
-  if (lu) {
-    if (lu->size == 1) {
-      ierr = MatDestroy_SeqBAIJ(A);CHKERRQ(ierr);
-    } else {
-      ierr = MatDestroy_MPIBAIJ(A);CHKERRQ(ierr);
-    }
-  }
-  ierr = PetscFree(A->spptr);CHKERRQ(ierr);
-
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__  
-#define __FUNCT__ "MatSolve_DSCPACK"
-PetscErrorCode MatSolve_DSCPACK(Mat A,Vec b,Vec x) 
-{
-  Mat_DSCPACK    *lu= (Mat_DSCPACK*)A->spptr;
-  PetscErrorCode ierr;
-  RealNumberType *solution_vec,*rhs_vec; 
-
-  PetscFunctionBegin;
-  /* scatter b into seq vec_dsc */  
-  if ( !lu->scat ) {
-    ierr = VecScatterCreate(b,lu->my_cols,lu->vec_dsc,lu->iden_dsc,&lu->scat);CHKERRQ(ierr); 
-  }    
-  ierr = VecScatterBegin(lu->scat,b,lu->vec_dsc,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
-  ierr = VecScatterEnd(lu->scat,b,lu->vec_dsc,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
-
-  if (lu->dsc_id != -1){
-    ierr = VecGetArray(lu->vec_dsc,&rhs_vec);CHKERRQ(ierr);    
-    DSC_InputRhsLocalVec(lu->My_DSC_Solver, rhs_vec, lu->num_local_cols);
-    ierr = VecRestoreArray(lu->vec_dsc,&rhs_vec);CHKERRQ(ierr); 
- 
-    ierr = DSC_Solve(lu->My_DSC_Solver);
-    if (ierr !=  DSC_NO_ERROR) {
-      DSC_ErrorDisplay(lu->My_DSC_Solver);
-      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in calling DSC_Solve");
-    }
-
-    /* get the permuted local solution */
-    ierr = VecGetArray(lu->vec_dsc,&solution_vec);CHKERRQ(ierr);  
-    ierr = DSC_GetLocalSolution(lu->My_DSC_Solver,solution_vec, lu->num_local_cols);
-    ierr = VecRestoreArray(lu->vec_dsc,&solution_vec);CHKERRQ(ierr); 
-
-  } /* end of if (lu->dsc_id != -1) */
-
-  /* put permuted local solution solution_vec into x in the original order */
-  ierr = VecScatterBegin(lu->scat,lu->vec_dsc,x,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-  ierr = VecScatterEnd(lu->scat,lu->vec_dsc,x,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__   
-#define __FUNCT__ "MatCholeskyFactorNumeric_DSCPACK"
-PetscErrorCode MatCholeskyFactorNumeric_DSCPACK(Mat F,Mat A,const MatFactorInfo *info) 
-{
-  Mat_SeqBAIJ    *a_seq;
-  Mat_DSCPACK    *lu=(Mat_DSCPACK*)(F)->spptr; 
-  Mat            *tseq,A_seq=PETSC_NULL;
-  RealNumberType *my_a_nonz;
-  PetscErrorCode ierr;
-  PetscMPIInt    size;
-  PetscInt       M=A->rmap->N,Mbs=M/lu->bs,max_mem_estimate,max_single_malloc_blk,
-                 number_of_procs,i,j,next,iold,*idx,*iidx=0,*itmp;
-  IS             my_cols_sorted;
-  Mat            F_diag;
-	
-  PetscFunctionBegin;
-  ierr = MPI_Comm_size(((PetscObject)A)->comm,&size);CHKERRQ(ierr);
-  if ( lu->flg == DIFFERENT_NONZERO_PATTERN){ /* first numeric factorization */
-    /* convert A to A_seq */
-    if (size > 1) { 
-      if (!lu->iden){
-        ierr = ISCreateStride(PETSC_COMM_SELF,M,0,1,&lu->iden);CHKERRQ(ierr);
-      }
-      ierr = MatGetSubMatrices(A,1,&lu->iden,&lu->iden,MAT_INITIAL_MATRIX,&tseq);CHKERRQ(ierr); 
-      A_seq = tseq[0];
-      a_seq = (Mat_SeqBAIJ*)A_seq->data;
-    } else {
-      a_seq = (Mat_SeqBAIJ*)A->data;
-    }
-   
-    ierr = PetscMalloc(Mbs*sizeof(PetscInt),&lu->replication);CHKERRQ(ierr);
-    for (i=0; i<Mbs; i++) lu->replication[i] = lu->bs;
-
-    number_of_procs = DSC_Analyze(Mbs, a_seq->i, a_seq->j, lu->replication);
-    
-    i = size;
-    if ( number_of_procs < i ) i = number_of_procs;
-    number_of_procs = 1;   
-    while ( i > 1 ){
-      number_of_procs  *= 2; i /= 2; 
-    }
-
-    /* DSC_Solver starts */
-    DSC_Open0( lu->My_DSC_Solver, number_of_procs, &lu->dsc_id, lu->comm_dsc ); 
-
-    if (lu->dsc_id != -1) {
-      ierr = DSC_Order(lu->My_DSC_Solver,lu->order_code,Mbs,a_seq->i,a_seq->j,lu->replication,
-                   &M,&lu->num_local_strucs, 
-                   &lu->num_local_cols, &lu->num_local_nonz,  &lu->global_struc_new_col_num, 
-                   &lu->global_struc_new_num, &lu->global_struc_owner, 
-                   &lu->local_struc_old_num);
-      if (ierr !=  DSC_NO_ERROR) {
-        DSC_ErrorDisplay(lu->My_DSC_Solver);
-        SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error when use DSC_Order()");
-      }
-
-      ierr = DSC_SFactor(lu->My_DSC_Solver,&max_mem_estimate,&max_single_malloc_blk,
-                     lu->max_mem_allowed, lu->LBLASLevel, lu->DBLASLevel);
-      if (ierr !=  DSC_NO_ERROR) {
-        DSC_ErrorDisplay(lu->My_DSC_Solver);
-        SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error when use DSC_Order"); 
-      }
-
-      ierr = BAIJtoMyANonz(a_seq->i, a_seq->j, lu->bs, a_seq->a,
-                       lu->num_local_strucs, lu->num_local_nonz,  
-                       lu->global_struc_new_col_num, 
-                       lu->local_struc_old_num,
-                       PETSC_NULL,
-                       &my_a_nonz);
-      if (ierr <0) {
-          DSC_ErrorDisplay(lu->My_DSC_Solver);
-          SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error setting local nonzeroes at processor %d \n", lu->dsc_id);
-      }
-
-      /* get local_cols_old_num and IS my_cols to be used later */
-      ierr = PetscMalloc(lu->num_local_cols*sizeof(PetscInt),&lu->local_cols_old_num);CHKERRQ(ierr);  
-      for (next = 0, i=0; i<lu->num_local_strucs; i++){
-        iold = lu->bs*lu->local_struc_old_num[i];
-        for (j=0; j<lu->bs; j++)
-          lu->local_cols_old_num[next++] = iold++;
-      }
-      ierr = ISCreateGeneral(PETSC_COMM_SELF,lu->num_local_cols,lu->local_cols_old_num,PETSC_COPY_VALUES,&lu->my_cols);CHKERRQ(ierr);
-      
-    } else {    /* lu->dsc_id == -1 */  
-      lu->num_local_cols = 0; 
-      lu->local_cols_old_num = 0; 
-      ierr = ISCreateGeneral(PETSC_COMM_SELF,lu->num_local_cols,lu->local_cols_old_num,PETSC_COPY_VALUES,&lu->my_cols);CHKERRQ(ierr);
-    } 
-    /* generate vec_dsc and iden_dsc to be used later */
-    ierr = VecCreateSeq(PETSC_COMM_SELF,lu->num_local_cols,&lu->vec_dsc);CHKERRQ(ierr);  
-    ierr = ISCreateStride(PETSC_COMM_SELF,lu->num_local_cols,0,1,&lu->iden_dsc);CHKERRQ(ierr); 
-    lu->scat = PETSC_NULL;
-
-    if ( size>1 ) {
-      ierr = MatDestroyMatrices(1,&tseq);CHKERRQ(ierr); 
-    }
-  } else { /* use previously computed symbolic factor */
-    /* convert A to my A_seq */
-    if (size > 1) { 
-      if (lu->dsc_id == -1) {
-        itmp = 0;
-      } else {     
-        ierr = PetscMalloc2(lu->num_local_strucs,PetscInt,&idx,lu->num_local_strucs,PetscInt,&iidx);CHKERRQ(ierr);
-        ierr = PetscMalloc(lu->num_local_cols*sizeof(PetscInt),&itmp);CHKERRQ(ierr); 
-      
-        isort2(lu->num_local_strucs, lu->local_struc_old_num, idx);
-        for (next=0, i=0; i< lu->num_local_strucs; i++) {
-          iold = lu->bs*lu->local_struc_old_num[idx[i]]; 
-          for (j=0; j<lu->bs; j++){
-            itmp[next++] = iold++; /* sorted local_cols_old_num */
-          }
-        }
-        for (i=0; i< lu->num_local_strucs; i++) {       
-          iidx[idx[i]] = i;       /* inverse of idx */
-        }
-      } /* end of (lu->dsc_id == -1) */
-      ierr = ISCreateGeneral(PETSC_COMM_SELF,lu->num_local_cols,itmp,PETSC_COPY_VALUES,&my_cols_sorted);CHKERRQ(ierr); 
-      ierr = MatGetSubMatrices(A,1,&my_cols_sorted,&lu->iden,MAT_INITIAL_MATRIX,&tseq);CHKERRQ(ierr); 
-      ierr = ISDestroy(my_cols_sorted);CHKERRQ(ierr);
-      A_seq = tseq[0];
-    
-      if (lu->dsc_id != -1) {
-        DSC_ReFactorInitialize(lu->My_DSC_Solver);
-
-        a_seq = (Mat_SeqBAIJ*)A_seq->data;      
-        ierr = BAIJtoMyANonz(a_seq->i, a_seq->j, lu->bs, a_seq->a,
-                       lu->num_local_strucs, lu->num_local_nonz,  
-                       lu->global_struc_new_col_num, 
-                       lu->local_struc_old_num,
-                       iidx,
-                       &my_a_nonz);
-        if (ierr <0) {
-          DSC_ErrorDisplay(lu->My_DSC_Solver);
-          SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error setting local nonzeroes at processor %d \n", lu->dsc_id);
-        }
-        ierr = PetscFree2(idx,iidex);CHKERRQ(ierr);
-        ierr = PetscFree(itmp);CHKERRQ(ierr);
-      } /* end of if(lu->dsc_id != -1)  */
-    } else { /* size == 1 */
-      a_seq = (Mat_SeqBAIJ*)A->data;
-    
-      ierr = BAIJtoMyANonz(a_seq->i, a_seq->j, lu->bs, a_seq->a,
-                       lu->num_local_strucs, lu->num_local_nonz,  
-                       lu->global_struc_new_col_num, 
-                       lu->local_struc_old_num,
-                       PETSC_NULL,
-                       &my_a_nonz);
-      if (ierr <0) {
-        DSC_ErrorDisplay(lu->My_DSC_Solver);
-        SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error setting local nonzeroes at processor %d \n", lu->dsc_id);
-      }
-    }
-    if ( size>1 ) {ierr = MatDestroyMatrices(1,&tseq);CHKERRQ(ierr); }   
-  }
-  
-  if (lu->dsc_id != -1) {
-    ierr = DSC_NFactor(lu->My_DSC_Solver, lu->scheme_code, my_a_nonz, lu->factor_type, lu->LBLASLevel, lu->DBLASLevel);    
-    ierr = PetscFree(my_a_nonz);CHKERRQ(ierr);
-  }  
-  
-  if (size > 1) {
-    F_diag = ((Mat_MPIBAIJ *)(F)->data)->A;
-    F_diag->assembled = PETSC_TRUE;
-  }
-  F->assembled   = PETSC_TRUE; 
-  lu->flg           = SAME_NONZERO_PATTERN;
-  F->ops->solve                  = MatSolve_DSCPACK;
-
-  PetscFunctionReturn(0);
-}
-
-/* Note the Petsc permutation r is ignored */
-#undef __FUNCT__  
-#define __FUNCT__ "MatCholeskyFactorSymbolic_DSCPACK"
-PetscErrorCode MatCholeskyFactorSymbolic_DSCPACK(Mat F,Mat A,IS r,const MatFactorInfo *info) 
-{
-  Mat_DSCPACK    *lu = (Mat_DSCPACK*)(F)->spptr;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin; 
-  lu->My_DSC_Solver = DSC_Begin();
-  lu->CleanUpDSCPACK = PETSC_TRUE;
-  (F)->ops->choleskyfactornumeric  = MatCholeskyFactorNumeric_DSCPACK;
-  PetscFunctionReturn(0); 
-}
-
-
-EXTERN_C_BEGIN 
-#undef __FUNCT__  
-#define __FUNCT__ "MatFactorGetSolverPackage_seqaij_dscpack"
-PetscErrorCode MatFactorGetSolverPackage_seqaij_dscpack(Mat A,const MatSolverPackage *type)
-{
-  PetscFunctionBegin;
-  *type = MATSOLVERDSCPACK;
-  PetscFunctionReturn(0);
-}
-EXTERN_C_END
-  
-#undef __FUNCT__  
-#define __FUNCT__ "MatGetFactor_seqbaij_dscpack"
-PetscErrorCode MatGetFactor_seqbaij_dscpack(Mat A,MatFactorType ftype,Mat *F) 
-{
-  Mat            B;
-  Mat_DSCPACK    *lu;   
-  PetscErrorCode ierr;
-  PetscInt       bs,indx; 
-  PetscBool      flg;
-  const char     *ftype[]={"LDLT","LLT"},*ltype[]={"LBLAS1","LBLAS2","LBLAS3"},*dtype[]={"DBLAS1","DBLAS2"}; 
-
-  PetscFunctionBegin; 
-
-  /* Create the factorization matrix F */ 
-  ierr = MatGetBlockSize(A,&bs);
-  ierr = MatCreate(((PetscObject)A)->comm,&B);CHKERRQ(ierr);
-  ierr = MatSetSizes(B,A->rmap->n,A->cmap->n,A->rmap->N,A->cmap->N);CHKERRQ(ierr);
-  ierr = MatSetType(B,((PetscObject)A)->type_name);CHKERRQ(ierr);
-  ierr = MatSeqBAIJSetPreallocation(B,bs,0,PETSC_NULL);CHKERRQ(ierr);
-  ierr = MatMPIBAIJSetPreallocation(B,bs,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr);
-  ierr = PetscNewLog(B,Mat_DSCPACKPACK,&lu);CHKERRQ(ierr);    
-
-  B->ops->choleskyfactorsymbolic = MatCholeskyFactorSymbolic_DSCPACK;
-  B->ops->destroy                = MatDestroy_DSCPACK;
-  ierr = PetscObjectComposeFunctionDynamic((PetscObject)B,"MatFactorGetSolverPackage_C","MatFactorGetSolverPackage_seqaij_dscpack",MatFactorGetSolverPackage_seqaij_dscpack);CHKERRQ(ierr);
-  B->factortype                  = MAT_FACTOR_CHOLESKY;  
-
-  /* Set the default input options */
-  lu->order_code  = 2; 
-  lu->scheme_code = 1;
-  lu->factor_type = 2;
-  lu->stat        = 0; /* do not display stats */
-  lu->LBLASLevel  = DSC_LBLAS3;
-  lu->DBLASLevel  = DSC_DBLAS2;
-  lu->max_mem_allowed = 256;
-  ierr = MPI_Comm_dup(((PetscObject)A)->comm,&lu->comm_dsc);CHKERRQ(ierr);
-  /* Get the runtime input options */
-  ierr = PetscOptionsBegin(((PetscObject)A)->comm,((PetscObject)A)->prefix,"DSCPACK Options","Mat");CHKERRQ(ierr); 
-
-  ierr = PetscOptionsInt("-mat_dscpack_order","order_code: \n\
-         1 = ND, 2 = Hybrid with Minimum Degree, 3 = Hybrid with Minimum Deficiency", \
-         "None",
-         lu->order_code,&lu->order_code,PETSC_NULL);CHKERRQ(ierr);
-
-  ierr = PetscOptionsInt("-mat_dscpack_scheme","scheme_code: \n\
-         1 = standard factorization,  2 = factorization + selective inversion", \
-         "None",
-         lu->scheme_code,&lu->scheme_code,PETSC_NULL);CHKERRQ(ierr);
-  
-  ierr = PetscOptionsEList("-mat_dscpack_factor","factor_type","None",ftype,2,ftype[0],&indx,&flg);CHKERRQ(ierr);
-  if (flg) {
-    switch (indx) {
-    case 0:
-      lu->factor_type = DSC_LDLT;
-      break;
-    case 1:
-      lu->factor_type = DSC_LLT;
-      break;
-    }
-  }
-  ierr = PetscOptionsInt("-mat_dscpack_MaxMemAllowed","in Mbytes","None",
-         lu->max_mem_allowed,&lu->max_mem_allowed,PETSC_NULL);CHKERRQ(ierr);
-
-  ierr = PetscOptionsInt("-mat_dscpack_stats","display stats: 0 = no display,  1 = display",
-         "None", lu->stat,&lu->stat,PETSC_NULL);CHKERRQ(ierr);
-  
-  ierr = PetscOptionsEList("-mat_dscpack_LBLAS","BLAS level used in the local phase","None",ltype,3,ltype[2],&indx,&flg);CHKERRQ(ierr);
-  if (flg) {
-    switch (indx) {
-    case 0:
-      lu->LBLASLevel = DSC_LBLAS1;
-      break;
-    case 1:
-      lu->LBLASLevel = DSC_LBLAS2;
-      break;
-    case 2:
-      lu->LBLASLevel = DSC_LBLAS3;
-      break;
-    }
-  }
-
-  ierr = PetscOptionsEList("-mat_dscpack_DBLAS","BLAS level used in the distributed phase","None",dtype,2,dtype[1],&indx,&flg);CHKERRQ(ierr);
-  if (flg) {
-    switch (indx) {
-    case 0:
-      lu->DBLASLevel = DSC_DBLAS1;
-      break;
-    case 1:
-      lu->DBLASLevel = DSC_DBLAS2;
-      break;
-    }
-  }
-  PetscOptionsEnd();
-  lu->flg = DIFFERENT_NONZERO_PATTERN;
-  *F = B;
-  PetscFunctionReturn(0); 
-}
-
-#undef __FUNCT__  
-#define __FUNCT__ "MatFactorInfo_DSCPACK"
-PetscErrorCode MatFactorInfo_DSCPACK(Mat A,PetscViewer viewer)
-{
-  Mat_DSCPACK    *lu=(Mat_DSCPACK*)A->spptr;  
-  PetscErrorCode ierr;
-  const char     *s=0;
-  
-  PetscFunctionBegin;   
-  ierr = PetscViewerASCIIPrintf(viewer,"DSCPACK run parameters:\n");CHKERRQ(ierr);
-
-  switch (lu->order_code) {
-  case 1: s = "ND"; break;
-  case 2: s = "Hybrid with Minimum Degree"; break;
-  case 3: s = "Hybrid with Minimum Deficiency"; break;
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  order_code: %s \n",s);CHKERRQ(ierr);
-
-  switch (lu->scheme_code) {
-  case 1: s = "standard factorization"; break;
-  case 2: s = "factorization + selective inversion"; break;
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  scheme_code: %s \n",s);CHKERRQ(ierr);
-
-  switch (lu->stat) {
-  case 0: s = "NO"; break;
-  case 1: s = "YES"; break;
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  display stats: %s \n",s);CHKERRQ(ierr);
-  
-  if ( lu->factor_type == DSC_LLT) {
-    s = "LLT";
-  } else if ( lu->factor_type == DSC_LDLT){
-    s = "LDLT";
-  } else if (lu->factor_type == 0) {
-    s = "None";
-  } else {
-    SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Unknown factor type");
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  factor type: %s \n",s);CHKERRQ(ierr);
-
-  if ( lu->LBLASLevel == DSC_LBLAS1) {    
-    s = "BLAS1";
-  } else if ( lu->LBLASLevel == DSC_LBLAS2){
-    s = "BLAS2";
-  } else if ( lu->LBLASLevel == DSC_LBLAS3){
-    s = "BLAS3";
-  } else if (lu->LBLASLevel == 0) {
-    s = "None";
-  } else {
-    SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Unknown local phase BLAS level");
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  local phase BLAS level: %s \n",s);CHKERRQ(ierr);
-  
-  if ( lu->DBLASLevel == DSC_DBLAS1) {
-    s = "BLAS1";
-  } else if ( lu->DBLASLevel == DSC_DBLAS2){
-    s = "BLAS2";
-  } else if (lu->DBLASLevel == 0) {
-    s = "None";
-  } else {
-    SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Unknown distributed phase BLAS level");
-  }
-  ierr = PetscViewerASCIIPrintf(viewer,"  distributed phase BLAS level: %s \n",s);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-extern PetscErrorCode MatView_SeqBAIJ(Mat,PetscViewer);
-extern PetscErrorCode MatView_MPIBAIJ(Mat,PetscViewer);
-
-
-#undef __FUNCT__
-#define __FUNCT__ "MatView_DSCPACK"
-PetscErrorCode MatView_DSCPACK(Mat A,PetscViewer viewer) 
-{
-  PetscErrorCode    ierr;
-  PetscMPIInt       size;
-  PetscBool         iascii;
-  PetscViewerFormat format;
-  Mat_DSCPACK       *lu=(Mat_DSCPACK*)A->spptr;
-
-  PetscFunctionBegin;
-
-  /* This convertion ugliness is because MatView for BAIJ types calls MatConvert to AIJ */ 
-  size = lu->size;
-  if (size==1) {
-    ierr = MatView_SeqBAIJ(A,viewer);CHKERRQ(ierr);
-  } else {
-    ierr = MatView_MPIBAIJ(A,viewer);CHKERRQ(ierr);
-  }    
-
-  ierr = PetscTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&iascii);CHKERRQ(ierr);
-  if (iascii) {
-    ierr = PetscViewerGetFormat(viewer,&format);CHKERRQ(ierr);
-    if (format == PETSC_VIEWER_ASCII_INFO) {
-      ierr = MatFactorInfo_DSCPACK(A,viewer);CHKERRQ(ierr);
-    }
-  }
-  PetscFunctionReturn(0);
-}
-
-
-/*MC
-  MATSOLVERDSCPACK -  "dscpack" - Provides direct solvers (Cholesky) for sequential 
-  or distributed matrices via the external package DSCPACK.
-
-
-  Options Database Keys:
-+ -mat_dscpack_order <1,2,3> - DSCPACK ordering, 1:ND, 2:Hybrid with Minimum Degree, 3:Hybrid with Minimum Deficiency
-. -mat_dscpack_scheme <1,2> - factorization scheme, 1:standard factorization,  2: factorization with selective inversion
-. -mat_dscpack_factor <LLT,LDLT> - the type of factorization to be performed.
-. -mat_dscpack_MaxMemAllowed <n> - the maximum memory to be used during factorization
-. -mat_dscpack_stats <0,1> - display stats of the factorization and solves during MatDestroy(), 0: no display,  1: display
-. -mat_dscpack_LBLAS <LBLAS1,LBLAS2,LBLAS3> - BLAS level used in the local phase
-- -mat_dscpack_DBLAS <DBLAS1,DBLAS2> - BLAS level used in the distributed phase
-
-   Level: beginner
-
-.seealso: PCCHOLESKY, PCFactorSetMatSolverPackage(), MatSolverPackage
-
-M*/

File src/mat/impls/baij/mpi/dscpack/makefile

-
-#requirespackage   'PETSC_HAVE_DSCPACK'
-#requiresprecision double
-#requiresscalar    real
-
-ALL: lib
-
-CFLAGS   = ${DSCPACK_INCLUDE} -DF_NEEDS_UNDSC -DDBL_R_NUM
-FFLAGS   =
-SOURCEC	 = dscpack.c
-SOURCEF	 =
-SOURCEH	 = 
-OBJSC	 = dscpack.o
-OBJSF	 =
-LIBBASE	 = libpetscmat
-DIRS	 = 
-MANSEC	 = Mat
-LOCDIR	 = src/mat/impls/baij/mpi/dscpack/
-
-include ${PETSC_DIR}/conf/variables
-include ${PETSC_DIR}/conf/rules
-include ${PETSC_DIR}/conf/test

File src/mat/impls/baij/mpi/makefile

 OBJSC	 = mpibaij.o mmbaij.o baijov.o
 OBJSF	 =
 LIBBASE	 = libpetscmat
-DIRS	 = bstream dscpack
+DIRS	 = bstream
 MANSEC	 = Mat
 LOCDIR	 = src/mat/impls/baij/mpi/