From 4fa3506f561ff0589a9be5283c521c43eaaf331a Mon Sep 17 00:00:00 2001 From: David Minton Date: Sat, 20 May 2023 16:44:54 -0400 Subject: [PATCH] Cleaned up a few more unused variables caught during testing on fresh install --- src/encounter/encounter_util.f90 | 6 ++---- src/swiftest/swiftest_io.f90 | 10 +++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/encounter/encounter_util.f90 b/src/encounter/encounter_util.f90 index f935afe5a..7307eb9cb 100644 --- a/src/encounter/encounter_util.f90 +++ b/src/encounter/encounter_util.f90 @@ -22,7 +22,7 @@ module subroutine encounter_util_append_list(self, source, lsource_mask) class(encounter_list), intent(in) :: source !! Source object to append logical, dimension(:), intent(in) :: lsource_mask !! Logical mask indicating which elements to append to ! Internals - integer(I4B) :: nold, nsrc + integer(I4B) :: nold nold = int(self%nenc, kind=I4B) call util_append(self%tcollision, source%tcollision, nold, lsource_mask) @@ -100,8 +100,6 @@ module subroutine encounter_util_dealloc_bounding_box(self) implicit none ! Arguments class(encounter_bounding_box), intent(inout) :: self !! Bounding box structure - ! Internals - integer(I4B) :: i call self%aabb%dealloc() @@ -341,7 +339,7 @@ module subroutine encounter_util_setup_aabb(self, n, n_last) integer(I4B), intent(in) :: n !! Number of objects with bounding box extents integer(I4B), intent(in) :: n_last !! Number of objects with bounding box extents the previous time this was called ! Internals - integer(I4B) :: next, next_last, k, dim + integer(I4B) :: next, next_last, k integer(I4B), dimension(:), allocatable :: itmp next = 2 * n diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index 0f2f6be2b..1e02a7645 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -414,7 +414,9 @@ module subroutine swiftest_io_dump_storage(self, param) class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters ! Internals integer(I4B) :: i +#ifdef COARRAY type(walltimer) :: iotimer +#endif if (self%iframe == 0) return call self%make_index_map() @@ -1043,7 +1045,7 @@ module subroutine swiftest_io_netcdf_get_valid_masks(self, plmask, tpmask) real(DP), dimension(:,:), allocatable :: rh integer(I4B), dimension(:), allocatable :: body_status logical, dimension(:), allocatable :: lvalid - integer(I4B) :: idmax, status,i + integer(I4B) :: idmax, status call netcdf_io_check( nf90_inquire_dimension(self%id, self%name_dimid, len=idmax), "swiftest_io_netcdf_get_valid_masks nf90_inquire_dimension name_dimid" ) @@ -1615,11 +1617,14 @@ module subroutine swiftest_io_netcdf_write_frame_body(self, nc, param) class(swiftest_netcdf_parameters), intent(inout) :: nc !! Parameters used to for writing a NetCDF dataset to file class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters ! Internals - integer(I4B) :: i, j, idslot, old_mode, ntp + integer(I4B) :: i, j, idslot, old_mode integer(I4B), dimension(:), allocatable :: ind real(DP), dimension(NDIM) :: vh !! Temporary variable to store heliocentric velocity values when converting from pseudovelocity in GR-enabled runs real(DP) :: a, e, inc, omega, capom, capm, varpi, lam, f, cape, capf +#ifdef COARRAY + integer(I4B) :: ntp logical, dimension(:), allocatable :: tpmask, plmask +#endif call self%write_info(nc, param) @@ -1798,7 +1803,6 @@ module subroutine swiftest_io_netcdf_write_hdr_system(self, nc, param) class(swiftest_netcdf_parameters), intent(inout) :: nc !! Parameters used to for writing a NetCDF dataset to file class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters ! Internals - logical, dimension(:), allocatable :: tpmask, plmask integer(I4B) :: tslot call nc%find_tslot(self%t, tslot)