Changeset 182
- Timestamp:
- 04/20/11 18:34:34 (14 years ago)
- Location:
- XMLIO_V2/dev/dev_rv
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/Makefile.wk
r179 r182 15 15 VTK = no 16 16 GUI = no 17 NPROC = 1217 NPROC = 3 18 18 CSUITE = intel 19 19 PFORME = fedora-wk … … 22 22 23 23 ifeq ($(HOSTNAME), lsce4063.extra.cea.fr) 24 PFORME 24 PFORME = fedora-wk 25 25 endif 26 26 27 27 ifeq ($(HOST), mercure01) 28 CSUITE 29 PFORME 28 CSUITE = sx 29 PFORME = sx8-mercure-wk 30 30 endif 31 31 -
XMLIO_V2/dev/dev_rv/src/xmlio/array.hpp
r168 r182 36 36 37 37 public: 38 38 39 39 /// Flux /// 40 40 template <typename U, StdSize V, typename W> … … 47 47 48 48 public: 49 49 50 50 void toBinary (StdOStream & os) const; 51 51 void fromBinary(StdIStream & is); -
XMLIO_V2/dev/dev_rv/src/xmlio/array_mac.hpp
r152 r182 8 8 9 9 #define ARRAY_ASSIGN(value, valuetype, numdims, extent)\ 10 value = ARRAY(valuetype, numdims)(new CArray<valuetype, numdims>(boost::extents extent))10 value.reset(new CArray<valuetype, numdims>(boost::extents extent)) 11 11 12 12 #define ARRAY_CREATE(value, valuetype, numdims, extent)\ 13 ARRAY_ASSIGN(ARRAY(valuetype, numdims) value, valuetype, numdims, extent) 13 ARRAY(valuetype, numdims) value = \ 14 ARRAY(valuetype, numdims)(new CArray<valuetype, numdims>(boost::extents extent)) 14 15 15 16 // Type C -
XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template_impl.hpp
r173 r182 50 50 template <class T> 51 51 CAttributeTemplate<T>::~CAttributeTemplate(void) 52 { /* Ne rien faire de plus */ } 52 { 53 this->clear(); 54 } 53 55 54 56 ///-------------------------------------------------------------- -
XMLIO_V2/dev/dev_rv/src/xmlio/fortran/impi_interface.f90
r152 r182 83 83 INTEGER (kind = C_INT) :: datatype, count, err 84 84 INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status 85 CALL MPI_GET_COUNT(status, datatype, count, err) 85 86 ! ATTTENTION GROS BUG ICI SOUS GNU MAIS PAS INTEL ???????? voir datatype 87 ! PRINT *, datatype, MPI_CHARACTER 88 CALL MPI_GET_COUNT(status, MPI_CHARACTER, count, err) 86 89 END SUBROUTINE xios_mpi_get_count 87 90 -
XMLIO_V2/dev/dev_rv/src/xmlio/manager/mpi_manager.cpp
r179 r182 129 129 130 130 void CMPIManager::FreeMem(void * data) 131 { MPI_Free_mem(data); } 131 { 132 MPI_Free_mem(data); 133 } 132 134 133 135 //-------------------------------------------------------------- -
XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp
r180 r182 16 16 , isChecked(false), local_mask(new CMask()), relFiles() 17 17 , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 18 , lonvalue_sub(), latvalue_sub() 18 19 { /* Ne rien faire de plus */ } 19 20 … … 22 23 , isChecked(false), local_mask(new CMask()), relFiles() 23 24 , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 25 , lonvalue_sub(), latvalue_sub() 24 26 { /* Ne rien faire de plus */ } 25 27 26 28 CDomain::~CDomain(void) 27 { /* Ne rien faire de plus */ } 29 { 30 this->local_mask.reset(); 31 for (StdSize i = 0; i < this->lonvalue_sub.size(); i++) 32 { 33 this->lonvalue_sub[i].reset(); 34 this->latvalue_sub[i].reset(); 35 } 36 } 28 37 29 38 ///--------------------------------------------------------------- … … 57 66 this->jbegin_sub.push_back(this->jbegin.getValue()); 58 67 this->iend_sub.push_back(this->iend.getValue()); 59 this->jend_sub.push_back(this->jend.getValue()); 68 this->jend_sub.push_back(this->jend.getValue()); 69 70 this->latvalue_sub.push_back(this->latvalue.getValue()); 71 this->lonvalue_sub.push_back(this->lonvalue.getValue()); 60 72 61 73 #define CLEAR_ATT(name_)\ … … 75 87 CLEAR_ATT(nj); 76 88 77 CLEAR_ATT(latvalue);78 CLEAR_ATT(lonvalue);79 89 #undef CLEAR_ATT 80 90 … … 83 93 this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end())); 84 94 this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end())); 85 86 this->checkGlobalDomain();87 this->checkLocalIDomain();88 this->checkLocalJDomain();89 this->completeMask();90 91 this->isChecked = true;92 95 } 93 96 … … 201 204 (*__arr)[i][j] = true; 202 205 mask.setValue(__arr); 206 __arr.reset(); 203 207 } 204 208 } … … 309 313 310 314 for(int count = 0, i = 0; i < data_ni.getValue(); i++) 315 { 311 316 for(int j = 0; j < data_nj.getValue(); j++, count++) 312 317 { … … 314 319 (*__arrj)[count] = j+1 ; 315 320 } 321 } 322 data_i_index.setValue(__arri) ; 323 data_j_index.setValue(__arrj) ; 324 __arri.reset(); 325 __arrj.reset(); 326 } 327 } 328 } 329 330 //---------------------------------------------------------------- 331 332 void CDomain::completeLonLat(void) 333 { 334 ARRAY(double, 1) lonvalue_ = this->lonvalue.getValue(), 335 latvalue_ = this->latvalue.getValue(); 336 337 if (this->data_dim.getValue() == 2) 338 { 339 StdSize dn = this->ni.getValue()*this->nj.getValue(); 340 lonvalue_->resize(boost::extents[dn]); 341 latvalue_->resize(boost::extents[dn]); 342 343 for (StdSize k = 0; k < lonvalue_sub.size(); k++) 344 { 345 int l = 0; 346 ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k], 347 latvalue_loc = this->latvalue_sub[k]; 348 const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k], 349 jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k]; 350 351 for (int i = ibegin_loc-1; i <= (iend_loc-1); i++) 352 { 353 for (int j = jbegin_loc-1; j <= (jend_loc-1); j++) 354 { 355 (*lonvalue_)[i+j*this->ni.getValue()] = (*lonvalue_loc)[l]; 356 (*latvalue_)[i+j*this->ni.getValue()] = (*latvalue_loc)[l++]; 357 } 358 } 359 } 360 361 } 362 else 363 { 364 StdSize dn = this->ni.getValue(); 365 lonvalue_->resize(boost::extents[dn]); 366 latvalue_->resize(boost::extents[dn]); 367 368 for (StdSize k = 0; k < lonvalue_sub.size(); k++) 369 { 370 int l = 0; 371 ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k], 372 latvalue_loc = this->latvalue_sub[k]; 373 const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k], 374 jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k]; 375 376 for (int i = ibegin_loc-1; i <= (iend_loc-1); i++) 377 (*lonvalue_)[i] = (*lonvalue_loc)[l++]; 316 378 317 data_i_index.setValue(__arri) ;318 data_j_index.setValue(__arrj);319 } 379 for (int j = jbegin_loc-1, l = 0; j <= (jend_loc-1); j++) 380 (*latvalue_)[j] = (*latvalue_loc)[l++]; 381 } 320 382 } 321 383 } … … 331 393 this->checkLocalJDomain(); 332 394 333 this->checkMask(); 334 this->checkDomainData(); 335 this->checkCompression(); 395 if (this->latvalue_sub.size() == 0) 396 { 397 this->checkMask(); 398 this->checkDomainData(); 399 this->checkCompression(); 400 } 401 else 402 { 403 this->completeLonLat(); 404 } 336 405 this->completeMask(); 337 406 338 407 this->isChecked = true; 339 408 } 340 409 410 //---------------------------------------------------------------- 411 341 412 void CDomain::completeMask(void) 342 413 { … … 348 419 } 349 420 421 //---------------------------------------------------------------- 422 350 423 boost::shared_ptr<CMask> CDomain::getLocalMask(void) const 351 424 { 352 425 return (this->local_mask); 353 426 } 427 428 //---------------------------------------------------------------- 429 430 const std::vector<int> & CDomain::getIBeginSub(void) const 431 { 432 return (this->ibegin_sub); 433 } 434 435 //---------------------------------------------------------------- 436 437 const std::vector<int> & CDomain::getIEndSub(void) const 438 { 439 return (this->iend_sub); 440 } 441 442 //---------------------------------------------------------------- 443 444 const std::vector<int> & CDomain::getJBeginSub(void) const 445 { 446 return (this->jbegin_sub); 447 } 448 449 //---------------------------------------------------------------- 450 451 const std::vector<int> & CDomain::getJEndSub(void) const 452 { 453 return (this->iend_sub); 454 } 455 456 //---------------------------------------------------------------- 457 458 const std::vector<ARRAY(double, 1)> & CDomain::getLonValueSub(void) const 459 { 460 return (this->lonvalue_sub); 461 } 462 463 //---------------------------------------------------------------- 464 465 const std::vector<ARRAY(double, 1)> & CDomain::getLatValueSub(void) const 466 { 467 return (this->latvalue_sub); 468 } 469 354 470 ///--------------------------------------------------------------- 355 471 -
XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp
r180 r182 69 69 /// Accesseurs /// 70 70 boost::shared_ptr<CMask> getLocalMask(void) const; 71 71 72 const std::set<StdString> & getRelFiles(void) const; 73 74 const std::vector<int> & getIBeginSub(void) const; 75 const std::vector<int> & getIEndSub(void) const; 76 const std::vector<int> & getJBeginSub(void) const; 77 const std::vector<int> & getJEndSub(void) const; 78 79 const std::vector<ARRAY(double, 1)> & getLonValueSub(void) const; 80 const std::vector<ARRAY(double, 1)> & getLatValueSub(void) const; 72 81 73 82 /// Test /// 74 83 bool IsWritten(const StdString & filename) const; 75 84 85 public : 86 76 87 /// Mutateur /// 77 88 void addRelFile(const StdString & filename); 78 89 void completeLonLat(void); 90 79 91 /// Destructeur /// 80 92 virtual ~CDomain(void); … … 94 106 95 107 std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub; 108 std::vector<ARRAY(double, 1)> lonvalue_sub, latvalue_sub; 96 109 97 110 }; // class CDomain -
XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp
r181 r182 24 24 CField::~CField(void) 25 25 { 26 this->grid.reset() ; 27 this->file.reset() ; 26 28 if (this->foperation == NULL) 27 29 delete this->foperation; -
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
r181 r182 23 23 24 24 CGrid::~CGrid(void) 25 { /* Ne rien faire de plus */ } 25 { 26 this->axis.reset() ; 27 this->domain.reset() ; 28 29 for (StdSize i = 0; i < this->storeIndex.size(); i++) 30 { 31 this->storeIndex[i].reset(); 32 this->out_i_index[i].reset(); 33 this->out_j_index[i].reset(); 34 this->out_l_index[i].reset(); 35 } 36 } 26 37 27 38 ///--------------------------------------------------------------- … … 88 99 this->solveAxisRef() ; 89 100 if (this->storeIndex.size() == 1) 101 { 90 102 this->computeIndex() ; 103 } 104 else 105 { 106 this->computeIndexServer(); 107 } 91 108 this->isChecked = true; 92 109 } … … 303 320 this->out_l_index.push_back(out_l_index_); 304 321 } 322 323 //--------------------------------------------------------------- 324 325 void CGrid::computeIndexServer(void) 326 { 327 ARRAY(int, 1) storeIndex_srv = this->storeIndex[0]; 328 ARRAY(int, 1) out_i_index_srv = this->out_i_index[0]; 329 ARRAY(int, 1) out_j_index_srv = this->out_j_index[0]; 330 ARRAY(int, 1) out_l_index_srv = this->out_l_index[0]; 331 332 const std::vector<int> & ibegin = this->domain->getIBeginSub(); 333 const std::vector<int> & jbegin = this->domain->getJBeginSub(); 334 335 StdSize dn = 0; 336 for (StdSize j = 1; j < this->out_i_index.size(); j++) 337 dn += this->out_i_index[j]->size(); 338 339 ARRAY_ASSIGN(storeIndex_srv, int, 1, [dn]); 340 ARRAY_ASSIGN(out_i_index_srv, int, 1, [dn]); 341 ARRAY_ASSIGN(out_j_index_srv, int, 1, [dn]); 342 ARRAY_ASSIGN(out_l_index_srv, int, 1, [dn]); 343 344 for (StdSize i = 0, dn = 0; i < ibegin.size(); i++) 345 { 346 ARRAY(int, 1) storeIndex_cl = this->storeIndex[i+1]; 347 ARRAY(int, 1) out_i_index_cl = this->out_i_index[i+1]; 348 ARRAY(int, 1) out_j_index_cl = this->out_j_index[i+1]; 349 ARRAY(int, 1) out_l_index_cl = this->out_l_index[i+1]; 350 351 const int ibegin_cl = ibegin[i]; 352 const int jbegin_cl = jbegin[i]; 353 354 for (StdSize n = dn, m = 0; n < (dn + storeIndex_cl->size()); n++, m++) 355 { 356 (*storeIndex_srv)[n] = (*storeIndex_cl)[m] + dn; 357 (*out_i_index_srv)[n] = (*out_i_index_cl)[m] + ibegin_cl - 1; 358 (*out_j_index_srv)[n] = (*out_j_index_cl)[m] + jbegin_cl - 1; 359 (*out_l_index_srv)[n] = (*out_l_index_cl)[m]; 360 } 361 362 dn += storeIndex_cl->size(); 363 364 } 365 366 //~ StdOFStream ofs(this->getId().c_str()); 367 //~ for (StdSize h = 0; h < storeIndex_srv->size(); h++) 368 //~ { 369 //~ ofs << "(" << (*storeIndex_srv)[h] << ";" 370 //~ << (*out_i_index_srv)[h] << "," 371 //~ << (*out_j_index_srv)[h] << "," 372 //~ << (*out_l_index_srv)[h] << ")" << std::endl; 373 //~ } 374 //~ ofs.close(); 375 376 } 305 377 306 378 ///--------------------------------------------------------------- -
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
r181 r182 70 70 template <StdSize n> 71 71 void inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const; 72 73 void inputFieldServer(const std::deque<ARRAY(double, 1)> storedClient, 74 ARRAY(double, 1) storedServer) const; 72 75 73 76 template <StdSize n> … … 97 100 98 101 /// Traitements protégés /// 102 void computeIndexServer(void); 99 103 void computeIndex(void); 100 104 void solveDomainRef(void);
Note: See TracChangeset
for help on using the changeset viewer.