diff --git a/Makefile.Defines b/Makefile.Defines index 9aaf2c700..31998e38a 100644 --- a/Makefile.Defines +++ b/Makefile.Defines @@ -53,7 +53,7 @@ VTUNE_FLAGS = -g -O2 -vec -simd -shared-intel -qopenmp -debug inline-debug-info IDEBUG = -O0 -nogen-interfaces -no-pie -no-ftz -fpe-all=0 -g -traceback -mp1 -fp-model strict -fpe0 -debug all -align all -pad -ip -prec-div -prec-sqrt -assume protect-parens -CB -no-wrap-margin -init=snan,arrays -STRICTREAL = -mp1 -fp-model strict -prec-div -prec-sqrt -assume protect-parens +STRICTREAL = -fp-model strict -fp-model no-except -prec-div -prec-sqrt -assume protect-parens SIMDVEC = -simd -xhost -align all -assume contiguous_assumed_shape -vecabi=cmdtarget -prec-div -prec-sqrt -assume protect-parens PAR = -parallel -qopenmp HEAPARR = -heap-arrays 1048576 @@ -68,8 +68,8 @@ GPAR = -fopenmp -ftree-parallelize-loops=4 GMEM = -fsanitize=undefined -fsanitize=address -fsanitize=leak GWARNINGS = -Wall -Warray-bounds -Wimplicit-interface -Wextra -Warray-temporaries -FFLAGS = $(IDEBUG) $(HEAPARR) -#FFLAGS = -init=snan,arrays -no-wrap-margin -fp-model strict -fp-model no-except -traceback -g $(OPTIMIZE) -O3 $(SIMDVEC) $(PAR) $(HEAPARR) +#FFLAGS = $(IDEBUG) $(HEAPARR) +FFLAGS = -init=snan,arrays -no-wrap-margin -O3 $(STRICTREAL) $(SIMDVEC) $(PAR) FORTRAN = ifort #AR = xiar diff --git a/src/driftkick/drift.f90 b/src/driftkick/drift.f90 index bea9ef2d8..31afa8c08 100644 --- a/src/driftkick/drift.f90 +++ b/src/driftkick/drift.f90 @@ -45,7 +45,6 @@ module pure elemental subroutine drift_one(mu, px, py, pz, vx, vy, vz, dt, iflag end subroutine drift_one pure subroutine drift_dan(mu, x0, v0, dt0, iflag) - !$omp declare simd !! author: David A. Minton !! !! Perform Kepler drift, solving Kepler's equation in appropriate variables @@ -115,7 +114,6 @@ pure subroutine drift_dan(mu, x0, v0, dt0, iflag) end subroutine drift_dan pure subroutine drift_kepmd(dm, es, ec, x, s, c) - !$omp declare simd !! author: David A. Minton !! !! Solve Kepler's equation in difference form for an ellipse for small input dm and eccentricity @@ -154,7 +152,6 @@ pure subroutine drift_kepmd(dm, es, ec, x, s, c) end subroutine drift_kepmd pure subroutine drift_kepu(dt,r0,mu,alpha,u,fp,c1,c2,c3,iflag) - !$omp declare simd !! author: David A. Minton !! !! Solve Kepler's equation in universal variables @@ -182,7 +179,6 @@ pure subroutine drift_kepu(dt,r0,mu,alpha,u,fp,c1,c2,c3,iflag) end subroutine drift_kepu pure subroutine drift_kepu_fchk(dt, r0, mu, alpha, u, s, f) - !$omp declare simd !! author: David A. Minton !! !! Computes the value of f, the function whose root we are trying to find in universal variables @@ -205,7 +201,6 @@ pure subroutine drift_kepu_fchk(dt, r0, mu, alpha, u, s, f) end subroutine drift_kepu_fchk pure subroutine drift_kepu_guess(dt, r0, mu, alpha, u, s) - !$omp declare simd !! author: David A. Minton !! !! Compute initial guess for solving Kepler's equation using universal variables @@ -243,7 +238,6 @@ pure subroutine drift_kepu_guess(dt, r0, mu, alpha, u, s) end subroutine drift_kepu_guess pure subroutine drift_kepu_lag(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) - !$omp declare simd !! author: David A. Minton !! !! Solve Kepler's equation in universal variables using Laguerre's method @@ -288,7 +282,6 @@ pure subroutine drift_kepu_lag(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) end subroutine drift_kepu_lag pure subroutine drift_kepu_new(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) - !$omp declare simd !! author: David A. Minton !! !! Solve Kepler's equation in universal variables using Newton's method @@ -330,7 +323,6 @@ pure subroutine drift_kepu_new(s, dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag) end subroutine drift_kepu_new pure subroutine drift_kepu_p3solve(dt, r0, mu, alpha, u, s, iflag) - !$omp declare simd !! author: David A. Minton !! !! Computes real root of cubic involved in setting initial guess for solving Kepler's equation in universal variables @@ -374,7 +366,6 @@ pure subroutine drift_kepu_p3solve(dt, r0, mu, alpha, u, s, iflag) end subroutine drift_kepu_p3solve pure subroutine drift_kepu_stumpff(x, c0, c1, c2, c3) - !$omp declare simd !! author: David A. Minton !! !! Compute Stumpff functions needed for Kepler drift in universal variables diff --git a/src/driftkick/kick.f90 b/src/driftkick/kick.f90 index 95e34a1d9..97a2b2bab 100644 --- a/src/driftkick/kick.f90 +++ b/src/driftkick/kick.f90 @@ -17,7 +17,6 @@ module subroutine kick_vh_body(self, dt) associate(n => self%nbody, vh => self%vh, ah => self%ah, status => self%status) if (n == 0) return - !!$omp simd do i = 1, n if (status(i) == ACTIVE) vh(:, i) = vh(:, i) + ah(:, i) * dt end do diff --git a/src/eucl/eucl.f90 b/src/eucl/eucl.f90 index 4a71bc5ff..519a38d76 100644 --- a/src/eucl/eucl.f90 +++ b/src/eucl/eucl.f90 @@ -62,7 +62,6 @@ module subroutine eucl_irij3_plpl(self) real(DP) :: rji2 associate(k_eucl => self%k_eucl, xh => self%xh, irij3 => self%irij3, nk => self%num_comparisons) - !$omp simd do k = 1, nk i = k_eucl(1, k) j = k_eucl(2, k) diff --git a/src/helio/helio_drift.f90 b/src/helio/helio_drift.f90 index 15b2ce94a..ff0adc03a 100644 --- a/src/helio/helio_drift.f90 +++ b/src/helio/helio_drift.f90 @@ -44,7 +44,6 @@ module subroutine helio_drift_pl(self, cb, param, dt) dtp(:) = dt end if - !!$omp simd call drift_one(mu(1:npl), xh(1,1:npl), xh(2,1:npl), xh(3,1:npl), & vb(1,1:npl), vb(2,1:npl), vb(3,1:npl), & dtp(1:npl), iflag(1:npl)) diff --git a/src/io/io.f90 b/src/io/io.f90 index f23b1631c..69f2d82ea 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -983,7 +983,7 @@ module subroutine io_read_frame_system(self, iu, param, form, t, ierr) return end if end if - ierr = io_read_hdr(iu, t, self%pl%nbody, self%tp%nbody, param%out_form, param%out_type) + ierr = io_read_hdr(iu, t, self%pl%nbody, self%tp%nbody, param%out_form, param%out_type) if (ierr /= 0) then write(*, *) "Swiftest error:" write(*, *) " Binary output file already exists or cannot be accessed" diff --git a/src/modules/swiftest_classes.f90 b/src/modules/swiftest_classes.f90 index 85cf84530..7be1b04b3 100644 --- a/src/modules/swiftest_classes.f90 +++ b/src/modules/swiftest_classes.f90 @@ -599,7 +599,6 @@ module subroutine orbel_el2xv_vec(self, cb) end subroutine orbel_el2xv_vec module pure subroutine orbel_scget(angle, sx, cx) - !$omp declare simd(orbel_scget) implicit none real(DP), intent(in) :: angle real(DP), intent(out) :: sx, cx diff --git a/src/modules/swiftest_operators.f90 b/src/modules/swiftest_operators.f90 index c82edc71f..b5b4ce078 100644 --- a/src/modules/swiftest_operators.f90 +++ b/src/modules/swiftest_operators.f90 @@ -15,42 +15,36 @@ module swiftest_operators interface operator(.cross.) 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 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 end function operator_cross_dp 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 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 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 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/rmvs/rmvs_encounter_check.f90 b/src/rmvs/rmvs_encounter_check.f90 index 438693c41..3d5543166 100644 --- a/src/rmvs/rmvs_encounter_check.f90 +++ b/src/rmvs/rmvs_encounter_check.f90 @@ -28,7 +28,6 @@ module function rmvs_encounter_check_tp(self, cb, pl, dt, rts) result(lencounter r2crit(:) = (rts * rhill(:))**2 plencP(:) = 0 do j = 1, npl - !$omp simd private(xr,vr,r2,v2,vdotr,lflag) do i = 1, ntp if ((status(i) /= ACTIVE).or.(plencP(i) /= 0)) cycle xr(:) = xht(:, i) - xbeg(:, j) diff --git a/src/whm/whm_drift.f90 b/src/whm/whm_drift.f90 index 64ba44441..d5f915b13 100644 --- a/src/whm/whm_drift.f90 +++ b/src/whm/whm_drift.f90 @@ -43,7 +43,6 @@ module subroutine whm_drift_pl(self, cb, param, dt) dtp(:) = dt end if - !!$omp simd call drift_one(mu(1:npl), xj(1,1:npl), xj(2,1:npl), xj(3,1:npl), & vj(1,1:npl), vj(2,1:npl), vj(3,1:npl), & dtp(1:npl), iflag(1:npl)) diff --git a/src/whm/whm_getacch.f90 b/src/whm/whm_getacch.f90 index d7201adcc..2bfed8d8f 100644 --- a/src/whm/whm_getacch.f90 +++ b/src/whm/whm_getacch.f90 @@ -220,7 +220,6 @@ pure subroutine whm_getacch_ah3_tp(cb, pl, tp, xh) if (ntp == 0) return do i = 1, ntp acc(:) = 0.0_DP - !!$omp simd private(dx,rji2,irij3,fac) reduction(-:acc) do j = 1, npl dx(:) = xht(:, i) - xh(:, j) rji2 = dot_product(dx(:), dx(:))