StochasticNumerics / mimclib

A software library for UQ methods
GNU General Public License v2.0
6 stars 8 forks source link

Python subprocess32.py “OSError: [Errno 12] Cannot allocate memory” when plotting from the database #112

Open hammouc opened 7 years ago

hammouc commented 7 years ago

For some example that I am testing with misc, I tried to plot the results I got from the database but I got the error below. it plots perfectly up to TOL=1e-03 (for this example) but when I tried to go up to TOL=1e-04, I got that error related to memory. Is there anyway to solve this issue of running out of memory which is up to 64 GB?

Traceback (most recent call last): File "../plot_prog.py", line 3, in cProfile.run('foo()') File "/usr/lib/python2.7/cProfile.py", line 29, in run prof = prof.run(statement) File "/usr/lib/python2.7/cProfile.py", line 135, in run return self.runctx(cmd, dict, dict) File "/usr/lib/python2.7/cProfile.py", line 140, in runctx exec cmd in globals, locals File "", line 1, in NameError: name 'foo' is not defined hammouc@kw13921:~/Dropbox/Smoothing_project/code/mimclib/tests/1D_SDE_lognormal_case$ ./plot_example Plotting 1D_BS smooth result
Estimated exact value is 22.37422343210931 Traceback (most recent call last): File "../plot_prog.py", line 5, in run_program() File "/home/hammouc/Dropbox/Smoothing_project/code/mimclib/mimclib/plot.py", line 1365, in run_program else filteritr_convergent) File "/home/hammouc/Dropbox/Smoothing_project/code/mimclib/mimclib/plot.py", line 1285, in genPDFBooklet pdf.savefig(fig) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_pdf.py", line 2464, in savefig figure.savefig(self, format='pdf', kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1573, in savefig self.canvas.print_figure(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backend_bases.py", line 2252, in print_figure kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_pdf.py", line 2527, in print_pdf self.figure.draw(renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, args, kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1144, in draw renderer, self, dsu, self.suppressComposite) File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 2426, in draw mimage._draw_list_compositing_images(renderer, self, dsu) File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/axis.py", line 1138, in draw renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/axis.py", line 1078, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/text.py", line 967, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) File "/usr/local/lib/python2.7/dist-packages/matplotlib/text.py", line 353, in _get_layout ismath=False) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_pdf.py", line 2083, in get_text_width_height_descent renderer=self) File "/usr/local/lib/python2.7/dist-packages/matplotlib/texmanager.py", line 679, in get_text_width_height_descent page = next(iter(dvi)) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 89, in iter have_page = self._read() File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 150, in _read self._dispatch(byte) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 233, in _dispatch self._fnt_def(k, c, s, d, a, l, n) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 388, in _fnt_def tfm = _tfmfile(fontname) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 897, in _tfmfile return _fontfile(texname, Tfm, '.tfm', _tfmcache) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 887, in _fontfile filename = find_tex_file(texname + suffix) File "/usr/local/lib/python2.7/dist-packages/matplotlib/dviread.py", line 868, in find_tex_file stderr=subprocess.PIPE) File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 825, in init restore_signals, start_new_session) File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 1396, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory

haji-ali commented 6 years ago

Have you tried the new development version?