Actual source code: plapack.c

 2:  #include petsc.h
  3: #ifdef PETSC_HAVE_PLAPACK
  5:   #include "PLA.h"
  7: #endif

 11: /*@C
 12:   PetscPLAPACKInitializePackage - This function initializes everything in the Petsc interface to PLAPACK. It is
 13:   called from PetscDLLibraryRegister() when using dynamic libraries, and on the call to PetscInitialize()
 14:   when using static libraries.

 16:   Input Parameter:
 17:   path - The dynamic library path, or PETSC_NULL

 19:   Level: developer

 21: .keywords: Petsc, initialize, package, PLAPACK
 22: .seealso: PetscInitializePackage(), PetscInitialize()
 23: @*/
 24: PetscErrorCode PetscPLAPACKInitializePackage(char *path)
 25: {
 26: #ifdef PETSC_HAVE_PLAPACK
 27:   MPI_Comm comm;
 28:   int      initPLA;

 32:   PLA_Initialized(&initPLA);
 33:   if (!initPLA) {
 34:     PLA_Comm_1D_to_2D_ratio(PETSC_COMM_WORLD, 1.0, &comm);
 35:     PLA_Init(comm);
 36:   }
 37:   return(0);
 38: #else
 40:   return(0);
 41: #endif
 42: }

 46: /*@C
 47:   PetscPLAPACKFinalizePackage - This function destroys everything in the Petsc interface to PLAPACK. It is
 48:   called from PetscFinalize().

 50:   Level: developer

 52: .keywords: Petsc, destroy, package, PLAPACK
 53: .seealso: PetscFinalize()
 54: @*/
 55: PetscErrorCode PetscPLAPACKFinalizePackage(void)
 56: {
 57: #ifdef PETSC_HAVE_PLAPACK

 61:   PLA_Finalize();
 62:   return(0);
 63: #else
 65:   return(0);
 66: #endif
 67: }