- Timestamp:
- 04/21/17 13:53:33 (8 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/arch/arch-X64_ADA.fcm
r985 r1101 3 3 ################################################################################ 4 4 5 %CCOMPILER mpiicc 6 %FCOMPILER mpiifort 7 %LINKER mpiifort -nofor-main 5 %CCOMPILER mpiicc -qopenmp -D_usingEP -D_intelmpi 6 %FCOMPILER mpiifort -qopenmp -D_usingEP -D_intelmpi 7 %LINKER mpiifort -nofor-main -qopenmp -D_usingEP -D_intelmpi 8 8 9 9 %BASE_CFLAGS -diag-disable 1125 -diag-disable 279 -
XIOS/dev/branch_yushan/src/attribute_template_impl.hpp
r1037 r1101 39 39 : CAttribute(id) 40 40 { 41 umap.insert(umap.end(), std::make_pair(id, this)); 41 xios_map<StdString, CAttribute*>::iterator it; 42 printf("umap size = %lu, add = %p\n", umap.size(), &umap); 43 it = umap.find(id); 44 if(it == umap.end()) 45 umap.insert(umap.end(), std::make_pair(id, this)); 42 46 } 43 47 -
XIOS/dev/branch_yushan/src/calendar.cpp
r561 r1101 117 117 const CDate& CCalendar::update(int step) 118 118 { 119 info(20) << "update step : " << step << " timestep " << this->timestep << std::endl;119 //info(20) << "update step : " << step << " timestep " << this->timestep << std::endl; 120 120 return (this->currentDate = this->getInitDate() + step * this->timestep); 121 121 } -
XIOS/dev/branch_yushan/src/group_factory_impl.hpp
r591 r1101 70 70 CObjectFactory::SetCurrentContextId 71 71 (CGroupFactory::GetCurrentContextId()); 72 printf("SetCurrentContextId OK %d , %d, %s\n", id.size(), CGroupFactory::HasChild(group, id), id); 72 73 if (id.size() == 0) 73 74 { 74 boost::shared_ptr<typename U::RelChild> value = 75 CObjectFactory::CreateObject<typename U::RelChild>();75 boost::shared_ptr<typename U::RelChild> value = CObjectFactory::CreateObject<typename U::RelChild>(); 76 printf("boost::shared_ptr<typename U::RelChild> value OK\n"); 76 77 group->childList.insert(group->childList.end(), value.get()); 78 printf("group->childList.insert OK\n"); 77 79 group->childMap.insert(std::make_pair(value->getId(), value.get())); 80 printf("group->childMap.insert OK\n"); 78 81 return (value); 79 82 } 80 83 else if (CGroupFactory::HasChild(group, id)) 84 { 85 printf("has child\n"); 81 86 return (CGroupFactory::GetChild(group, id)); 87 } 82 88 else 83 89 { 84 boost::shared_ptr<typename U::RelChild> value = 85 CObjectFactory::CreateObject<typename U::RelChild>(id);90 boost::shared_ptr<typename U::RelChild> value = CObjectFactory::CreateObject<typename U::RelChild>(id); 91 printf("shared_ptr OK\n"); 86 92 group->childList.insert(group->childList.end(), value.get()); 93 printf("childList.insert OK\n"); 87 94 group->childMap.insert(std::make_pair(id, value.get())); 95 printf("childMap.insert OK\n"); 88 96 return (value); 89 97 } -
XIOS/dev/branch_yushan/src/group_template_impl.hpp
r595 r1101 348 348 U* CGroupTemplate<U, V, W>::createChild(const string& id) 349 349 { 350 printf("U* CGroupTemplate<U, V, W>::createChild(const string& id) %p\n", this->getShared()); 350 351 return CGroupFactory::CreateChild<V>(this->getShared(), id).get() ; 351 352 } -
XIOS/dev/branch_yushan/src/interface/c/icfield.cpp
r943 r1101 39 39 CTimer::get("XIOS").resume() ; 40 40 *_ret = CField::get(id); 41 printf("cxios_field_handle_create\n"); 41 42 CTimer::get("XIOS").suspend() ; 42 43 } … … 48 49 CTimer::get("XIOS").resume() ; 49 50 *_ret = CFieldGroup::get(id); 51 printf("cxios_fieldgroup_handle_create\n"); 50 52 CTimer::get("XIOS").suspend() ; 51 53 } -
XIOS/dev/branch_yushan/src/object_factory_impl.hpp
r1088 r1101 122 122 if(U::AllVectObj == NULL) U::AllVectObj = new xios_map<StdString, std::vector<boost::shared_ptr<U> > >; 123 123 if(U::AllMapObj == NULL) U::AllMapObj = new xios_map<StdString, xios_map<StdString, boost::shared_ptr<U> > >; 124 125 printf("so far so good : %d %d %d\n", CurrContext_ptr->empty(), CObjectFactory::HasObject<U>(id), id.empty()); 124 126 125 127 if (CurrContext_ptr->empty()) … … 134 136 { 135 137 boost::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 136 138 printf("in CreateObject, value OK\n"); 137 139 (* U::AllVectObj)[*CObjectFactory::CurrContext_ptr].insert((*U::AllVectObj)[*CObjectFactory::CurrContext_ptr].end(), value); 140 printf("AllVectObj insert OK\n"); 138 141 (* U::AllMapObj) [*CObjectFactory::CurrContext_ptr].insert(std::make_pair(value->getId(), value)); 142 printf("AllMapObj insert OK\n"); 139 143 140 144 return value; -
XIOS/dev/branch_yushan/src/object_template.hpp
r1087 r1101 106 106 // static xios_map< StdString, long int > GenId ; 107 107 108 // xios_map<StdString, xios_map<StdString, boost::shared_ptr<DerivedType> > > AllMapObj;109 // xios_map<StdString, std::vector<boost::shared_ptr<DerivedType> > > AllVectObj;110 // xios_map< StdString, long int > GenId ;111 108 112 109 static xios_map<StdString, xios_map<StdString, boost::shared_ptr<DerivedType> > > *AllMapObj; 113 110 static xios_map<StdString, std::vector<boost::shared_ptr<DerivedType> > > *AllVectObj; 114 111 static xios_map< StdString, long int > *GenId; 115 116 112 #pragma omp threadprivate(AllMapObj, AllVectObj, GenId) 117 113 -
XIOS/dev/branch_yushan/src/test/test_omp.f90
r1094 r1101 88 88 print*, "xios_context_initialize OK", rank, size 89 89 90 ! CALL xios_get_handle("test",ctx_hdl) 91 ! CALL xios_set_current_context(ctx_hdl) 92 93 94 ! CALL xios_get_calendar_type(calendar_type) 95 ! print*, "xios_get_calendar_type OK", rank, size 96 97 ! CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 98 ! CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear') 99 ! CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 100 ! CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 101 ! CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 102 ! print*, "test block OK", rank, size 90 CALL xios_get_handle("test",ctx_hdl) 91 CALL xios_set_current_context(ctx_hdl) 92 93 94 CALL xios_get_calendar_type(calendar_type) 95 print*, "xios_get_calendar_type OK", rank, size 96 97 CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 98 CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear') 99 CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 100 CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 101 CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 102 print*, "test block OK", rank, size 103 104 ! CALL xios_get_handle("field_definition",fieldgroup_hdl) 105 ! print*, "test block II get_handle OK", rank, size 106 ! CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B") 107 ! print*, "test block II add_child OK", rank, size 108 ! CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B") 109 ! print*, "test block II set_attr OK", rank, size 110 111 dtime%second = 3600 112 CALL xios_set_timestep(dtime) 113 print*, "xios_set_timestep OK", rank, size 114 115 ! The calendar is created as soon as the calendar type is defined. This way 116 ! calendar operations can be used before the context definition is closed 117 CALL xios_get_time_origin(date) 118 PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year) 119 PRINT *, "--> day length = ", xios_get_day_length_in_seconds() 120 CALL xios_date_convert_to_string(date, date_str) 121 PRINT *, "time_origin = ", date_str 122 PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date) 123 PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date) 124 PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date) 125 PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date) 126 PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date) 127 dtime%timestep = 1 128 dtime = 0.5 * dtime 129 CALL xios_duration_convert_to_string(dtime, dtime_str) 130 PRINT *, "duration = ", dtime_str 131 date = date + 3 * (dtime + dtime) 132 CALL xios_date_convert_to_string(date, date_str) 133 PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str 134 PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date) 135 PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour) 136 137 ni=0 ; lonvalue(:,:)=0; 138 CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue) 139 print *,"ni",ni 140 !print *,"lonvalue",lonvalue; 141 142 CALL xios_is_defined_field_attr("field_A",enabled=ok) 143 PRINT *,"field_A : attribute enabled is defined ? ",ok 144 145 CALL xios_close_context_definition() 146 print*, "xios_close_context_definition OK" 147 148 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 149 150 DO ts=1,6 151 CALL xios_update_calendar(ts) 152 CALL xios_send_field("field_A",field_A) 153 CALL wait_us(5000) 154 ENDDO 103 155 104 156 CALL xios_context_finalize() … … 116 168 CALL xios_finalize() 117 169 print*, "xios finalize OK", rank, size 170 171 DEALLOCATE(lon, lat, field_A, lonvalue) 118 172 119 173 -
XIOS/dev/branch_yushan/src/transformation/grid_transformation_factory_impl.hpp
r1079 r1101 62 62 static bool unregisterTransformation(ETranformationType transType); 63 63 static bool initializeTransformation_; 64 //#pragma omp threadprivate(initializeTransformation_)64 #pragma omp threadprivate(initializeTransformation_) 65 65 }; 66 66 … … 87 87 ERROR("CGridTransformationFactory::createTransformation(ETranformationType transType)", 88 88 << "Transformation type " << transType 89 << " doesn't exist. Please define.");89 << " doesn't exist. Please define."); 90 90 } 91 91 return (it->second)(gridDst, gridSrc, transformation, elementPositionInGrid,
Note: See TracChangeset
for help on using the changeset viewer.