compdyn / partmc

Particle-resolved stochastic atmospheric aerosol model
http://lagrange.mechse.illinois.edu/partmc/
GNU General Public License v2.0
28 stars 16 forks source link

GPU: Negative condition on rxn_photolysis #96

Closed cguzman95 closed 4 years ago

cguzman95 commented 5 years ago

On rxn_photolysis.cu, in deriv and jac calculation, I had to add the line

if (-rateYIELD_(i_spec)timestep <= state[PROD(i_spec)])

in order to avoid a crash. This line is used also on other reactions and is not affecting the results, but is strange

[UPDATED]: This bug was found pretty early on GPU development, maybe in recent versions it disappears.

cguzman95 commented 4 years ago

It's working fine now