Changeset 14912
- Timestamp:
- 05/05/13 18:38:08 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/dakota/DakotaPlugin.cpp
r14907 r14912 28 28 #include "../../shared/MemOps/MemOps.h" 29 29 #include "../../solutions/DakotaSpawnCore.h" 30 31 30 32 31 #ifdef _HAVE_DAKOTA_ //only works if dakota library has been compiled in. -
issm/trunk-jpl/src/c/classes/objects/Bucket.h
r14904 r14912 168 168 int *modes_forcpu = NULL; 169 169 170 171 170 /*initialize buffers: */ 172 171 row_indices_forcpu=*prow_indices_forcpu; … … 208 207 int *modes_forcpu = NULL; 209 208 210 211 209 /*initialize buffers: */ 212 210 row_indices_forcpu=*prow_indices_forcpu; -
issm/trunk-jpl/src/c/classes/objects/Loads/Pengrid.cpp
r14838 r14912 734 734 /*Retrieve parameters*/ 735 735 parameters->FindParam(&penalty_factor,HydrologydcPenaltyFactorEnum); 736 736 737 737 /*Initialize Element matrix and return if necessary*/ 738 738 if(!this->active) return NULL; -
issm/trunk-jpl/src/c/include/macros.h
r14910 r14912 18 18 #endif 19 19 /*}}}*/ 20 21 20 22 21 /*Exceptions: */ -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
r14895 r14912 9 9 #include "../../classes/objects/objects.h" 10 10 #include "../ContourToNodesx/ContourToNodesx.h" 11 12 11 13 12 int InterpFromMesh2dx(IssmSeqVec<IssmPDouble>** pdata_prime, -
issm/trunk-jpl/src/c/shared/MemOps/MemOps.h
r14905 r14912 143 143 /*}}}*/ 144 144 145 146 145 #endif -
issm/trunk-jpl/src/c/solutions/solutions.h
r14907 r14912 62 62 void AdjointCorePointerFromSolutionEnum(void (**padjointcore)(FemModel*),int solutiontype); 63 63 64 65 64 #endif -
issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
r14911 r14912 18 18 #include <gsl/gsl_linalg.h> 19 19 #endif 20 21 20 22 21 /*}}}*/ … … 246 245 /*}}}*/ 247 246 #endif 248 -
issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h
r14910 r14912 25 25 26 26 #include <math.h> 27 28 27 29 28 /*}}}*/ … … 164 163 break; 165 164 166 167 165 default: 168 166 _error_("unknown norm !"); -
issm/trunk-jpl/src/c/toolkits/issm/IssmMat.h
r14904 r14912 201 201 #ifndef _HAVE_WRAPPERS_ 202 202 IssmVec<doubletype>* Solve(IssmVec<doubletype>* pf, Parameters* parameters){ /*{{{*/ 203 203 204 204 IssmVec<doubletype>* outvector=NULL; 205 205 -
issm/trunk-jpl/src/c/toolkits/issm/IssmMpiDenseMat.h
r14904 r14912 71 71 IssmMpiDenseMat(int min,int nin,int Min,int Nin,int* d_nnz,int* o_nnz){ 72 72 /*not needed, we are fully dense!: */ 73 73 74 74 this->buckets=new DataSet(); 75 75 … … 164 164 void Assemble(){ 165 165 166 167 166 int i,j; 168 167 … … 221 220 MPI_Scatter(numvalues_forcpu,1,MPI_INT,numvalues_fromcpu+i,1,MPI_INT,i,comm); 222 221 } 223 222 224 223 row_indices_fromcpu=xNew<int*>(num_procs); 225 224 col_indices_fromcpu=xNew<int*>(num_procs); … … 287 286 xDelete<doubletype>(values_forcpu); 288 287 xDelete<int>(numvalues_forcpu); 289 288 290 289 for(i=0;i<num_procs;i++){ 291 290 DataSet* buckets=bucketsforcpu[i]; … … 310 309 xDelete<doubletype*>(values_fromcpu); 311 310 xDelete<int>(numvalues_fromcpu); 312 311 313 312 xDelete<int>(sendcnts); 314 313 xDelete<int>(displs); 315 314 /*}}}*/ 316 317 315 318 316 } … … 351 349 break; 352 350 353 354 351 default: 355 352 _error_("unknown norm !"); … … 430 427 /*FUNCTION BucketsBuildScatterBuffers{{{*/ 431 428 void BucketsBuildScatterBuffers(int** pnumvalues_forcpu,int** prow_indices_forcpu,int** pcol_indices_forcpu,doubletype** pvalues_forcpu,int** pmodes_forcpu,DataSet** bucketsforcpu,int num_procs){ 432 433 429 434 430 /*intermediary: */ … … 453 449 for(i=0;i<num_procs;i++){ 454 450 DataSet *buckets = bucketsforcpu[i]; 455 451 456 452 count=0; 457 453 for(j=0;j<buckets->Size();j++){ … … 512 508 513 509 int i; 514 510 515 511 /*output: */ 516 512 IssmMpiVec<IssmDouble>* uf=NULL; -
issm/trunk-jpl/src/c/toolkits/issm/IssmMpiVec.h
r14904 r14912 146 146 void Assemble(){ 147 147 148 149 148 int i,j; 150 149 … … 175 174 MPI_Comm comm=IssmComm::GetComm(); 176 175 177 178 176 /*First, make a vector of size M, which for each row between 0 and M-1, tells which cpu this row belongs to: */ 179 177 RowRank=DetermineRowRankFromLocalSize(M,m,comm); 180 181 178 182 179 /*Now, sort out our dataset of buckets according to cpu ownership of rows: {{{*/ … … 206 203 } 207 204 208 209 205 row_indices_fromcpu=xNew<int*>(num_procs); 210 206 values_fromcpu=xNew<doubletype*>(num_procs); … … 266 262 xDelete<doubletype>(values_forcpu); 267 263 xDelete<int>(numvalues_forcpu); 268 264 269 265 for(i=0;i<num_procs;i++){ 270 266 DataSet* buckets=bucketsforcpu[i]; … … 286 282 xDelete<doubletype*>(values_fromcpu); 287 283 xDelete<int>(numvalues_fromcpu); 288 284 289 285 xDelete<int>(sendcnts); 290 286 xDelete<int>(displs); 291 287 /*}}}*/ 292 293 288 294 289 } … … 518 513 void BucketsBuildScatterBuffers(int** pnumvalues_forcpu,int** prow_indices_forcpu,doubletype** pvalues_forcpu,int** pmodes_forcpu,DataSet** bucketsforcpu,int num_procs){ 519 514 520 521 515 /*intermediary: */ 522 516 int i,j; … … 538 532 for(i=0;i<num_procs;i++){ 539 533 DataSet *buckets = bucketsforcpu[i]; 540 534 541 535 count=0; 542 536 for(j=0;j<buckets->Size();j++){ -
issm/trunk-jpl/src/c/toolkits/mpi/mpiincludes.h
r14897 r14912 12 12 #include "./patches/mpipatches.h" 13 13 14 15 14 #endif -
issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp
r14861 r14912 25 25 MPI_Comm_rank(comm,&my_rank); 26 26 MPI_Comm_size(comm,&num_procs); 27 28 27 29 28 /* TODO replace the following with -> -
issm/trunk-jpl/src/c/toolkits/mumps/MpiDenseMumpsSolve.cpp
r14904 r14912 10 10 #endif 11 11 12 13 12 #include "../../include/types.h" 14 13 #include "../../include/macros.h" … … 21 20 #include "dmumps_c.h" 22 21 23 24 22 #define JOB_INIT -1 25 23 #define JOB_SOLVE 6 … … 30 28 31 29 /*Variables: {{{*/ 32 33 30 34 31 MPI_Comm comm; … … 72 69 id.icntl[5-1] = 0; 73 70 id.icntl[18-1] = 3; 74 71 75 72 id.icntl[20-1] = 0; 76 73 id.icntl[21-1] = 0; … … 93 90 id.nz_loc=local_nnz; 94 91 95 96 92 /*Allocate: */ 97 93 if(local_nnz){ … … 100 96 a_loc=xNew<IssmPDouble>(local_nnz); 101 97 } 102 98 103 99 /*Populate the triplets: */ 104 100 GetOwnershipBoundariesFromRange(&lower_row,&upper_row,Kff_m,comm); … … 118 114 id.a_loc=a_loc; 119 115 120 121 116 /*Deal with right hand side. We need to MPI_Gather it onto cpu 0: */ 122 117 rhs=xNew<IssmPDouble>(pf_M); … … 127 122 /*recvcounts:*/ 128 123 MPI_Allgather(&pf_m,1,MPI_INT,recvcounts,1,MPI_INT,comm); 129 124 130 125 /*displs: */ 131 126 MPI_Allgather(&lower_row,1,MPI_INT,displs,1,MPI_INT,comm);
Note:
See TracChangeset
for help on using the changeset viewer.