StreamHPC / gromacs

OpenCL porting of the GROMACS molecular simulation toolkit
http://www.gromacs.org
Other
25 stars 4 forks source link

Log here errors related to running Gromacs with OpenCL enabled #44

Open ancahamuraru opened 9 years ago

ancahamuraru commented 9 years ago

Specify the error (log error/execution error/crash, etc) and also details about the OpenCL device in use.

ancahamuraru commented 9 years ago

Underflow error in put_atoms_in_box(...). It blocks either in the first or in the second while loop:

for (i = 0; i < natoms; i++)
{
for (d = 0; d < npbcdim; d++)
{ while (x[i][d] < 0) { x[i][d] += box[d][d]; } while (x[i][d] >= box[d][d]) { x[i][d] -= box[d][d]; } } }
It happens after > 50 kernel executions.

NVIDIA 660M GTX, Windows 7

ancahamuraru commented 9 years ago

On NVIDIA 660M GTX, it runs through the end, no errors, no hanging, no crashes if configuring gmx to be single-threaded:

ancahamuraru commented 9 years ago

On I7-3610 QM Intel CPU it runs through the end, no errors, no hanging, no crashes if configuring gmx to be single-threaded:

and if explicitly adding barrier(CLK_LOCAL_MEM_FENCE); everywhere where #if WARP_SIZE_TEST==1 is present. (The #if WARP_SIZE_TEST == 1 path is not active as the WARP_SIZE_TEST is 128).

Moreover, the output is the same as the output of running the OpenCL implementation on NVIDIA 660M GTX.

Unfortunately, these results are different from those generated by the CUDA implementation. Running gmx check with -abstol 1 for the energies shows 13 differences: There are 31 terms to compare in the energy files

Reading energy frame 0 time 5.000 Bond step 5000: 7264.91, step 5000: 7272.94 Angle step 5000: 7491.95, step 5000: 7466.55 LJ (SR) step 5000: -23020.8, step 5000: 0 Potential step 5000: 6359.32, step 5000: 29359.3 Kinetic En. step 5000: 22602.7, step 5000: 22662.4 Total Energy step 5000: 28962, step 5000: 52021.7 Pressure step 5000: 198.367, step 5000: 66.2904 Vir-XX step 5000: 5546.08, step 5000: 7872.33 Vir-YY step 5000: 6079.57, step 5000: 7359.07 Vir-ZZ step 5000: 7744.44, step 5000: 6350.71 Pres-XX step 5000: 371.001, step 5000: -78.1237 Pres-YY step 5000: 283.184, step 5000: 62.4676 Pres-ZZ step 5000: -59.083, step 5000: 214.527

Surf*SurfTen step 5000: -2182.04, step 5000: 1256.39

Last energy frame read 0 time 5.000 Files read successfully