Skip to content

Commit

Permalink
Warning and issues reported by CCE #1490 (#1492)
Browse files Browse the repository at this point in the history
* fix(?) access to undefined reference nb_rep. (#1449)

* Correct for CCE Compiler Warnings:
iterate_matrix.F, Line = 1602 OpenMP reduction result, trace, does not have a subsequent use.
/xc/xc_tpss.F, Line = 168 OpenMP reduction result, non_coer, does not have a subsequent use.
core_ppnl.F, Line = 520 Privatized version of variable "natom" is used before it is defined.
commutator_rpnl.F, Line = 646 Privatized version of variable "natom" is used before it is defined.
xtb_matrices.F, Line = 1467 Variable "iw" is used before it is defined.

Still open:
nnp_model.F, Line = 187 Variable "j" is used before it is defined.
sap_kind_types.F, Line = 243 A loop starting at line 243 which was marked for worksharing will not be workshared.
  • Loading branch information
juerghutter committed Apr 27, 2021
1 parent 708c4a5 commit 5d1c1f8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/commutator_rpnl.F
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,12 @@ SUBROUTINE build_com_mom_nl(qs_kind_set, sab_all, sap_ppnl, eps_ppnl, particle_s
!$OMP PARALLEL &
!$OMP DEFAULT (NONE) &
!$OMP SHARED (basis_set, matrix_rv, matrix_rxrv, matrix_rrv, &
!$OMP sap_int, nkind, eps_ppnl, my_rv, my_rxrv, my_rrv, locks, sab_all) &
!$OMP sap_int, natom, nkind, eps_ppnl, my_rv, my_rxrv, my_rrv, locks, sab_all) &
!$OMP PRIVATE (ikind, jkind, iatom, jatom, cell_b, rab, &
!$OMP iab, irow, icol, blocks_rv, blocks_rxrv, blocks_rrv, &
!$OMP found, iac, ibc, alist_ac, alist_bc, acint, bcint, &
!$OMP achint, bchint, na, np, nb, kkind, kac, kbc, i, &
!$OMP go, asso_rv, asso_rxrv, asso_rrv, hash, natom)
!$OMP go, asso_rv, asso_rxrv, asso_rrv, hash)

!$OMP SINGLE
!$ ALLOCATE (locks(nlock))
Expand Down
4 changes: 2 additions & 2 deletions src/core_ppnl.F
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,12 @@ SUBROUTINE build_core_ppnl(matrix_h, matrix_p, force, virial, calculate_forces,
!$OMP DEFAULT (NONE) &
!$OMP SHARED (dokp, basis_set, matrix_h, cell_to_index,&
!$OMP sab_orb, matrix_p, sap_int, nkind, eps_ppnl, force, &
!$OMP locks, virial, use_virial, calculate_forces) &
!$OMP locks, natom, virial, use_virial, calculate_forces) &
!$OMP PRIVATE (ikind, jkind, iatom, jatom, cell_b, rab, &
!$OMP slot, iab, atom_a, f0, irow, icol, h_block, &
!$OMP found,p_block, iac, ibc, alist_ac, alist_bc, acint, bcint, &
!$OMP achint, bchint, na, np, nb, katom, j, fa, fb, rbc, rac, &
!$OMP kkind, kac, kbc, i, img, hash, iatom8, natom) &
!$OMP kkind, kac, kbc, i, img, hash, iatom8) &
!$OMP REDUCTION (+ : pv_thread, force_thread )

!$OMP SINGLE
Expand Down
6 changes: 2 additions & 4 deletions src/iterate_matrix.F
Original file line number Diff line number Diff line change
Expand Up @@ -1575,8 +1575,7 @@ SUBROUTINE matrix_sign_submatrix_mu_adjust(matrix_sign, matrix, mu, nelectron, t
!$OMP PARALLEL DEFAULT(NONE) &
#endif
!$OMP PRIVATE(sm, sm_sign, sm_size, sm_firstcol, sm_lastcol, j) &
!$OMP SHARED(dissection, myrank, my_sms, unit_nr, eigbufs, mu, new_mu) &
!$OMP REDUCTION(+:trace)
!$OMP SHARED(dissection, myrank, my_sms, unit_nr, eigbufs, mu, new_mu)
!$OMP DO SCHEDULE(GUIDED)
DO i = 1, SIZE(my_sms)
WRITE (unit_nr, '(T3,A,1X,I4,1X,A,1X,I6)') "Rank", myrank, "finalizing submatrix", my_sms(i)
Expand All @@ -1603,8 +1602,7 @@ SUBROUTINE matrix_sign_submatrix_mu_adjust(matrix_sign, matrix, mu, nelectron, t
!$OMP PARALLEL DEFAULT(NONE) &
#endif
!$OMP PRIVATE(sm, sm_sign, sm_size, sm_firstcol, sm_lastcol, j) &
!$OMP SHARED(dissection, myrank, my_sms, unit_nr, eigbufs, mu, new_mu) &
!$OMP REDUCTION(+:trace)
!$OMP SHARED(dissection, myrank, my_sms, unit_nr, eigbufs, mu, new_mu)
!$OMP DO SCHEDULE(GUIDED)
DO i = 1, SIZE(my_sms)
WRITE (unit_nr, '(T3,A,1X,I4,1X,A,1X,I6)') "Rank", myrank, "reprocessing submatrix", my_sms(i)
Expand Down
4 changes: 4 additions & 0 deletions src/xc/xc_tpss.F
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ SUBROUTINE tpss_lda_eval(rho_set, deriv_set, grad_deriv, tpss_params)
!$OMP END PARALLEL

logger => cp_get_default_logger()
! we could check if tau/grad were consistent, but don't do anything here
IF (non_coer > 0) THEN
non_coer = 0
END IF
CALL timestop(handle)
END SUBROUTINE tpss_lda_eval
Expand Down
7 changes: 6 additions & 1 deletion src/xtb_matrices.F
Original file line number Diff line number Diff line change
Expand Up @@ -1443,9 +1443,14 @@ SUBROUTINE force_field_pack_nonbond_pot_correction(atomic_kind_set, nonbonded, p
LOGICAL :: found
REAL(KIND=dp) :: ewald_rcut
TYPE(atomic_kind_type), POINTER :: atomic_kind
TYPE(cp_logger_type), POINTER :: logger
TYPE(pair_potential_single_type), POINTER :: pot
NULLIFY (pot)
NULLIFY (pot, logger)
logger => cp_get_default_logger()
iw = cp_logger_get_default_io_unit(logger)
DO ikind = 1, SIZE(atomic_kind_set)
atomic_kind => atomic_kind_set(ikind)
CALL get_atomic_kind(atomic_kind=atomic_kind, name=name_atm_a_local)
Expand Down

0 comments on commit 5d1c1f8

Please sign in to comment.