Changeset 13598
- Timestamp:
- 10/10/12 22:32:31 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/toolkits
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp
r13595 r13598 18 18 /*Function prototypes: */ 19 19 int MatMultCompatible(Mat A,Vec x,COMM comm); 20 void VecRelocalize(Vec* outvector,Vec vector,int m );20 void VecRelocalize(Vec* outvector,Vec vector,int m,COMM comm); 21 21 22 22 void MatMultPatch(Mat A,Vec X, Vec AX,COMM comm){ //same prototype as MatMult in Petsc … … 32 32 else{ 33 33 MatGetLocalSize(A,&m,&n);; 34 VecRelocalize(&X_rel,X,n );34 VecRelocalize(&X_rel,X,n,comm); 35 35 MatMult(A,X_rel,AX); ; 36 36 #if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2) … … 69 69 } 70 70 71 void VecRelocalize(Vec* poutvector,Vec vector,int m ){71 void VecRelocalize(Vec* poutvector,Vec vector,int m,COMM comm){ 72 72 73 73 /*vector index and vector values*/ … … 80 80 81 81 /*Create outvector with local size m*/ 82 VecCreate( PETSC_COMM_WORLD,&outvector); ;82 VecCreate(comm,&outvector); ; 83 83 VecSetSizes(outvector,m,PETSC_DECIDE); ; 84 84 VecSetFromOptions(outvector); ; -
issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
r13056 r13598 15 15 void PlapackInvertMatrixLocalCleanup(PLA_Obj* pa,PLA_Template* ptempl,double** parrayA,int** pidxnA,MPI_Comm* pcomm_2d); 16 16 17 int PlapackInvertMatrix(Mat* A,Mat* inv_A,int status,int con ){17 int PlapackInvertMatrix(Mat* A,Mat* inv_A,int status,int con,COMM comm){ 18 18 /*inv_A does not yet exist, inv_A was just allocated, that's all*/ 19 19 … … 76 76 if(PLA_Initialized(NULL)==TRUE)PLA_Finalize(); 77 77 /* Create a 2D communicator */ 78 PLA_Comm_1D_to_2D( MPI_COMM_WORLD,nprows,npcols,&comm_2d);78 PLA_Comm_1D_to_2D(comm,nprows,npcols,&comm_2d); 79 79 80 80 /*Initlialize plapack: */ -
issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp
r12431 r13598 6 6 #include "../plapackincludes.h" 7 7 8 int PlapackToPetsc(Mat* A,int local_mA,int local_nA,int mA,int nA,MatType type,PLA_Obj a,PLA_Template templ,int nprows,int npcols,int nb ){8 int PlapackToPetsc(Mat* A,int local_mA,int local_nA,int mA,int nA,MatType type,PLA_Obj a,PLA_Template templ,int nprows,int npcols,int nb,COMM comm){ 9 9 10 10 … … 28 28 d_nz=nA/2; 29 29 o_nz=nA/2; 30 MatCreateMPIAIJ( MPI_COMM_WORLD,local_mA,local_nA, mA,nA,d_nz,PETSC_NULL,o_nz,PETSC_NULL,A);30 MatCreateMPIAIJ(comm,local_mA,local_nA, mA,nA,d_nz,PETSC_NULL,o_nz,PETSC_NULL,A); 31 31 } 32 32 else if(strcasecmp_eq(type,MATMPIDENSE)){ 33 MatCreateMPIDense( MPI_COMM_WORLD,local_mA,local_nA, mA,nA,PETSC_NULL,A);33 MatCreateMPIDense(comm,local_mA,local_nA, mA,nA,PETSC_NULL,A); 34 34 } 35 35 -
issm/trunk-jpl/src/c/toolkits/plapack/patches/plapackpatches.h
r831 r13598 6 6 #define _PLAPACK_PATCHES_H_ 7 7 8 int PlapackInvertMatrix(Mat* A,Mat* inv_A,int status,int con );9 int PlapackToPetsc(Mat* A,int local_mA,int local_nA,int mA,int nA,MatType type,PLA_Obj a,PLA_Template templ,int nprows,int npcols,int nb );8 int PlapackInvertMatrix(Mat* A,Mat* inv_A,int status,int con,COMM comm); 9 int PlapackToPetsc(Mat* A,int local_mA,int local_nA,int mA,int nA,MatType type,PLA_Obj a,PLA_Template templ,int nprows,int npcols,int nb,COMM comm); 10 10 int CyclicalFactorization(int* pnprows,int* pnpcols,int num_procs); 11 11
Note:
See TracChangeset
for help on using the changeset viewer.