AutoDock-GPU icon indicating copy to clipboard operation
AutoDock-GPU copied to clipboard

Issues in genetic algorithm if NWI<4

Open ascheinb opened this issue 4 years ago • 2 comments

Found an issue in device/kernel4.cl:

The if statements starting on lines: 128, 136, and 163: if (get_local_id(0) < 4) if (get_local_id(0) < 2) if (get_local_id(0) < 2)

These lines assign a parent candidate index, parent index, and a crossover index. No problem if NWI>=4, but if NWI = 2 then two parent candidate indices are uninitialized. If NWI = 1 then all three assignments are buggy.

In the Kokkos version, I replaced these if statements with loops so that all candidates etc are assigned even if there is only 1 thread.

ascheinb avatar Mar 26 '20 22:03 ascheinb

Thank you, this is a bug in the develop branch. In the main branch NWI>=16. I like your solution and may adopt it here too. On the other hand, In order for the genetic algorithm to do a good job it may make sense to stick to the larger number of threads though...

atillack avatar Mar 26 '20 23:03 atillack

Bug is fixed. There is still some weirdness with NUMWI=1 on CPU, GPU is fine...

atillack avatar Apr 01 '20 01:04 atillack