sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

Histogram does not handle floating point data correctly

Open pdbj opened this issue 2 years ago • 2 comments

New Issue for sst-core

1 - Detailed description of problem or enhancement HistogramStatistic does not handle floating data values (x axis) correctly, because

  • m_binWidth is of the wrong type (is NumBinsType, an int, should be BinDataType, which could be float)
  • Calculation of bin_start in addData_impl_Ntimes is incorrect

2 - Describe how to reproduce the issue

  • Create a float histogram with
{'type' : 'sst.HistogramStatistic',
  'minvalue' : '-0.5',
  'binwidth' : '0.1',
  'numbins'  : '10'"
  • Fill with uniform RNG on [0,1) - 0.5

3 - What Operating system(s) and versions NA

4 - What version of external libraries (Boost, MPI) NA

5 - Provide sha1 of all relevant sst repositories (sst-core, sst-elements, etc) Current devel and master

6 - Fill out Labels, Milestones, and Assignee fields as best possible

pdbj avatar Aug 11 '22 23:08 pdbj

This commit fixes the problem.

pdbj avatar Aug 11 '22 23:08 pdbj

If this is still a problem, please submit a pull request from a branch with the isolated changes instead of posting a commit. That will make it possible to quickly see if there are issues with the changes and you can easily make any necessary fixes.

berquist avatar Jun 23 '23 16:06 berquist