-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad GPU results #17
Comments
the fact that the density is different is telling -- nothing should be changing the density in this unit test. although it is roundoff-level different |
I've compared temp_zone and dens_zone calculated inside the loop between PGI serial (debug) and gfortran serial. (with aprox13's input, haven't tried it for ignition_simple) Printing those variables with 15 sf shows they can differ by about 1E-7, which is the absolute difference in density you see above. My guess is that the roundoff error differs between the log10 or power operations implemented for PGI vs GNU. Doing the same for PGI-serial vs PGI-acc, I see smaller differences, but at least one difference nonetheless, e.g. dens_zone = 3414548.873833601 vs. dens_zone = 3414548.873833600 That suggests the difference you see in density, as Mike said, is roundoff, and that the integrator may not necessarily be doing anything to the density. |
good -- forgot that we are doing the exponentiation there. |
Some sleuthing indicates that
indicates that all
indicates bad output, such as
I'll continue investigating the origin of this, but wanted to note it in the issue thread. |
A quick note for the record: Max and I looked into this in depth and the origin of the issue appears to be the fact that 1) we're using |
oh fun. |
After the code was changed to not use fcompare react_ignition_test_react.VBDF react_ignition_test_react.VBDF.ACC/
variable name absolute error relative error
(||A - B||) (||A - B||/||A||)
----------------------------------------------------------------------
level = 1
density 0.000000000 0.000000000
temperature 0.000000000 0.000000000
Xnew_carbon-12 0.1465605415E-10 0.4396816244E-10
Xnew_oxygen-16 0.000000000 0.000000000
Xnew_magnesium-24 0.1465605415E-10 0.4396775531E-10
Xold_carbon-12 0.000000000 0.000000000
Xold_oxygen-16 0.000000000 0.000000000
Xold_magnesium-24 0.000000000 0.000000000
wdot_carbon-12 0.1465605415E-09 0.4748322189E-05
wdot_oxygen-16 0.000000000 0.000000000
wdot_magnesium-24 0.1465605415E-09 0.4748322189E-05
rho_Hnuc 0.1581619200E+18 0.4574365704E-05 Relative errors are at most about 5e-6 between CPU and GPU. |
Many of the results from GPU-accelerated unit-test code appear to be wrong. As a concrete example, I've built an accelerated and CPU-only executable of the
test_react
unit test.Build and execute an accelerated binary, move output for later comparison (note that I've supressed the output of commands):
Build and execute a CPU-only binary:
If I now compare the two output files, we see they're very different:
So while many networks and integrators seem to be able to compile and run without crashing, it's not clear how many are generating correct physical results. I've seen a similar issue with the VBDF integrator, so it doesn't appear to be specific to an integrator or network. These results are from
bender
, which has PGI 16.9 and a GeForce GTX 960 GPU (with CUDA 8.0 drivers and CUDA 7.5 compilers).The text was updated successfully, but these errors were encountered: