[PATCH] D38417: [test-suite] Adding HACCKernels app

Brian Homerding via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 10:13:57 PST 2017


homerdin added inline comments.


================
Comment at: MultiSource/Benchmarks/DOE-ProxyApps-C++/HACCKernels/Makefile:4
+PROG     = HACCKernels
+FP_TOLERANCE = 0.00001
+CXXFLAGS = -ffast-math -DVERIFICATION_OUTPUT_ONLY=ON
----------------
spatel wrote:
> hfinkel wrote:
> > spatel wrote:
> > > That's not big enough? We're seeing a 0.001 difference in the output string. Is that wiggle acceptable for this program? How high can we go before we decide the result is bogus?
> > > 
> > > You can reproduce this locally if you have at least a Sandybridge to test on. Ie, if you specify -march=nehalem (or nothing), you should see "689.584" in the output, but if you specify -march=sandybridge, you should see "689.585". 
> > > 
> > > I don't know what underlying transforms cause that difference, but that seems like a reasonable error for -ffast-math.
> > > 
> > > That's not big enough? We're seeing a 0.001 difference in the output string. Is that wiggle acceptable for this program? How high can we go before we decide the result is bogus?
> > 
> > Why not? It's a relative tolerance.  (We have FP_ABSTOLERANCE for setting the absolute tolerance).
> > 
> > In any case, the changes generally come from the inverse sqrt approximation. I think we should set this to not much more than needed for observed divergence.
> > 
> > Brian, were you able to confirm that this tolerance is sufficient?
> Ah, sorry - I missed that this was relative. In that case, it should be ok.
Yes, I was able to reproduce the original issue and this tolerance level is sufficient.  (689.585 / 689.584) - 1 = .00000145
```
-- Testing: 1 tests, 1 threads --
PASS: test-suite :: MultiSource/Benchmarks/DOE-ProxyApps-C++/HACCKernels/HACCKernels.test (1 of 1)
********** TEST 'test-suite :: MultiSource/Benchmarks/DOE-ProxyApps-C++/HACCKernels/HACCKernels.test' RESULTS **********
compile_time: 0.7596 
exec_time: 0.4761 
hash: "8676d81cf540659eb9466f24e6275c19" 
link_time: 0.0196 
**********
Testing Time: 0.61s
  Expected Passes    : 1
[bhomerding at thing03 HACCKernels]$ less Output/HACCKernels.test.out
Iterations: 450
Gravity Short-Range-Force Kernel (4th Order): 34376.3 689.585 -2378.97
Gravity Short-Range-Force Kernel (5th Order): 34361.8 689.282 -2378.1
Gravity Short-Range-Force Kernel (6th Order): 34360.9 689.252 -2378.1
exit 0
```


https://reviews.llvm.org/D38417





More information about the llvm-commits mailing list