Ejemplo n.º 1
0
 def test_production_runs(self):
     r"""Test production tests (those used in paper)."""
     self.check_filename()
     # Limit language list for tests
     for c in ['comm_type', 'language', 'platform', 'python_ver']:
         kwargs = copy.deepcopy(self.inst_kwargs)
         kwargs.update(compare=c, cleanup_plot=True, use_paper_values=True)
         if c in kwargs:
             del kwargs[c]
         timing.plot_scalings(**kwargs)
         # Also do MacOS plot w/ Matlab
         if c == 'language':
             kwargs['platform'] = 'MacOS'
             timing.plot_scalings(**kwargs)
Ejemplo n.º 2
0
def yggtime_paper():
    r"""Create plots for timing."""
    _lang_list = timing._lang_list
    _lang_list_nomatlab = copy.deepcopy(_lang_list)
    _lang_list_nomatlab.remove('matlab')
    timing.plot_scalings(compare='platform', python_ver='2.7')
    # All plots on Linux, no matlab
    timing.plot_scalings(compare='comm_type', platform='Linux', python_ver='2.7')
    timing.plot_scalings(compare='python_ver', platform='Linux')
    timing.plot_scalings(compare='language', platform='Linux', python_ver='2.7',
                         compare_values=_lang_list_nomatlab)
    # Language comparision on MacOS, with matlab
    timing.plot_scalings(compare='language', platform='MacOS', python_ver='2.7',
                         compare_values=_lang_list)
Ejemplo n.º 3
0
 def test_plot_scalings(self):
     r"""Test plot_scalings corner cases on test platform."""
     self.check_filename()
     kwargs = copy.deepcopy(self.inst_kwargs)
     kwargs.update(msg_size=[self.size], msg_size0=self.size,
                   msg_count=[self.count], msg_count0=self.count,
                   cleanup_plot=True)
     for c in ['comm_type', 'language', 'platform', 'python_ver']:
         ikws = copy.deepcopy(kwargs)
         ikws['compare'] = c
         if c in ikws:
             del ikws[c]
         if c == 'language':
             ikws['per_message'] = True
             ikws['compare_values'] = [self.language]
         timing.plot_scalings(**ikws)
     # Errors
     assert_raises(ValueError, timing.plot_scalings, compare='invalid')
     assert_raises(RuntimeError, timing.plot_scalings, compare='comm_type',
                   comm_type='zmq')
Ejemplo n.º 4
0
 def test_plot_scalings(self, check_filename, instance_kwargs, count, size,
                        language, close_figures, disable_verify_count_fds):
     r"""Test plot_scalings corner cases on test platform."""
     kwargs = copy.deepcopy(instance_kwargs)
     kwargs.update(msg_size=[size],
                   msg_size0=size,
                   msg_count=[count],
                   msg_count0=count,
                   cleanup_plot=True)
     for c in ['comm_type', 'language', 'platform', 'python_ver']:
         ikws = copy.deepcopy(kwargs)
         ikws['compare'] = c
         if c in ikws:
             del ikws[c]
         if c == 'language':
             ikws['per_message'] = True
             ikws['compare_values'] = [language]
         timing.plot_scalings(**ikws)
     # Errors
     with pytest.raises(ValueError):
         timing.plot_scalings(compare='invalid')
     with pytest.raises(RuntimeError):
         timing.plot_scalings(compare='comm_type', comm_type='zmq')
Ejemplo n.º 5
0
def yggtime_py():
    r"""Plot timing statistics comparing the different versions of Python."""
    from yggdrasil import timing
    timing.plot_scalings(compare='python')
Ejemplo n.º 6
0
def yggtime_os():
    r"""Plot timing statistics comparing the different operating systems."""
    from yggdrasil import timing
    timing.plot_scalings(compare='platform')
Ejemplo n.º 7
0
def yggtime_lang():
    r"""Plot timing statistics comparing the different languages."""
    from yggdrasil import timing
    timing.plot_scalings(compare='language')
Ejemplo n.º 8
0
def yggtime_comm():
    r"""Plot timing statistics comparing the different communication mechanisms."""
    from yggdrasil import timing
    timing.plot_scalings(compare='commtype')