Changeset 1157
- Timestamp:
- 06/06/17 17:09:31 (7 years ago)
- Location:
- XIOS/dev/branch_yushan_merged
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/make_xios
r984 r1157 47 47 "--job") job=$2 ; shift ; shift ;; 48 48 "--netcdf_lib") netcdf_lib=$2 ; shift ; shift ;; 49 "--memtrack") use_memtrack="true"; shift ;;50 *) code="$1" ; shift ;;51 esac52 done49 "--memtrack") use_memtrack="true" memtrack=$2 ; shift ; shift ;; 50 *) code="$1" ; shift ;; 51 esac 52 done 53 53 54 54 # Installation des sources … … 172 172 if [[ "$use_memtrack" == "true" ]] 173 173 then 174 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"175 174 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 175 if [[ "$memtrack" == "light" ]] 176 then 177 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 178 elif [[ "$memtrack" == "FULL" ]] 179 then 180 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 181 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 182 else 183 echo "Bad choice for --memtrack argument : choose between 'light','full'" 184 exit 185 fi 176 186 fi 177 187 -
XIOS/dev/branch_yushan_merged/src/client.cpp
r1156 r1157 292 292 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 ; 293 293 report(100)<<CTimer::getAllCumulatedTime()<<endl ; 294 }294 } 295 295 */ 296 296 } -
XIOS/dev/branch_yushan_merged/src/cxios.cpp
r1156 r1157 163 163 delete globalRegistry ; 164 164 } 165 166 165 #ifdef XIOS_MEMTRACK 166 167 #ifdef XIOS_MEMTRACK_LIGHT 168 #pragma omp critical (_output) 169 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 170 #pragma omp critical (_output) 171 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 172 #endif 173 174 #ifdef XIOS_MEMTRACK_FULL 167 175 168 176 #ifdef XIOS_MEMTRACK_LIGHT … … 239 247 CServer::finalize(); 240 248 249 CServer::finalize(); 241 250 #ifdef XIOS_MEMTRACK 242 251 243 252 #ifdef XIOS_MEMTRACK_LIGHT 244 253 #pragma omp critical (_output) 245 { 246 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 247 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 248 } 254 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 255 #pragma omp critical (_output) 256 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 249 257 #endif 250 258 … … 253 261 MemTrack::TrackDumpBlocks(); 254 262 #endif 255 #endif 263 264 #endif 256 265 CServer::closeInfoStream(); 257 266 } -
XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp
r1156 r1157 1833 1833 1834 1834 singleDomain = (file->nbDomains == 1); 1835 1836 1835 StdString conv_str ; 1837 1836 if (file->convention_str.isEmpty()) … … 1841 1840 } 1842 1841 else conv_str=file->convention_str ; 1843 1842 1843 1844 1844 try 1845 1845 { … … 2274 2274 } 2275 2275 2276 2277 2276 CTimer::get("Files : writing data").resume(); 2278 2277 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count); -
XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp
r1156 r1157 57 57 CTimer::get("Files : create").resume(); 58 58 if (wmpi) 59 //CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp); 60 CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 59 CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 61 60 else 62 61 CNetCdfInterface::create(filename, mode, this->ncidp); -
XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp
r1156 r1157 4 4 #include "onetcdf4.hpp" 5 5 #include "netCdfInterface.hpp" 6 6 #include "timer.hpp" 7 7 // mpi_std.hpp 8 8 … … 60 60 this->getWriteDataInfos(name, record, array_size, sstart, scount, start, count); 61 61 CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend(); 62 63 62 if (data.numElements()*stringArrayLen != array_size) 64 63 { -
XIOS/dev/branch_yushan_merged/src/node/context.cpp
r1156 r1157 16 16 #include "timer.hpp" 17 17 #include "memtrack.hpp" 18 19 18 20 19 namespace xios { … … 1212 1211 { 1213 1212 calendar->update(step); 1214 #ifdef XIOS_MEMTRACK_LIGHT 1213 #ifdef XIOS_MEMTRACK_LIGHT 1214 #pragma omp critical (_output) 1215 1215 info(50) << " Current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ; 1216 1216 #endif 1217 1217 1218 if (hasClient) 1218 1219 { -
XIOS/dev/branch_yushan_merged/src/node/field.cpp
r1156 r1157 125 125 void CField::sendUpdateData(const CArray<double,1>& data) 126 126 { 127 CTimer::get(" Field :send data").resume();127 CTimer::get("XIOS send data").resume(); 128 128 129 129 CContext* context = CContext::getCurrent(); … … 177 177 } 178 178 179 CTimer::get(" Field :send data").suspend();179 CTimer::get("XIOS send data").suspend(); 180 180 } 181 181 -
XIOS/dev/branch_yushan_merged/src/timer.cpp
r1156 r1157 6 6 #include <sstream> 7 7 #include "tracer.hpp" 8 #include <iostream> 9 #include <sstream> 8 10 9 11 namespace xios … … 61 63 // return it->second; 62 64 63 if(allTimer_ptr == NULL) allTimer_ptr = new std::map<std::string,CTimer>;65 if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 64 66 65 67 std::map<std::string,CTimer>::iterator it = (*allTimer_ptr).find(name); … … 71 73 string CTimer::getAllCumulatedTime(void) 72 74 { 75 if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 76 73 77 std::ostringstream strOut ; 74 for(std::map<std::string,CTimer>::iterator it= allTimer.begin();it!=allTimer.end();++it)78 for(std::map<std::string,CTimer>::iterator it=(*allTimer_ptr).begin();it!=(*allTimer_ptr).end();++it) 75 79 strOut<<"Timer : "<<it->first<<" --> cumulated time : "<<it->second.getCumulatedTime()<<std::endl ; 76 80 return strOut.str() ; 77 81 } 82 78 83 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp
r1156 r1157 40 40 int currentlocalIndex = 0; 41 41 double currentWeight = 0.0; 42 42 43 43 44 for (int idx = 0; idx < nbLocalIndex; ++idx) -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp
r1156 r1157 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 38 int currentlocalIndex = 0; 39 39 40 for (int idx = 0; idx < nbLocalIndex; ++idx) 40 41 { -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp
r1156 r1157 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 38 int currentlocalIndex = 0; 39 39 40 for (int idx = 0; idx < nbLocalIndex; ++idx) 40 41 { -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp
r1156 r1157 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 38 int currentlocalIndex = 0; 39 39 40 40 for (int idx = 0; idx < nbLocalIndex; ++idx)
Note: See TracChangeset
for help on using the changeset viewer.