Changeset 15839
- Timestamp:
- 08/19/13 15:42:21 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/Makefile.am ¶
r15838 r15839 172 172 ./shared/io/Print/PrintfFunction.cpp\ 173 173 ./shared/io/Print/Print.h\ 174 ./shared/io/Comm/Comm.h\175 174 ./shared/io/Comm/IssmComm.h\ 176 175 ./shared/io/Comm/IssmComm.cpp\ -
TabularUnified issm/trunk-jpl/src/c/analyses/EnvironmentInit.cpp ¶
r15838 r15839 10 10 #include "../toolkits/toolkits.h" 11 11 12 COMMEnvironmentInit(int argc,char** argv){12 ISSM_MPI_Comm EnvironmentInit(int argc,char** argv){ 13 13 14 14 /*Output*/ 15 COMMcomm = 0;15 ISSM_MPI_Comm comm = 0; 16 16 17 17 /*Initialize MPI environment: */ -
TabularUnified issm/trunk-jpl/src/c/analyses/analyses.h ¶
r15771 r15839 13 13 template <class doubletype> class Vector; 14 14 15 #include "../shared/io/Comm/ Comm.h"15 #include "../shared/io/Comm/IssmComm.h" 16 16 #include "../shared/Numerics/types.h" 17 17 … … 46 46 void WriteLockFile(char* filename); 47 47 void ResetBoundaryConditions(FemModel* femmodel, int analysis_type); 48 COMMEnvironmentInit(int argc,char** argv);48 ISSM_MPI_Comm EnvironmentInit(int argc,char** argv); 49 49 void EnvironmentFinalize(void); 50 50 void PrintBanner(void); -
TabularUnified issm/trunk-jpl/src/c/classes/FemModel.cpp ¶
r15838 r15839 41 41 42 42 /*Object constructors and destructor*/ 43 /*FUNCTION FemModel::FemModel(int argc,char** argv, COMMincomm){{{*/44 FemModel::FemModel(int argc,char** argv, COMMincomm){43 /*FUNCTION FemModel::FemModel(int argc,char** argv,ISSM_MPI_Comm incomm){{{*/ 44 FemModel::FemModel(int argc,char** argv,ISSM_MPI_Comm incomm){ 45 45 46 46 /*configuration: */ -
TabularUnified issm/trunk-jpl/src/c/classes/FemModel.h ¶
r15249 r15839 43 43 Parameters *parameters; //one set of parameters, independent of the analysis_type 44 44 Results *results; //results that cannot be fit into the elements 45 COMMcomm; //communicator for this particular model45 ISSM_MPI_Comm comm; //communicator for this particular model 46 46 47 47 /*constructors, destructors: */ 48 FemModel(int argc,char** argv, COMMcomm_init);48 FemModel(int argc,char** argv,ISSM_MPI_Comm comm_init); 49 49 FemModel(char* rootpath, char* inputfilename, char* outputfilename, char* petscfilename, char* lockfilename, const int solution_type,const int* analyses,const int nummodels); 50 50 ~FemModel(); -
TabularUnified issm/trunk-jpl/src/c/main/globals.h ¶
r15728 r15839 6 6 #define _GLOBALS_H_ 7 7 8 #include "../shared/io/Comm/ Comm.h"8 #include "../shared/io/Comm/IssmComm.h" 9 9 #include "../toolkits/ToolkitOptions.h" 10 10 11 11 /*Communicators: */ 12 COMMIssmComm::comm;12 ISSM_MPI_Comm IssmComm::comm; 13 13 bool IssmComm::parallel; 14 14 -
TabularUnified issm/trunk-jpl/src/c/main/issm.cpp ¶
r14921 r15839 11 11 12 12 /*Initialize environment (MPI, PETSC, MUMPS, etc ...)*/ 13 COMMcomm_init=EnvironmentInit(argc,argv);13 ISSM_MPI_Comm comm_init=EnvironmentInit(argc,argv); 14 14 15 15 /*Initialize femmodel from arguments provided command line: */ -
TabularUnified issm/trunk-jpl/src/c/main/kriging.cpp ¶
r15782 r15839 39 39 40 40 /*Initialize environment (MPI, PETSC, MUMPS, etc ...)*/ 41 COMMcomm=EnvironmentInit(argc,argv);41 ISSM_MPI_Comm comm=EnvironmentInit(argc,argv); 42 42 IssmComm::SetComm(comm); 43 43 -
TabularUnified issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp ¶
r15104 r15839 11 11 #include "./exceptions.h" 12 12 #include "../io/Print/Print.h" 13 #include "../io/Comm/ Comm.h"13 #include "../io/Comm/IssmComm.h" 14 14 15 15 ErrorException::ErrorException(const string &what_arg){/*{{{*/ -
TabularUnified issm/trunk-jpl/src/c/shared/io/Comm/IssmComm.cpp ¶
r15838 r15839 13 13 #include "../../Exceptions/exceptions.h" 14 14 15 void IssmComm::SetComm(ISSM_MPI_C OMMincomm){ /*{{{*/15 void IssmComm::SetComm(ISSM_MPI_Comm incomm){ /*{{{*/ 16 16 17 17 /*A comm is provided, we are running in parallel (this is not a module)*/ … … 28 28 29 29 }/*}}}*/ 30 ISSM_MPI_C OMMIssmComm::GetComm(){ /*{{{*/30 ISSM_MPI_Comm IssmComm::GetComm(){ /*{{{*/ 31 31 if(!parallel) _error_("Cannot return comm in serial mode"); 32 32 return comm; -
TabularUnified issm/trunk-jpl/src/c/shared/io/Comm/IssmComm.h ¶
r15838 r15839 14 14 #endif 15 15 16 #include ". /CommDef.h"16 #include "../../../toolkits/mpi/issmmpi.h" 17 17 18 18 /*}}}*/ … … 25 25 26 26 public: 27 static void SetComm(ISSM_MPI_C OMMincomm);27 static void SetComm(ISSM_MPI_Comm incomm); 28 28 static void SetComm(void); 29 static ISSM_MPI_C OMMGetComm(void);29 static ISSM_MPI_Comm GetComm(void); 30 30 static int GetRank(void); 31 31 static int GetSize(void); -
TabularUnified issm/trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp ¶
r15660 r15839 4 4 #include <cstdio> 5 5 #include "../../Exceptions/exceptions.h" 6 #include "../Comm/ Comm.h"6 #include "../Comm/IssmComm.h" 7 7 #include "../Print/Print.h" 8 8 #include <cstdio> -
TabularUnified issm/trunk-jpl/src/c/shared/io/Disk/pfopen.cpp ¶
r15838 r15839 11 11 #include <stdio.h> 12 12 #include "../Print/Print.h" 13 #include "../Comm/ Comm.h"13 #include "../Comm/IssmComm.h" 14 14 #include "../../Exceptions/exceptions.h" 15 15 -
TabularUnified issm/trunk-jpl/src/c/shared/io/Print/PrintfFunction.cpp ¶
r15164 r15839 16 16 #endif 17 17 #include "./Print.h" 18 #include "../Comm/ Comm.h"18 #include "../Comm/IssmComm.h" 19 19 #include "../../String/sharedstring.h" 20 20 #include "../../MemOps/MemOps.h" -
TabularUnified issm/trunk-jpl/src/c/shared/io/io.h ¶
r14910 r15839 14 14 #include "./Disk/diskio.h" 15 15 #include "./Print/Print.h" 16 #include "./Comm/ Comm.h"16 #include "./Comm/IssmComm.h" 17 17 18 18 #endif /* _IO_H_ */ -
TabularUnified issm/trunk-jpl/src/c/toolkits/issm/IssmToolkitUtils.cpp ¶
r15048 r15839 12 12 13 13 #include "../../shared/MemOps/MemOps.h" 14 #include "../../shared/io/Comm/ Comm.h"14 #include "../../shared/io/Comm/IssmComm.h" 15 15 #include "../../shared/Enum/Enum.h" 16 16 #include "../../shared/Exceptions/exceptions.h" -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/commops/DetermineGlobalSize.cpp ¶
r15838 r15839 8 8 #include "../../../shared/Numerics/types.h" 9 9 10 int DetermineGlobalSize(int local_size, COMMcomm){10 int DetermineGlobalSize(int local_size,ISSM_MPI_Comm comm){ 11 11 12 12 /*output: */ -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/commops/DetermineLocalSize.cpp ¶
r15838 r15839 7 7 #include "../../../shared/shared.h" 8 8 9 int DetermineLocalSize(int global_size, COMMcomm){9 int DetermineLocalSize(int global_size,ISSM_MPI_Comm comm){ 10 10 11 11 /*output: */ -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/commops/DetermineRowRankFromLocalSize.cpp ¶
r15838 r15839 10 10 #include "../../../shared/Numerics/types.h" 11 11 12 int* DetermineRowRankFromLocalSize(int global_size,int localsize, COMMcomm){12 int* DetermineRowRankFromLocalSize(int global_size,int localsize,ISSM_MPI_Comm comm){ 13 13 14 14 /*intermediary: */ -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp ¶
r15838 r15839 12 12 #include <stdio.h> 13 13 #include "../../../shared/MemOps/MemOps.h" 14 #include "../../../shared/io/Comm/ Comm.h"14 #include "../../../shared/io/Comm/IssmComm.h" 15 15 16 void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range, COMMcomm){16 void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range,ISSM_MPI_Comm comm){ 17 17 18 18 /*externals :*/ -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/commops/commops.h ¶
r15834 r15839 7 7 8 8 #include "../../../shared/Numerics/types.h" 9 #include "../../../shared/io/Comm/Comm.h" 9 #include "../../../shared/io/Comm/IssmComm.h" 10 #include "../../mpi/issmmpi.h" 10 11 11 int DetermineLocalSize(int global_size, COMMcomm);12 int* DetermineRowRankFromLocalSize(int global_size,int localsize, COMMcomm);13 void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range, COMMcomm);14 int DetermineGlobalSize(int local_size, COMMcomm);12 int DetermineLocalSize(int global_size,ISSM_MPI_Comm comm); 13 int* DetermineRowRankFromLocalSize(int global_size,int localsize,ISSM_MPI_Comm comm); 14 void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range,ISSM_MPI_Comm comm); 15 int DetermineGlobalSize(int local_size,ISSM_MPI_Comm comm); 15 16 16 17 #endif -
TabularUnified issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h ¶
r15836 r15839 20 20 #include <mpi.h> 21 21 #endif 22 #include "./commops/commops.h"23 22 /*}}}*/ 24 23 /*MPI defines: *{{{*/ … … 50 49 #define ISSM_MPI_ANY_TAG MPI_ANY_TAG 51 50 #define ISSM_MPI_ANY_SOURCE MPI_ANY_SOURCE 51 52 /*other include files: */ 53 #include "./commops/commops.h" 52 54 /*}}}*/ 53 55 #else -
TabularUnified issm/trunk-jpl/src/c/toolkits/mumps/MpiDenseMumpsSolve.cpp ¶
r15838 r15839 13 13 #include "../../shared/MemOps/MemOps.h" 14 14 #include "../../shared/Exceptions/exceptions.h" 15 #include "../../shared/io/Comm/ Comm.h"15 #include "../../shared/io/Comm/IssmComm.h" 16 16 #include "../mpi/issmmpi.h" 17 17 -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp ¶
r15564 r15839 13 13 #include "../../../shared/MemOps/MemOps.h" 14 14 #include "../../../shared/Exceptions/exceptions.h" 15 #include "../../../shared/io/Comm/ Comm.h"15 #include "../../../shared/io/Comm/IssmComm.h" 16 16 #include "../../../shared/Enum/Enum.h" 17 17 -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp ¶
r15838 r15839 18 18 19 19 /*Function prototypes: */ 20 int MatMultCompatible(Mat A,Vec x, COMMcomm);21 void VecRelocalize(Vec* outvector,Vec vector,int m, COMMcomm);20 int MatMultCompatible(Mat A,Vec x,ISSM_MPI_Comm comm); 21 void VecRelocalize(Vec* outvector,Vec vector,int m,ISSM_MPI_Comm comm); 22 22 23 void MatMultPatch(Mat A,Vec X, Vec AX, COMMcomm){ //same prototype as MatMult in Petsc23 void MatMultPatch(Mat A,Vec X, Vec AX,ISSM_MPI_Comm comm){ //same prototype as MatMult in Petsc 24 24 25 25 int m,n; … … 43 43 } 44 44 45 int MatMultCompatible(Mat A,Vec x, COMMcomm){45 int MatMultCompatible(Mat A,Vec x,ISSM_MPI_Comm comm){ 46 46 47 47 /*error management*/ … … 73 73 } 74 74 75 void VecRelocalize(Vec* poutvector,Vec vector,int m, COMMcomm){75 void VecRelocalize(Vec* poutvector,Vec vector,int m,ISSM_MPI_Comm comm){ 76 76 77 77 /*vector index and vector values*/ -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/MatToSerial.cpp ¶
r15838 r15839 12 12 #include "../../../shared/shared.h" 13 13 14 void MatToSerial(double** poutmatrix,Mat matrix, COMMcomm){14 void MatToSerial(double** poutmatrix,Mat matrix,ISSM_MPI_Comm comm){ 15 15 16 16 int i; -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp ¶
r15838 r15839 19 19 20 20 /*NewMat(int M,int N){{{*/ 21 Mat NewMat(int M,int N, COMMcomm){21 Mat NewMat(int M,int N,ISSM_MPI_Comm comm){ 22 22 23 23 /*output:*/ … … 46 46 } 47 47 /*}}}*/ 48 /*NewMat(int M,int N,double sparsity, COMMcomm){{{*/49 Mat NewMat(int M,int N,double sparsity, COMMcomm){48 /*NewMat(int M,int N,double sparsity,ISSM_MPI_Comm comm){{{*/ 49 Mat NewMat(int M,int N,double sparsity,ISSM_MPI_Comm comm){ 50 50 51 51 /*output:*/ … … 80 80 /*}}}*/ 81 81 /*NewMat(int M,int N,int connectivity,int numberofdofspernode){{{*/ 82 Mat NewMat(int M,int N,int connectivity,int numberofdofspernode, COMMcomm){82 Mat NewMat(int M,int N,int connectivity,int numberofdofspernode,ISSM_MPI_Comm comm){ 83 83 84 84 /*output:*/ -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/NewVec.cpp ¶
r15838 r15839 17 17 #include "../../mpi/issmmpi.h" 18 18 19 Vec NewVec(int size, COMMcomm,bool fromlocalsize){19 Vec NewVec(int size,ISSM_MPI_Comm comm,bool fromlocalsize){ 20 20 21 21 int local_size; -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/VecToMPISerial.cpp ¶
r15838 r15839 12 12 #include "../../../shared/shared.h" 13 13 14 int VecToMPISerial(double** pgathered_vector, Vec vector, COMMcomm){14 int VecToMPISerial(double** pgathered_vector, Vec vector,ISSM_MPI_Comm comm){ 15 15 16 16 int i; -
TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h ¶
r15272 r15839 13 13 #include "./SolverEnum.h" 14 14 #include "../../toolkitsenums.h" 15 #include "../../../shared/io/Comm/ Comm.h"15 #include "../../../shared/io/Comm/IssmComm.h" 16 16 17 17 class Parameters; 18 18 19 Vec NewVec(int size, COMMcomm,bool fromlocalsize=false);20 Mat NewMat(int M,int N, COMMcomm);21 Mat NewMat(int M,int N,double sparsity, COMMcomm);22 Mat NewMat(int M,int N,int connectivity,int numberofdofspernode, COMMcomm);19 Vec NewVec(int size,ISSM_MPI_Comm comm,bool fromlocalsize=false); 20 Mat NewMat(int M,int N,ISSM_MPI_Comm comm); 21 Mat NewMat(int M,int N,double sparsity,ISSM_MPI_Comm comm); 22 Mat NewMat(int M,int N,int connectivity,int numberofdofspernode, ISSM_MPI_Comm comm); 23 23 24 int VecToMPISerial(double** pgathered_vector, Vec vector, COMMcomm);24 int VecToMPISerial(double** pgathered_vector, Vec vector,ISSM_MPI_Comm comm); 25 25 void MatFree(Mat* pmat); 26 26 void ISFree(IS* pis); … … 32 32 void PetscOptionsDetermineSolverType(int* psolver_type); 33 33 void VecMerge(Vec A, Vec B, double* row_partition_vector,int row_partition_size); 34 void MatMultPatch(Mat A,Vec X, Vec AX, COMMcomm);35 void MatToSerial(double** poutmatrix,Mat matrix, COMMcomm);34 void MatMultPatch(Mat A,Vec X, Vec AX,ISSM_MPI_Comm comm); 35 void MatToSerial(double** poutmatrix,Mat matrix,ISSM_MPI_Comm comm); 36 36 void VecDuplicatePatch(Vec* output, Vec input); 37 37 Vec SerialToVec(double* vector,int vector_size);
Note:
See TracChangeset
for help on using the changeset viewer.