Changeset 25336
- Timestamp:
- 08/01/20 20:45:26 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp
r24335 r25336 62 62 int numvertices=femmodel->vertices->NumberOfVertices(); 63 63 if(numvertices==0) return; 64 Vector<IssmDouble>* vec_mask_ice=new Vector<IssmDouble>(numvertices); 64 int numvertices_local=femmodel->vertices->NumberOfVerticesLocal(); 65 Vector<IssmDouble>* vec_mask_ice=new Vector<IssmDouble>(numvertices,numvertices_local); 65 66 66 67 /*Fill vector with values: */ -
issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
r23266 r25336 319 319 xDelete(valueX); 320 320 xDelete(indexX); 321 322 delete data; 321 323 } 322 324 /*}}}*/ … … 374 376 375 377 tape.pushExternalFunctionHandle(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete); 376 } else { 378 } 379 else{ 377 380 // if the tape is active valueX is stored in the dataHandler and deleted in the reverse sweep 378 381 xDelete(valueX); -
issm/trunk-jpl/src/c/toolkits/issm/IssmMpiVec.h
r24682 r25336 36 36 public: 37 37 38 bool isassembled; 38 39 int M; //global size 39 40 int m; //local number of rows … … 46 47 this->M=0; 47 48 this->m=0; 49 this->isassembled=false; 48 50 this->vector=NULL; 49 51 this->buckets=new DataSet(); … … 102 104 103 105 this->buckets=new DataSet(); 106 this->isassembled=false; 104 107 105 108 if(fromlocalsize){ … … 137 140 void Echo(void){/*{{{*/ 138 141 139 int i,j;140 141 142 /*Do a synchronized dump across all the rows: */ 142 for(i=0;i<IssmComm::GetSize();i++){ 143 int my_rank=IssmComm::GetRank(); 144 for(int i=0;i<IssmComm::GetSize();i++){ 145 if(my_rank==i){ 146 if(i==0) _printf_("Vector of global size M="<<this->M<<"\n"); 147 _printf_("cpu " << i << " #rows: " << this->m << "\n"); 148 if(this->isassembled){ 149 for(int j=0;j<this->m;j++){ 150 _printf_("row " << j << ": "<<this->vector[j]); 151 _printf_("\n"); 152 } 153 } 154 else{ 155 this->buckets->DeepEcho(); 156 } 157 } 143 158 ISSM_MPI_Barrier(IssmComm::GetComm()); 144 159 } … … 236 251 count=0; 237 252 for(i=0;i<num_procs;i++){ 238 sendcnts[i] =numvalues_forcpu[i];239 displs[i] =count;240 count +=numvalues_forcpu[i];253 sendcnts[i] = numvalues_forcpu[i]; 254 displs[i] = count; 255 count += numvalues_forcpu[i]; 241 256 } 242 257 … … 262 277 } 263 278 /*}}}*/ 279 this->isassembled=true; 264 280 265 281 /*Free ressources:{{{*/ -
issm/trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp
r23348 r25336 576 576 xDelete(valueX); 577 577 xDelete(indexX); 578 579 delete data; 578 580 } 579 581 /*}}}*/ … … 638 640 //tape.pushExternalFunction(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete); 639 641 tape.pushExternalFunctionHandle(&MumpsSolve_codi_b,(void*)dataHandler, &MumpsSolve_codi_delete); 640 } else { 642 } 643 else{ 641 644 // if the tape is active valueB is stored in the dataHandler and deleted in the reverse sweep 642 645 xDelete(valueB);
Note:
See TracChangeset
for help on using the changeset viewer.