sst-core
sst-core copied to clipboard
Histogram does not handle floating point data correctly
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
inaddData_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
This commit fixes the problem.
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.