The values were indeed equal and the change to ASSERT(costMin >= userGCRatio); avoids the failure. I added code to print the values if they are equal and we get: costMin = 0.111111111111111104943205418749 userGCRatio = 0.111111111111111104943205418749 which is the nearest value to 1/9 for a double.
In case you're wondering which commit introduces the regression, it was d0815825. The previous commit 3ca17b4b does not show this problem. I looked at the log for just libpolyml/heapsizing.cpp and this change seemed the best candidate and got lucky.
Phil
On 28/01/2016 12:02, David Matthews wrote:
Phil,
On 27/01/2016 19:52, Phil Clayton wrote:
I am getting the following assertion failure with Poly/ML 5.6:
eg_test: heapsizing.cpp:602: bool HeapSizeParameters::getCostAndSize(POLYUNSIGNED&, double&, bool): Assertion `costMin > userGCRatio' failed.
To get some timing stats, I was running a test application repeatedly to take an average time. It would appear that the sooner I re-run the application after the previous run has terminated, the more likely the above failure is to occur. There is no failure when I run the test once per second manually. Running the test application in quick succession using the command ./eg_test ; ./eg_test gives the failure every 3 to 4 invocations. Is there more information I can provide?
Poly/ML 5.5.2 doesn't exhibit this issue.
This is very strange. The only thing I can think of is that the system is taking time to free up memory released when the previous run completes.
I've looked at the code and there haven't been any real changes in that area. It would be helpful to have some sort of idea which commit starts to show the problem. Could you check whether it fails if you change the assertion to: ASSERT(costMin >= userGCRatio); The test before is "cost < userGCRatio" so it is possible that it's exactly equal. These are doubles so the chances are low.
Regards, David _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml