- Timestamp:
- 12/18/18 17:34:59 (5 years ago)
- Location:
- XIOS/dev/dev_trunk_omp
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/arch/arch-X64_IRENE.path
r1483 r1628 1 1 2 NETCDF_INCDIR="-I $NETCDFC_INCDIR -I $NETCDFFORTRAN_INCDIR" 2 3 NETCDF_LIBDIR="-L $NETCDFC_LIBDIR -L $NETCDFFORTRAN_LIBDIR" -
XIOS/dev/dev_trunk_omp/bld.cfg
r1608 r1628 46 46 #bld::target generate_fortran_interface.exe 47 47 #bld::target test_remap.exe 48 #bld::target xios_server.exe48 bld::target xios_server.exe 49 49 #bld::target test_regular.exe 50 50 #bld::target test_xios2_cmip6.exe … … 56 56 #bld::target test_client.exe 57 57 bld::target test_omp.exe 58 bld::target test_omp2.exe 59 bld::target test_send.exe 60 bld::target test_send2.exe 58 61 #bld::target test_unstruct_complete.exe 59 62 #bld::target test_unstructured.exe -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_message.cpp
r1603 r1628 147 147 { 148 148 Debug("Message probing for intracomm\n"); 149 149 /* 150 150 #pragma omp critical (_mpi_call) 151 151 { … … 158 158 } 159 159 160 160 */ 161 ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm->mpi_comm), &flag, &message, &status); 162 161 163 if(flag) 162 164 { -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_probe.cpp
r1603 r1628 68 68 *flag = false; 69 69 70 Message_Check(comm);71 72 #pragma omp flush73 74 70 #pragma omp critical (_query) 75 71 for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it) … … 98 94 } 99 95 } 96 if(*flag) return 0; 97 98 Message_Check(comm); 99 100 #pragma omp flush 101 102 #pragma omp critical (_query) 103 for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it) 104 { 105 bool src_matched = src<0? true: (*it)->ep_src == src; 106 bool tag_matched = tag<0? true: (*it)->ep_tag == tag; 107 108 if(src_matched && tag_matched) 109 { 110 Debug("find message\n"); 111 112 status->mpi_status = new ::MPI_Status(*static_cast< ::MPI_Status*>((*it)->mpi_status)); 113 status->ep_src = (*it)->ep_src; 114 status->ep_tag = (*it)->ep_tag; 115 116 if(comm->is_intercomm) 117 { 118 for(INTER_RANK_MAP::iterator iter = comm->inter_rank_map->begin(); iter != comm->inter_rank_map->end(); iter++) 119 { 120 if(iter->second == (*it)->ep_src) status->ep_src=iter->first; 121 } 122 } 123 124 *flag = true; 125 break; 126 } 127 } 128 if(*flag) return 0; 100 129 } 101 130 … … 129 158 *flag = false; 130 159 131 Message_Check(comm);132 133 #pragma omp flush134 135 160 #pragma omp critical (_query) 136 161 if(! comm->ep_comm_ptr->message_queue->empty()) … … 179 204 } 180 205 } 206 207 if(*flag) return 0; 208 209 Message_Check(comm); 210 211 #pragma omp flush 212 213 #pragma omp critical (_query) 214 if(! comm->ep_comm_ptr->message_queue->empty()) 215 { 216 for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it) 217 { 218 219 bool src_matched = src<0? true: (*it)->ep_src == src; 220 bool tag_matched = tag<0? true: (*it)->ep_tag == tag; 221 222 if(src_matched && tag_matched) 223 { 224 *flag = true; 225 226 status->mpi_status = new ::MPI_Status(*static_cast< ::MPI_Status*>((*it)->mpi_status)); 227 memcheck("new "<< status->mpi_status << " : in ep_lib::MPI_Improbe, status->mpi_status = new ::MPI_Status"); 228 status->ep_src = (*it)->ep_src; 229 status->ep_tag = (*it)->ep_tag; 230 231 (*message)->mpi_message = new ::MPI_Message(*static_cast< ::MPI_Message*>((*it)->mpi_message)); 232 memcheck("new "<< (*message)->mpi_message <<" : in ep_lib::MPI_Improbe, (*message)->mpi_message = new ::MPI_Message"); 233 (*message)->ep_src = (*it)->ep_src; 234 (*message)->ep_tag = (*it)->ep_tag; 235 236 237 #pragma omp critical (_query2) 238 { 239 memcheck("delete "<< (*it)->mpi_message <<" : in ep_lib::Message_Check, delete (*it)->mpi_message"); 240 memcheck("delete "<< (*it)->mpi_status <<" : in ep_lib::Message_Check, delete (*it)->mpi_status"); 241 memcheck("delete "<< (*it) <<" : in ep_lib::Message_Check, delete (*it)"); 242 243 244 delete (*it)->mpi_message; 245 delete (*it)->mpi_status; 246 delete *it; 247 248 249 comm->ep_comm_ptr->message_queue->erase(it); 250 memcheck("message_queue["<<mpi_rank<<","<<ep_rank_loc<<"]->size = "<<comm->ep_comm_ptr->message_queue->size()); 251 #pragma omp flush 252 } 253 254 break; 255 } 256 257 } 258 } 259 260 if(*flag) return 0; 261 181 262 } 182 263 -
XIOS/dev/dev_trunk_omp/inputs/iodef.xml
r1202 r1628 15 15 16 16 17 <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".FALSE.">17 <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" > 18 18 <file id="output" name="output" enabled=".TRUE."> 19 19 <!-- <field field_ref="field_Domain" name="field_A" /> --> … … 21 21 <field field_ref="field_A_zoom" name="field_B" /> 22 22 </file> 23 <file id="output1" name="output1" enabled=". TRUE.">23 <file id="output1" name="output1" enabled=".FALSE."> 24 24 <!-- <field field_ref="field_Domain" name="field_A" /> --> 25 25 <field field_ref="field_A" name="field_A" /> 26 </file> 27 <file id="output2" name="output2" enabled=". TRUE.">26 </file> 27 <file id="output2" name="output2" enabled=".FALSE."> 28 28 <!-- <field field_ref="field_Domain" name="field_A" /> --> 29 29 <field field_ref="field_Scalar" name="field_A" /> -
XIOS/dev/dev_trunk_omp/src/calendar.cpp
r1601 r1628 127 127 const CDate& CCalendar::update(int step) 128 128 { 129 #pragma omp critical (_output)130 info(80) << "update step : " << step << " timestep " << this->timestep << std::endl;129 //#pragma omp critical (_output) 130 //info(120) << "update step : " << step << " timestep " << this->timestep << std::endl; 131 131 this->step = step; 132 132 return (this->currentDate = this->getInitDate() + step * this->timestep); … … 160 160 //----------------------------------------------------------------- 161 161 162 int CCalendar::getMonthLength(const CDate& date) const162 /*int CCalendar::getMonthLength(const CDate& date) const 163 163 { // Retourne la durée du mois en jour. 164 164 static const int NoLeapMonthLength[] = 165 165 { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; 166 166 return NoLeapMonthLength[date.getMonth() - 1]; 167 } 167 }*/ 168 168 169 169 StdString CCalendar::getType(void) const { return StdString(this->getId()); } … … 171 171 int CCalendar::getYearTotalLength(const CDate& date) const { return (365 * 86400); } 172 172 173 int CCalendar::getYearLength (void) const { return 12; }174 int CCalendar::getDayLength (void) const { return 24; }175 int CCalendar::getHourLength (void) const { return 60; }176 int CCalendar::getMinuteLength(void) const { return 60; }177 int CCalendar::getDayLengthInSeconds(void) const { return getDayLength() * getHourLength() * getMinuteLength(); }173 //int CCalendar::getYearLength (void) const { return 12; } 174 //int CCalendar::getDayLength (void) const { return 24; } 175 //int CCalendar::getHourLength (void) const { return 60; } 176 //int CCalendar::getMinuteLength(void) const { return 60; } 177 //int CCalendar::getDayLengthInSeconds(void) const { return getDayLength() * getHourLength() * getMinuteLength(); } 178 178 179 179 bool CCalendar::hasLeapYear() const { return false; } -
XIOS/dev/dev_trunk_omp/src/calendar.hpp
r1357 r1628 72 72 int getStep(void) const; 73 73 74 virtual int getMonthLength(const CDate& date) const; 74 inline int getMonthLength(const CDate& date) const 75 { 76 static const int NoLeapMonthLength[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; 77 return NoLeapMonthLength[date.getMonth() - 1]; 78 }; 75 79 76 80 virtual int getYearTotalLength(const CDate& date) const; // Retourne la durée d'une année en seconde. 77 81 78 virtual int getYearLength (void) const; // Retourne la durée d'une année en mois. 79 virtual int getDayLength (void) const; // Retourne la durée d'un jour en heures. 80 virtual int getHourLength (void) const; // Retourne la durée d'une heure en minute. 81 virtual int getMinuteLength(void) const; // Retourne la durée d'une minute en secondes. 82 //virtual int getYearLength (void) const; // Retourne la durée d'une année en mois. 83 inline int getYearLength (void) const { return 12; } ; 84 inline int getDayLength (void) const { return 24; } ; // Retourne la durée d'un jour en heures. 85 inline int getHourLength (void) const { return 60; } ; // Retourne la durée d'une heure en minute. 86 inline int getMinuteLength(void) const {return 60; } ; // Retourne la durée d'une minute en secondes. 82 87 /*! Returns the day length expressed in seconds. */ 83 virtual int getDayLengthInSeconds(void) const;88 inline int getDayLengthInSeconds(void) const { return 86400; } ; 84 89 85 90 virtual StdString getMonthName(int monthId) const; -
XIOS/dev/dev_trunk_omp/src/calendar_util.cpp
r1472 r1628 1 1 #include "calendar_util.hpp" 2 #include "calendar.hpp" 2 3 3 4 namespace xios -
XIOS/dev/dev_trunk_omp/src/client.cpp
r1601 r1628 315 315 report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 316 316 report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 317 report( 100)<<CTimer::getAllCumulatedTime()<<endl ;317 report(0)<<CTimer::getAllCumulatedTime()<<endl ; 318 318 } 319 319 } -
XIOS/dev/dev_trunk_omp/src/date.cpp
r1496 r1628 134 134 //---------------------------------------------------------------- 135 135 136 int CDate::getYear (void) const { return (this->year ); }137 int CDate::getMonth (void) const { return (this->month ); }138 int CDate::getDay (void) const { return (this->day ); }139 int CDate::getHour (void) const { return (this->hour ); }140 int CDate::getMinute(void) const { return (this->minute); }141 int CDate::getSecond(void) const { return (this->second); }136 //int CDate::getYear (void) const { return (this->year ); } 137 //int CDate::getMonth (void) const { return (this->month ); } 138 //int CDate::getDay (void) const { return (this->day ); } 139 //int CDate::getHour (void) const { return (this->hour ); } 140 //int CDate::getMinute(void) const { return (this->minute); } 141 //int CDate::getSecond(void) const { return (this->second); } 142 142 143 143 //---------------------------------------------------------------- -
XIOS/dev/dev_trunk_omp/src/date.hpp
r1158 r1628 43 43 44 44 /// Divers accesseurs /// 45 in t getYear (void) const;46 in t getMonth (void) const;47 in t getDay (void) const;48 in t getHour (void) const;49 in t getMinute(void) const;50 in t getSecond(void) const;45 inline int getYear (void) const {return year;}; 46 inline int getMonth (void) const {return month;}; 47 inline int getDay (void) const {return day;}; 48 inline int getHour (void) const {return hour;}; 49 inline int getMinute(void) const {return minute;}; 50 inline int getSecond(void) const {return second;}; 51 51 52 52 //!< Get the calendar associated to the date -
XIOS/dev/dev_trunk_omp/src/node/context.cpp
r1601 r1628 1847 1847 } 1848 1848 1849 #pragma omp critical (_output)1850 info( 50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;1849 //#pragma omp critical (_output) 1850 info(150) << "updateCalendar : before : " << calendar->getCurrentDate() << endl; 1851 1851 calendar->update(step); 1852 #pragma omp critical (_output)1853 info( 50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;1852 //#pragma omp critical (_output) 1853 info(150) << "updateCalendar : after : " << calendar->getCurrentDate() << endl; 1854 1854 #ifdef XIOS_MEMTRACK_LIGHT 1855 1855 #pragma omp critical (_output) -
XIOS/dev/dev_trunk_omp/src/object_factory.hpp
r1601 r1628 37 37 38 38 template <typename U> 39 static int CheckObjectVector(); 40 41 template <typename U> 39 42 static const std::vector<std::shared_ptr<U> > & 40 43 GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); -
XIOS/dev/dev_trunk_omp/src/object_factory_decl_macro.hpp
r1591 r1628 10 10 template int CObjectFactory::GetObjectIdNum<U>(void); \ 11 11 template const std::vector<std::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 12 template int CObjectFactory::CheckObjectVector<U>( ); \ 12 13 template bool CObjectFactory::HasObject<U>(const StdString& id); \ 13 14 template bool CObjectFactory::HasObject<U>(const StdString& context,const StdString& id); \ -
XIOS/dev/dev_trunk_omp/src/object_factory_impl.hpp
r1601 r1628 125 125 126 126 template <typename U> 127 const std::vector<std::shared_ptr<U> > & 127 int CObjectFactory::CheckObjectVector() 128 { 129 if(U::AllVectObj_ptr) 130 { 131 return 1; 132 } 133 return 0; 134 } 135 136 137 template <typename U> 138 const std::vector<std::shared_ptr<U> > & 128 139 CObjectFactory::GetObjectVector(const StdString & context) 129 140 { 130 return (*U::AllVectObj_ptr)[context]; 141 if(U::AllVectObj_ptr) 142 { 143 //const std::vector<std::shared_ptr<U> > temp; 144 return (*U::AllVectObj_ptr)[context]; 145 //return std::vector<std::shared_ptr<U> > (0); 146 } 147 131 148 } 132 149 -
XIOS/dev/dev_trunk_omp/src/object_template_impl.hpp
r1601 r1628 426 426 const vector<T*> CObjectTemplate<T>::getAll() 427 427 { 428 int mycheck = CObjectFactory::CheckObjectVector<T>(); 429 if(mycheck==0) 430 { 431 vector<T*> vect; 432 return vect; 433 } 428 434 const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(CObjectFactory::GetCurrentContextId()); 429 435 vector<T*> vect; -
XIOS/dev/dev_trunk_omp/src/test/test_omp.f90
r1604 r1628 45 45 CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr) 46 46 CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr) 47 if(rank < size- 2) then47 if(rank < size-4) then 48 48 49 49 !$omp parallel default(firstprivate)
Note: See TracChangeset
for help on using the changeset viewer.