Changeset 1628 for XIOS/dev/dev_trunk_omp/src
- Timestamp:
- 12/18/18 17:34:59 (5 years ago)
- Location:
- XIOS/dev/dev_trunk_omp/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
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.