diff --git a/fortitude.toml b/fortitude.toml index a29338ac..a2e923b6 100644 --- a/fortitude.toml +++ b/fortitude.toml @@ -6,7 +6,6 @@ ignore = [ "S102", # incorrect-space-before-comment, we should enable this, autofix enable "M011", # use-all (should use "only:") "M001", # procedure-not-in-module (need a per-file ignore for init.F90) - "T031", # missing-intent "T042", # assumed-size-character-intent TODO: We should fix all instances! ] line-length = 132 diff --git a/src/en_restraint.F90 b/src/en_restraint.F90 index 6289b820..dde43bee 100644 --- a/src/en_restraint.F90 +++ b/src/en_restraint.F90 @@ -166,7 +166,7 @@ subroutine energy_restraint(x, y, z, px, py, pz, eclas) eclas = eclas ! + quadratic_restraint_energy !Output to en_restraint.dat - write (UERMD, '(I8,F16.8,E20.10,E20.10,F16.8)') it, excE * AUTOEV, deltaE, 0.0, 0.0 + write (UERMD, '(I8,F16.8,E20.10,E20.10,F16.8)') it, excE * AUTOEV, deltaE, 0.0D0, 0.0D0 end if diff --git a/src/fftw_interface.F90 b/src/fftw_interface.F90 index 7690bd70..b782f5ec 100644 --- a/src/fftw_interface.F90 +++ b/src/fftw_interface.F90 @@ -72,16 +72,16 @@ subroutine fftw_normalmodes_init(nwalk) end subroutine fftw_normalmodes_init subroutine dft_normalmode2cart(nm, cart) - complex(C_DOUBLE_COMPLEX), dimension(:) :: nm - real(C_DOUBLE), dimension(:) :: cart + complex(C_DOUBLE_COMPLEX), dimension(:), intent(inout) :: nm + real(C_DOUBLE), dimension(:), intent(inout) :: cart cart = 0.0D0 nm = (0.0D0, 0.0D0) call not_compiled_with('FFTW library') end subroutine dft_normalmode2cart subroutine dft_cart2normalmode(cart, nm) - complex(C_DOUBLE_COMPLEX), dimension(:) :: nm - real(C_DOUBLE), dimension(:) :: cart + complex(C_DOUBLE_COMPLEX), dimension(:), intent(inout) :: nm + real(C_DOUBLE), dimension(:), intent(inout) :: cart cart = 0.0D0 nm = (0.0D0, 0.0D0) call not_compiled_with('FFTW library') diff --git a/src/fortran_interfaces.F90 b/src/fortran_interfaces.F90 index fc4aabe0..182937a3 100644 --- a/src/fortran_interfaces.F90 +++ b/src/fortran_interfaces.F90 @@ -68,7 +68,7 @@ end subroutine omp_set_num_threads function usleep(useconds) bind(c, name='usleep') import :: C_INT, C_INT32_T implicit none - integer(kind=C_INT32_T), value :: useconds + integer(kind=C_INT32_T), intent(in), value :: useconds integer(kind=C_INT) :: usleep end function usleep diff --git a/src/modules.F90 b/src/modules.F90 index 23047cd1..4734e23e 100644 --- a/src/modules.F90 +++ b/src/modules.F90 @@ -62,7 +62,7 @@ end subroutine set_natom subroutine update_simtime(dt) use mod_const, only: DP - real(DP) :: dt + real(DP), intent(in) :: dt sim_time = sim_time + dt end subroutine update_simtime end module mod_general diff --git a/src/nosehoover.F90 b/src/nosehoover.F90 index ea0e49ff..336a461b 100644 --- a/src/nosehoover.F90 +++ b/src/nosehoover.F90 @@ -445,9 +445,10 @@ end function get_nhc_temp ! Suzuki-Yoshida split-operator integrator for global NHC subroutine shiftNHC_yosh(px, py, pz, amt, dt) use mod_system, only: dime - real(DP) :: px(:, :), py(:, :), pz(:, :) - real(DP) :: amt(:, :), G(MAXCHAIN) - real(DP) :: dt, ekin2, AA + real(DP), intent(inout) :: px(:, :), py(:, :), pz(:, :) + real(DP), intent(in) :: amt(:, :), dt + real(DP) :: G(MAXCHAIN) + real(DP) :: ekin2, AA real(DP) :: wdt, wdt2, wdt4, pscale integer :: iw, iat, inh integer :: nf, iresp, iyosh @@ -528,11 +529,10 @@ end subroutine shiftNHC_yosh subroutine shiftNHC_yosh_mass(px, py, pz, amt, dt) use mod_general use mod_shake, only: nshake - real(DP) :: px(:, :), py(:, :), pz(:, :) - real(DP) :: amt(:, :) + real(DP), intent(inout) :: px(:, :), py(:, :), pz(:, :) + real(DP), intent(in) :: amt(:, :), dt real(DP) :: Gx(MAXCHAIN), Gy(MAXCHAIN), Gz(MAXCHAIN) - real(DP) :: dt, AA - real(DP) :: wdt, wdt2, wdt4 + real(DP) :: AA, wdt, wdt2, wdt4 integer :: iw, iat, inh, istart integer :: iresp, iyosh diff --git a/src/pbc.F90 b/src/pbc.F90 index 61da04e3..dca94a51 100644 --- a/src/pbc.F90 +++ b/src/pbc.F90 @@ -14,7 +14,7 @@ module PBC subroutine wrap(x, y, z) use mod_general, only: nwalk - real(DP) :: x(:, :), y(:, :), z(:, :) + real(DP), intent(inout) :: x(:, :), y(:, :), z(:, :) integer :: i, iat, iat2, iw, iww, iwrap iwrap = 0 diff --git a/src/random.F90 b/src/random.F90 index 18f78209..8712ba3e 100644 --- a/src/random.F90 +++ b/src/random.F90 @@ -705,7 +705,7 @@ end subroutine random_ints ! Taken from: ! https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gfortran/RANDOM_005fSEED.html integer function lcg(s) - integer(INT64) :: s + integer(INT64), intent(inout) :: s if (s == 0) then s = 104729