I am trying to compile a codebase with nvfortran, but I am currently stuck on some “managed attribute mismatched” errors, how can I find the cause of this? The errors are there even when no attribute is added to the variable declaration, and is still present if I add the managed attribute to both the variable declaration and the subroutine parameter.
The code looks something like this
complex(dp), managed, allocatable :: hdgAinv(:,:)
....
call hdg_build_Ainv_1D_line(hdgAinv, &
ctx_dg%vol_matrix_mass(i_order_cell)%array, &
ctx_dg%vol_matrix_dphi_phi(i_order_cell)%array, &
sumface_phii_phij,ctx_dg%inv_jac(:,:,i_cell), &
ctx_dg%det_jac(i_cell),kappa,rho,ndof_vol, &
freq,ctx_dg%pml_cell_coeff(:,i_cell),ctx_err)
subroutine hdg_build_Ainv_1D_line(Ainv,vol_phi_phi,vol_dphi_phi, &
sumface_phii_phij,inv_jac,det_jac, &
kappa,rho,ndof_vol,freq,pml_coeff, &
ctx_err)
implicit none
complex(dp), managed ,intent(inout):: Ainv(:,:)
real (kind=RKIND_POL) ,intent(in) :: vol_phi_phi(:,:)
real (kind=RKIND_POL) ,intent(in) :: vol_dphi_phi(:,:,:)
complex(dp), managed, allocatable ,intent(in) :: sumface_phii_phij(:,:)
real(dp) ,intent(in) :: inv_jac(:,:)
real(dp) ,intent(in) :: det_jac
complex(dp) ,intent(in) :: kappa
real(dp) ,intent(in) :: rho
complex(dp) ,intent(in) :: freq
complex(dp) ,intent(in) :: pml_coeff(:)
integer ,intent(in) :: ndof_vol
type(t_error) ,intent(inout):: ctx_err
This is not the only routine where I get the error, but I’m getting
NVFORTRAN-S-0536-Argument number 1 to hdg_build_ainv_1d_line: managed attribute mismatch (/.../m_create_matrix_refelem.f90: 369)
NVFORTRAN-S-0536-Argument number 4 to hdg_build_ainv_1d_line: managed attribute mismatch (/.../m_create_matrix_refelem.f90: 369)
I had this error with no managed attributes at the start, I tried to add managed to each of them, both in their declaration and the parameter, but I still get this error, am I missing something?