Changeset 1146 for XIOS/dev/branch_yushan_merged/src
- Timestamp:
- 05/24/17 16:59:40 (7 years ago)
- Location:
- XIOS/dev/branch_yushan_merged/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/io/netCdfInterface.cpp
r1138 r1146 103 103 int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId) 104 104 { 105 int status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId); 105 int status; 106 #pragma omp critical (_netcdf) 107 status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId); 106 108 if (NC_NOERR != status) 107 109 { … … 347 349 int CNetCdfInterface::inqDimLen(int ncid, int dimId, StdSize& dimLen) 348 350 { 349 int status = nc_inq_dimlen(ncid, dimId, &dimLen); 351 int status; 352 #pragma omp critical (_netcdf) 353 status = nc_inq_dimlen(ncid, dimId, &dimLen); 350 354 if (NC_NOERR != status) 351 355 { -
XIOS/dev/branch_yushan_merged/src/io/netCdfInterface_impl.hpp
r1138 r1146 86 86 int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, const StdSize* count, T* data) 87 87 { 88 int status = ncGetVaraType(ncid, varId, start, count, data); 88 int status; 89 #pragma omp critical (_netcdf) 90 status = ncGetVaraType(ncid, varId, start, count, data); 89 91 if (NC_NOERR != status) 90 92 { -
XIOS/dev/branch_yushan_merged/src/node/context.cpp
r1134 r1146 21 21 shared_ptr<CContextGroup> * CContext::root_ptr = 0; 22 22 23 /// ////////////////////// D éfinitions ////////////////////// ///23 /// ////////////////////// Dfinitions ////////////////////// /// 24 24 25 25 CContext::CContext(void) … … 184 184 if (!this->hasChild()) 185 185 { 186 //oss << "<!-- No definition -->" << std::endl; // fait planter l'incr émentation186 //oss << "<!-- No definition -->" << std::endl; // fait planter l'incrmentation 187 187 } 188 188 else … … 554 554 void CContext::solveAllInheritance(bool apply) 555 555 { 556 // R ésolution des héritages descendants (cà d des héritages de groupes)556 // Rsolution des hritages descendants (cd des hritages de groupes) 557 557 // pour chacun des contextes. 558 558 solveDescInheritance(apply); 559 559 560 // R ésolution des héritages par référence au niveau des fichiers.560 // Rsolution des hritages par rfrence au niveau des fichiers. 561 561 const vector<CFile*> allFiles=CFile::getAll(); 562 562 const vector<CGrid*> allGrids= CGrid::getAll(); … … 582 582 583 583 for (unsigned int i = 0; i < allFiles.size(); i++) 584 if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est d éfini.584 if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est dfini. 585 585 { 586 if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fix é Ãvrai.586 if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fix vrai. 587 587 { 588 588 if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) … … 609 609 610 610 if (enabledFiles.size() == 0) 611 DEBUG(<<"Aucun fichier ne va être sorti dans le contexte nommé\""611 DEBUG(<<"Aucun fichier ne va tre sorti dans le contexte nomm \"" 612 612 << getId() << "\" !"); 613 613 } … … 849 849 prepareTimeseries(); 850 850 851 //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers Ãsortir.851 //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers sortir. 852 852 this->findEnabledFiles(); 853 853 this->findEnabledReadModeFiles(); -
XIOS/dev/branch_yushan_merged/src/node/file.cpp
r1138 r1146 612 612 if (time_counter_name.isEmpty()) time_counter_name = "time_counter"; 613 613 614 //#pragma omp critical (_checkFile) 614 615 checkFile(); 615 616 -
XIOS/dev/branch_yushan_merged/src/server.cpp
r1141 r1146 340 340 MPI_Isend(buff,count,MPI_CHAR,i,2,intraComm,&requests[i-1]) ; 341 341 } 342 342 343 MPI_Waitall(size-1,requests,status) ; 343 344 registerContext(buff,count,it->second.leaderRank) ; -
XIOS/dev/branch_yushan_merged/src/test/test_remap_omp.f90
r1141 r1146 52 52 if(rank < size-2) then 53 53 54 !$omp parallel default( private)54 !$omp parallel default(firstprivate) 55 55 56 56 !!! XIOS Initialization (get the local communicator) … … 60 60 CALL MPI_COMM_SIZE(comm,size,ierr) 61 61 62 63 !$omp critical (open_file) 62 64 ierr=NF90_OPEN(src_file, NF90_NOWRITE, ncid) 65 !$omp end critical (open_file) 66 63 67 ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid) 64 68 ierr=NF90_INQUIRE_VARIABLE(ncid, varid,dimids=dimids) … … 134 138 ENDDO 135 139 140 !$omp critical (open_file) 136 141 ierr=NF90_OPEN(dst_file, NF90_NOWRITE, ncid) 142 !$omp end critical (open_file) 143 144 137 145 ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid) 138 146 ierr=NF90_INQUIRE_VARIABLE(ncid, varid,dimids=dimids) … … 168 176 CALL xios_get_handle("test",ctx_hdl) 169 177 CALL xios_set_current_context(ctx_hdl) 170 178 171 179 CALL xios_set_domain_attr("src_domain", ni_glo=src_ni_glo, ibegin=src_ibegin, ni=src_ni, type="unstructured") 172 180 CALL xios_set_domain_attr("src_domain", lonvalue_1D=src_lon, latvalue_1D=src_lat, & … … 189 197 bounds_lon_1D=src_boundslon, bounds_lat_1D=src_boundslat, nvertex=src_nvertex) 190 198 191 192 199 dtime%second = 3600 193 200 … … 195 202 196 203 CALL xios_close_context_definition() 197 CALL xios_get_domain_attr("src_domain_regular_read", ni=src_tmp_ni, nj=src_tmp_nj) 198 ALLOCATE(tmp_field_0(src_tmp_ni*src_tmp_nj)) 199 200 CALL xios_get_axis_attr("src_axis_curvilinear_read", n=src_tmp_n) 201 CALL xios_get_domain_attr("src_domain_curvilinear_read", ni=src_tmp_ni, nj=src_tmp_nj) 202 ALLOCATE(tmp_field_1(src_tmp_ni*src_tmp_nj*src_tmp_n)) 203 204 CALL xios_get_domain_attr("src_domain_unstructured_read", ni=src_tmp_ni, nj=src_tmp_nj) 205 ALLOCATE(tmp_field_2(src_tmp_ni*src_tmp_nj)) 206 207 CALL xios_recv_field("src_field_regular", tmp_field_0) 208 CALL xios_recv_field("src_field_curvilinear", tmp_field_1) 209 CALL xios_recv_field("src_field_unstructured", tmp_field_2) 210 211 DO ts=1,10 212 CALL xios_update_calendar(ts) 213 CALL xios_send_field("src_field_2D",src_field_2D) 214 215 DO i=1,src_ni 216 src_field_2D_clone(i) = src_field_2D(i) 217 IF ((23.5 * ts < src_lat(i)) .AND. (src_lat(i) < 65.5 *ts) .AND. (0 < src_lon(i)) .AND. (src_lon(i) < 30*ts)) THEN 218 src_field_2D_clone(i) = missing_value 219 ENDIF 220 ENDDO 221 222 CALL xios_send_field("src_field_2D_clone",src_field_2D_clone) 223 CALL xios_send_field("src_field_3D",src_field_3D) 224 CALL xios_send_field("src_field_3D_clone",src_field_3D) 225 CALL xios_send_field("src_field_4D",src_field_4D) 226 CALL xios_send_field("src_field_3D_pression",src_field_pression) 227 CALL xios_send_field("tmp_field_0",tmp_field_0) 228 CALL xios_send_field("tmp_field_1",tmp_field_1) 229 CALL xios_send_field("tmp_field_2",tmp_field_2) 230 CALL wait_us(5000) ; 231 ENDDO 232 204 233 205 CALL xios_context_finalize() 234 235 DEALLOCATE(src_lon, src_lat, src_boundslon,src_boundslat, src_field_2D) 236 DEALLOCATE(dst_lon, dst_lat, dst_boundslon,dst_boundslat) 237 DEALLOCATE(tmp_field_0, tmp_field_1, tmp_field_2) 238 239 240 206 241 207 CALL xios_finalize() 242 208
Note: See TracChangeset
for help on using the changeset viewer.