Actual source code: plapack.c
1: /*$Id: dlregispetsc.c,v 1.14 2001/03/23 23:20:05 balay Exp $*/
3: #include petsc.h
4: #ifdef PETSC_HAVE_PLAPACK
5: #include "PLA.h"
6: #endif
8: /*@C
9: PetscPLAPACKInitializePackage - This function initializes everything in the Petsc interface to PLAPACK. It is
10: called from PetscDLLibraryRegister() when using dynamic libraries, and on the call to PetscInitialize()
11: when using static libraries.
13: Input Parameter:
14: path - The dynamic library path, or PETSC_NULL
16: Level: developer
18: .keywords: Petsc, initialize, package, PLAPACK
19: .seealso: PetscInitializePackage(), PetscInitialize()
20: @*/
21: int PetscPLAPACKInitializePackage(char *path) {
22: #ifdef PETSC_HAVE_PLAPACK
23: MPI_Comm comm;
24: int initPLA;
25: int ierr;
28: PLA_Initialized(&initPLA);
29: if (!initPLA) {
30: PLA_Comm_1D_to_2D_ratio(PETSC_COMM_WORLD, 1.0, &comm);
31: PLA_Init(comm);
32: }
33: return(0);
34: #else
36: return(0);
37: #endif
38: }
40: /*@C
41: PetscPLAPACKFinalizePackage - This function destroys everything in the Petsc interface to PLAPACK. It is
42: called from PetscFinalize().
44: Level: developer
46: .keywords: Petsc, destroy, package, PLAPACK
47: .seealso: PetscFinalize()
48: @*/
49: int PetscPLAPACKFinalizePackage(void) {
50: #ifdef PETSC_HAVE_PLAPACK
54: PLA_Finalize();
55: return(0);
56: #else
58: return(0);
59: #endif
60: }