From dc7cc315d0f6a98542da7fc64633dbecdc2c2da3 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sun, 10 Oct 2021 08:37:52 -0400 Subject: [PATCH] Removed redundant declare simd statements --- src/drift/drift.f90 | 10 ---------- src/encounter/encounter_check.f90 | 4 +--- src/helio/helio_drift.f90 | 1 - src/kick/kick.f90 | 2 -- src/modules/encounter_classes.f90 | 4 ++-- src/operators/operator_cross.f90 | 7 ------- src/operators/operator_mag.f90 | 2 -- src/orbel/orbel.f90 | 13 ------------- src/util/util_flatten.f90 | 1 - 9 files changed, 3 insertions(+), 41 deletions(-) diff --git a/src/drift/drift.f90 b/src/drift/drift.f90 index dd53a40b3..eca05b01b 100644 --- a/src/drift/drift.f90 +++ b/src/drift/drift.f90 @@ -88,7 +88,6 @@ end subroutine drift_all module pure elemental subroutine drift_one(mu, px, py, pz, vx, vy, vz, dt, iflag) - !!$omp declare simd(drift_one) !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott !! !! Perform Danby drift for one body, redoing drift with smaller substeps if original accuracy is insufficient @@ -119,7 +118,6 @@ end subroutine drift_one pure subroutine drift_dan(mu, px0, py0, pz0, vx0, vy0, vz0, dt0, iflag) - !!$omp declare simd(drift_dan) !! author: David A. Minton !! !! Perform Kepler drift, solving Kepler's equation in appropriate variables @@ -197,7 +195,6 @@ end subroutine drift_dan pure subroutine drift_kepmd(dm, es, ec, x, s, c) - !!$omp declare simd(drift_kepmd) !! author: David A. Minton !! !! Solve Kepler's equation in difference form for an ellipse for small input dm and eccentricity @@ -243,7 +240,6 @@ end subroutine drift_kepmd pure subroutine drift_kepu(dt,r0,mu,alpha,u,fp,c1,c2,c3,iflag) - !!$omp declare simd(drift_kepu) !! author: David A. Minton !! !! Solve Kepler's equation in universal variables @@ -272,7 +268,6 @@ end subroutine drift_kepu pure subroutine drift_kepu_fchk(dt, r0, mu, alpha, u, s, f) - !!$omp declare simd(drift_kepu_fchk) !! author: David A. Minton !! !! Computes the value of f, the function whose root we are trying to find in universal variables @@ -303,7 +298,6 @@ end subroutine drift_kepu_fchk pure subroutine drift_kepu_guess(dt, r0, mu, alpha, u, s) - !!$omp declare simd(drift_kepu_guess) !! author: David A. Minton !! !! Compute initial guess for solving Kepler's equation using universal variables @@ -348,7 +342,6 @@ end subroutine drift_kepu_guess pure subroutine drift_kepu_lag(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) - !!$omp declare simd(drift_kepu_lag) !! author: David A. Minton !! !! Solve Kepler's equation in universal variables using Laguerre's method @@ -403,7 +396,6 @@ end subroutine drift_kepu_lag pure subroutine drift_kepu_new(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) - !!$omp declare simd(drift_kepu_new) !! author: David A. Minton !! !! Solve Kepler's equation in universal variables using Newton's method @@ -455,7 +447,6 @@ end subroutine drift_kepu_new pure subroutine drift_kepu_p3solve(dt, r0, mu, alpha, u, s, iflag) - !!$omp declare simd(drift_kepu_p3solve) !! author: David A. Minton !! !! Computes real root of cubic involved in setting initial guess for solving Kepler's equation in universal variables @@ -506,7 +497,6 @@ end subroutine drift_kepu_p3solve pure subroutine drift_kepu_stumpff(x, c0, c1, c2, c3) - !!$omp declare simd(drift_kepu_stumpff) !! author: David A. Minton !! !! Compute Stumpff functions needed for Kepler drift in universal variables diff --git a/src/encounter/encounter_check.f90 b/src/encounter/encounter_check.f90 index 1cf71296f..f6fee0652 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -770,7 +770,6 @@ end subroutine encounter_check_all_triangular_pltp module pure subroutine encounter_check_one(xr, yr, zr, vxr, vyr, vzr, renc, dt, lencounter, lvdotr) - !!$omp declare simd(encounter_check_one) !! author: David A. Minton !! !! Determine whether a test particle and planet are having or will have an encounter within the next time step @@ -838,6 +837,7 @@ module subroutine encounter_check_collapse_ragged_list(ragged_list, n1, nenc, in end associate if (nenc == 0) return + allocate(index1(nenc)) allocate(index2(nenc)) if (present(lvdotr)) allocate(lvdotr(nenc)) @@ -1068,7 +1068,6 @@ end subroutine encounter_check_sweep_aabb_all_single_list pure subroutine encounter_check_sweep_aabb_one_double_list(i, n1, n2, ntot, ext_ind, ibegxi, iendxi, ibegyi, iendyi, ibegx, iendx, ibegy, iendy, lencounteri) - !!$omp declare simd(encounter_check_sweep_aabb_one_double_list) !! author: David A. Minton !! !! Performs a sweep operation on a single body. Encounters from the same lists not allowed (e.g. pl-tp encounters only) @@ -1101,7 +1100,6 @@ end subroutine encounter_check_sweep_aabb_one_double_list pure subroutine encounter_check_sweep_aabb_one_single_list(n, ext_ind, ibegxi, iendxi, ibegyi, iendyi, ibegx, iendx, ibegy, iendy, lencounteri) - !!$omp declare simd(encounter_check_sweep_aabb_one_single_list) !! author: David A. Minton !! !! Performs a sweep operation on a single body. Mutual encounters allowed (e.g. pl-pl) diff --git a/src/helio/helio_drift.f90 b/src/helio/helio_drift.f90 index 2b63e1408..4ccb56d98 100644 --- a/src/helio/helio_drift.f90 +++ b/src/helio/helio_drift.f90 @@ -76,7 +76,6 @@ end subroutine helio_drift_tp pure elemental subroutine helio_drift_linear_one(xhx, xhy, xhz, ptx, pty, ptz, dt) - !!$omp declare simd(helio_drift_linear_one) implicit none real(DP), intent(inout) :: xhx, xhy, xhz real(DP), intent(in) :: ptx, pty, ptz, dt diff --git a/src/kick/kick.f90 b/src/kick/kick.f90 index 7208de656..59b837408 100644 --- a/src/kick/kick.f90 +++ b/src/kick/kick.f90 @@ -212,7 +212,6 @@ end subroutine kick_getacch_int_all_tp module pure subroutine kick_getacch_int_one_pl(rji2, xr, yr, zr, Gmi, Gmj, axi, ayi, azi, axj, ayj, azj) - !!$omp declare simd(kick_getacch_int_one_pl) !! author: David A. Minton !! !! Compute direct cross (third) term heliocentric accelerations for a single pair of massive bodies @@ -244,7 +243,6 @@ end subroutine kick_getacch_int_one_pl module pure subroutine kick_getacch_int_one_tp(rji2, xr, yr, zr, GMpl, ax, ay, az) - !!$omp declare simd(kick_getacch_int_one_tp) !! author: David A. Minton !! !! Compute direct cross (third) term heliocentric accelerations of a single test particle massive body pair. diff --git a/src/modules/encounter_classes.f90 b/src/modules/encounter_classes.f90 index 09e2c3324..6576efbf6 100644 --- a/src/modules/encounter_classes.f90 +++ b/src/modules/encounter_classes.f90 @@ -10,7 +10,7 @@ module encounter_classes integer(I4B), parameter :: SWEEPDIM = 2 type :: encounter_list - integer(I4B) :: nenc !! Total number of encounters + integer(I4B) :: nenc = 0 !! Total number of encounters logical, dimension(:), allocatable :: lvdotr !! relative vdotr flag integer(I4B), dimension(:), allocatable :: status !! status of the interaction integer(I4B), dimension(:), allocatable :: index1 !! position of the first body in the encounter @@ -52,7 +52,7 @@ module encounter_classes interface module subroutine encounter_check_all(nenc, index1, index2, x1, v1, x2, v2, renc1, renc2, dt, lencounter, lvdotr) implicit none - integer(I4B), intent(in) :: nenc !! Number of encounters in the encounter lists + integer(I4B), intent(in) :: nenc !! Number of encounters in the encounter lists integer(I4B), dimension(:), intent(in) :: index1 !! List of indices for body 1 in each encounter integer(I4B), dimension(:), intent(in) :: index2 !! List of indices for body 2 in each encounter1 real(DP), dimension(:,:), intent(in) :: x1, v1 !! Array of indices of bodies 1 diff --git a/src/operators/operator_cross.f90 b/src/operators/operator_cross.f90 index 17b9ff929..5a9f8fd28 100644 --- a/src/operators/operator_cross.f90 +++ b/src/operators/operator_cross.f90 @@ -8,7 +8,6 @@ contains module pure function operator_cross_sp(A, B) result(C) - !!$omp declare simd(operator_cross_sp) implicit none real(SP), dimension(:), intent(in) :: A, B real(SP), dimension(3) :: C @@ -19,7 +18,6 @@ module pure function operator_cross_sp(A, B) result(C) end function operator_cross_sp module pure function operator_cross_dp(A, B) result(C) - !!$omp declare simd(operator_cross_dp) implicit none real(DP), dimension(:), intent(in) :: A, B real(DP), dimension(3) :: C @@ -30,7 +28,6 @@ module pure function operator_cross_dp(A, B) result(C) end function operator_cross_dp module pure function operator_cross_qp(A, B) result(C) - !!$omp declare simd(operator_cross_qp) implicit none real(QP), dimension(:), intent(in) :: A, B real(QP), dimension(3) :: C @@ -41,7 +38,6 @@ module pure function operator_cross_qp(A, B) result(C) end function operator_cross_qp module pure function operator_cross_i1b(A, B) result(C) - !!$omp declare simd(operator_cross_i1b) implicit none integer(I1B), dimension(:), intent(in) :: A, B integer(I1B), dimension(3) :: C @@ -52,7 +48,6 @@ module pure function operator_cross_i1b(A, B) result(C) end function operator_cross_i1b module pure function operator_cross_i2b(A, B) result(C) - !!$omp declare simd(operator_cross_i2b) implicit none integer(I2B), dimension(:), intent(in) :: A, B integer(I2B), dimension(3) :: C @@ -63,7 +58,6 @@ module pure function operator_cross_i2b(A, B) result(C) end function operator_cross_i2b module pure function operator_cross_i4b(A, B) result(C) - !!$omp declare simd(operator_cross_i4b) implicit none integer(I4B), dimension(:), intent(in) :: A, B integer(I4B), dimension(3) :: C @@ -74,7 +68,6 @@ module pure function operator_cross_i4b(A, B) result(C) end function operator_cross_i4b module pure function operator_cross_i8b(A, B) result(C) - !!$omp declare simd(operator_cross_i8b) implicit none integer(I8B), dimension(:), intent(in) :: A, B integer(I8B), dimension(3) :: C diff --git a/src/operators/operator_mag.f90 b/src/operators/operator_mag.f90 index 4056e696e..5a054d5ce 100644 --- a/src/operators/operator_mag.f90 +++ b/src/operators/operator_mag.f90 @@ -7,7 +7,6 @@ contains module pure function operator_mag_sp(A) result(B) - !!$omp declare simd(operator_mag_sp) implicit none real(SP), dimension(:), intent(in) :: A real(SP) :: B @@ -16,7 +15,6 @@ module pure function operator_mag_sp(A) result(B) end function operator_mag_sp module pure function operator_mag_dp(A) result(B) - !!$omp declare simd(operator_mag_dp) implicit none real(DP), dimension(:), intent(in) :: A real(DP) :: B diff --git a/src/orbel/orbel.f90 b/src/orbel/orbel.f90 index 6bb9ece5e..daf549908 100644 --- a/src/orbel/orbel.f90 +++ b/src/orbel/orbel.f90 @@ -129,7 +129,6 @@ end subroutine orbel_el2xv module pure subroutine orbel_scget(angle, sx, cx) - !!$omp declare simd(orbel_scget) !! author: David A. Minton !! !! Efficiently compute the sine and cosine of an input angle @@ -182,7 +181,6 @@ end subroutine orbel_scget ! REVISIONS: !********************************************************************** pure subroutine orbel_schget(angle,shx,chx) - !!$omp declare simd(orbel_schget) real(DP), intent(in) :: angle real(DP), intent(out) :: shx,chx @@ -213,7 +211,6 @@ end subroutine orbel_schget ! REVISIONS: !********************************************************************** real(DP) pure function orbel_flon(e,icapn) - !!$omp declare simd(orbel_flon) implicit none real(DP), intent(in) :: e, icapn integer(I4B) :: iflag,i @@ -301,7 +298,6 @@ end function orbel_flon ! REVISIONS: 2/26/93 hfl !********************************************************************** real(DP) pure function orbel_fget(e,capn) - !!$omp declare simd(orbel_fget) implicit none real(DP), intent(in) :: e,capn @@ -372,7 +368,6 @@ end function orbel_fget ! series for small Q. !********************************************************************** real(DP) pure function orbel_zget(iq) - !!$omp declare simd(orbel_zget) implicit none real(DP), intent(in) :: iq @@ -428,7 +423,6 @@ end function orbel_zget ! REVISIONS: 2/26/93 hfl !********************************************************************** real(DP) pure function orbel_esolmd(e,m) - !!$omp declare simd(orbel_esolmd) implicit none real(DP), intent(in) :: e @@ -484,7 +478,6 @@ end function orbel_esolmd ! REVISIONS: !********************************************************************** real(DP) pure function orbel_ehie(e,im) - !!$omp declare simd(orbel_ehie) implicit none real(DP), intent(in) :: e,im @@ -560,7 +553,6 @@ end function orbel_ehie ! we have an ellipse with e between 0.15 and 0.8 !********************************************************************** real(DP) pure function orbel_eget(e,m) - !!$omp declare simd(orbel_eget) implicit none real(DP), intent(in) :: e,m @@ -634,7 +626,6 @@ end function orbel_eget ! REVISIONS: 2/26/93 hfl !********************************************************************** real(DP) pure function orbel_ehybrid(e,m) - !!$omp declare simd(orbel_ehybrid) implicit none real(DP), intent(in) :: e,m @@ -674,7 +665,6 @@ end function orbel_ehybrid ! REVISIONS: 2/26/93 hfl !********************************************************************** real(DP) pure function orbel_fhybrid(e,n) - !!$omp declare simd(orbel_fhybrid) implicit none real(DP), intent(in) :: e,n @@ -694,7 +684,6 @@ end function orbel_fhybrid module pure subroutine orbel_xv2aeq(mu, px, py, pz, vx, vy, vz, a, e, q) - !!$omp declare simd(orbel_xv2aeq) !! author: David A. Minton !! !! Compute semimajor axis, eccentricity, and pericentric distance from relative Cartesian position and velocity @@ -760,7 +749,6 @@ end subroutine orbel_xv2aeq module pure subroutine orbel_xv2aqt(mu, px, py, pz, vx, vy, vz, a, q, capm, tperi) - !!$omp declare simd(orbel_xv2aqt) !! author: David A. Minton !! !! Compute semimajor axis, pericentric distance, mean anomaly, and time to nearest pericenter passage from @@ -899,7 +887,6 @@ end subroutine orbel_xv2el_vec pure subroutine orbel_xv2el(mu, px, py, pz, vx, vy, vz, a, e, inc, capom, omega, capm) - !!$omp declare simd(orbel_xv2el) !! author: David A. Minton !! !! Compute osculating orbital elements from relative Cartesian position and velocity diff --git a/src/util/util_flatten.f90 b/src/util/util_flatten.f90 index 0dddd95d5..b124d031d 100644 --- a/src/util/util_flatten.f90 +++ b/src/util/util_flatten.f90 @@ -3,7 +3,6 @@ contains module pure subroutine util_flatten_eucl_ij_to_k(n, i, j, k) - !!$omp declare simd(util_flatten_eucl_ij_to_k) !! author: Jacob R. Elliott and David A. Minton !! !! Turns i,j indices into k index for use in the Euclidean distance matrix for pl-pl interactions.