You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found when using PSyAD to generate adjoint kernel for science/gungho/source/kernel/solver/apply_mixed_operator_kernel_mod.F90 for LFRic Apps ticket 669.
The relevant bits of the required patch file for the generated adjoint kernel are:
The lines starting with the variable u_e are calling LBOUND on an array section rather than an array, so this always returns 1 (https://gcc.gnu.org/onlinedocs/gfortran/LBOUND.html) and the adjoint produced was incorrect.
The idx_7 loop: firstly the LBOUND statement within the loop does not compile since it's being called on a scalar, but even so, the entire loop is unnecessary; the forward code contains the line: t_col(:) = t_col(:) * mt_lumped_inv(iwt:iwt+1+nm1)
and since t_col is an active variable but mt_lumped_inv is a constant, the adjoint should contain the identical line (as seen in the patch).
The text was updated successfully, but these errors were encountered:
Found when using PSyAD to generate adjoint kernel for
science/gungho/source/kernel/solver/apply_mixed_operator_kernel_mod.F90
for LFRic Apps ticket 669.The relevant bits of the required patch file for the generated adjoint kernel are:
There appears to be two problems here:
u_e
are callingLBOUND
on an array section rather than an array, so this always returns 1 (https://gcc.gnu.org/onlinedocs/gfortran/LBOUND.html) and the adjoint produced was incorrect.idx_7
loop: firstly theLBOUND
statement within the loop does not compile since it's being called on a scalar, but even so, the entire loop is unnecessary; the forward code contains the line:t_col(:) = t_col(:) * mt_lumped_inv(iwt:iwt+1+nm1)
and since
t_col
is an active variable butmt_lumped_inv
is a constant, the adjoint should contain the identical line (as seen in the patch).The text was updated successfully, but these errors were encountered: