Skip to content

Looking for solutions for error "compiling kernel #gpu_calculate_Gc!" when using discrete forcing #3089

Discussion options

You must be logged in to vote

To be a little more specific about your bug, in your case, parameters to be passed to the discrete forcing should be a NamedTuple, not a simple Tuples (since you are accessing them like this P_forcing(p.Vm, p.Ks, p.m, p.Rm, p.iv, p.gama, p.d, fields.P[i, j, k], fields.N[i, j, k], fields.Z[i, j, k])).
Converting your tuples to namedtuples like this

P_dynamics = Forcing(P_forcing, discrete_form=true, parameters=(; Vm, Ks, m, Rm, iv, gama, d))

should clear your problem

EDIT
You also have to change the signature of your P_forcing function to match the call

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@zwei961120
Comment options

@simone-silvestri
Comment options

@simone-silvestri
Comment options

Answer selected by zwei961120
@glwagner
Comment options

@zwei961120
Comment options

@glwagner
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants