Commit ed322a40251dde9ee82276d7d297f68a217fa14b
1 parent
6c66c03a
Reduce memory usage by disposing the event lists after usage.
Showing
5 changed files
with
18 additions
and
3 deletions
NEWS
| ... | ... | @@ -85,6 +85,9 @@ is set to the map centre. This is only identical to the pointing in |
| 85 | 85 | case of binning a single event list and using the usepnt=yes option |
| 86 | 86 | (or specifying the pointing manually as the xref and yref parameters). |
| 87 | 87 | |
| 88 | +Memory usage has been reduced by disposing the event lists after their | |
| 89 | +usage. | |
| 90 | + | |
| 88 | 91 | |
| 89 | 92 | 8. ctlike - Maximum likelihood fitting |
| 90 | 93 | -------------------------------------- |
| ... | ... | @@ -141,6 +144,9 @@ the use for 2D response functions in FITS files. |
| 141 | 144 | ctmodel now also supports the handling of energy dispersion. Energy |
| 142 | 145 | dispersion can be switched on or off using the hidden edisp parameter. |
| 143 | 146 | |
| 147 | +Memory usage has been reduced by disposing the event lists after their | |
| 148 | +usage. | |
| 149 | + | |
| 144 | 150 | |
| 145 | 151 | 12. ctexpcube - CTA exposure cube generation |
| 146 | 152 | -------------------------------------------- |
| ... | ... | @@ -165,6 +171,9 @@ ctbkgcube computes the background cube for an observation definition |
| 165 | 171 | file. The cube definition may be taken from a counts cube or may be |
| 166 | 172 | specified by user parameters. |
| 167 | 173 | |
| 174 | +Memory usage has been reduced by disposing the event lists after their | |
| 175 | +usage. | |
| 176 | + | |
| 168 | 177 | |
| 169 | 178 | 15. ctcubemask - CTA cube filtering |
| 170 | 179 | ----------------------------------- | ... | ... |
src/ctbin/ctbin.cpp
src/ctbkgcube/ctbkgcube.cpp
src/ctmodel/ctmodel.cpp
| ... | ... | @@ -273,6 +273,9 @@ void ctmodel::run(void) |
| 273 | 273 | // Fill the cube |
| 274 | 274 | fill_cube(obs); |
| 275 | 275 | |
| 276 | + // Dispose events to free memory | |
| 277 | + obs->dispose_events(); | |
| 278 | + | |
| 276 | 279 | } // endif: CTA observation found |
| 277 | 280 | |
| 278 | 281 | } // endfor: looped over observations |
| ... | ... | @@ -481,8 +484,6 @@ void ctmodel::get_parameters(void) |
| 481 | 484 | |
| 482 | 485 | // Read observation definition filename and response parameters |
| 483 | 486 | m_obsfile = (*this)["obsfile"].filename(); |
| 484 | - m_caldb = (*this)["caldb"].string(); | |
| 485 | - m_irf = (*this)["irf"].string(); | |
| 486 | 487 | |
| 487 | 488 | // If no observation definition file has been specified then read all |
| 488 | 489 | // parameters that are necessary to create an observation from scratch | ... | ... |
src/ctobssim/ctobssim.cpp
| ... | ... | @@ -323,7 +323,6 @@ void ctobssim::run(void) |
| 323 | 323 | // is enabled, this loop will be parallelized. |
| 324 | 324 | #pragma omp for |
| 325 | 325 | for (int i = 0; i < m_obs.size(); ++i) { |
| 326 | -std::cout << "Observation " << i << ": " << get_current_rss() << std::endl; | |
| 327 | 326 | |
| 328 | 327 | // Get pointer on CTA observation |
| 329 | 328 | GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]); | ... | ... |