Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Removed obsolete subroutine and fixed bugs in parameter io to make su…
Browse files Browse the repository at this point in the history
…re coarrays are turned on properly
  • Loading branch information
daminton committed Apr 21, 2023
1 parent d3a98d0 commit 695371d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
31 changes: 0 additions & 31 deletions src/swiftest/swiftest_coarray.f90
Original file line number Diff line number Diff line change
Expand Up @@ -529,35 +529,4 @@ module subroutine swiftest_coarray_distribute_system(nbody_system, param)
return
end subroutine swiftest_coarray_distribute_system


module subroutine swiftest_coarray_initialize_system(nbody_system, param)
!! author: David A. Minton
!!
!! Distributes test particles from image #1 out to all images.
implicit none
! Arguments
class(swiftest_nbody_system), allocatable, intent(inout) :: nbody_system !! Swiftest nbody system
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
! Internals
class(swiftest_nbody_system), allocatable, codimension[:] :: tmp_system
character(len=NAMELEN) :: image_num_char

if (.not.param%lcoarray) return

sync all
if (this_image() == 1) then
write(image_num_char,*) num_images()
write(param%display_unit,*) " Cloning nbody system to " // trim(adjustl(image_num_char)) // " images."
end if
allocate(tmp_system[*], source=nbody_system)
call tmp_system%coclone()
if (this_image() /= 1) then
if (allocated(nbody_system)) deallocate(nbody_system)
allocate(nbody_system, source=tmp_system)
end if

return
end subroutine swiftest_coarray_initialize_system


end submodule s_swiftest_coarray
1 change: 1 addition & 0 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2450,6 +2450,7 @@ module subroutine swiftest_io_param_writer(self, unit, iotype, v_list, iostat, i
call io_param_writer_one("ENCOUNTER_CHECK_PLPL", param%encounter_check_plpl, unit)
call io_param_writer_one("ENCOUNTER_CHECK_PLTP", param%encounter_check_pltp, unit)
call io_param_writer_one("ENCOUNTER_SAVE", param%encounter_save, unit)
call io_param_writer_one("COARRAY", param%lcoarray, unit)

if (param%lenergy) then
call io_param_writer_one("FIRSTENERGY", param%lfirstenergy, unit)
Expand Down
6 changes: 0 additions & 6 deletions src/swiftest/swiftest_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1711,12 +1711,6 @@ module subroutine swiftest_coarray_distribute_system(nbody_system, param)
class(swiftest_nbody_system), intent(inout) :: nbody_system !! Swiftest nbody system
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine swiftest_coarray_distribute_system

module subroutine swiftest_coarray_initialize_system(nbody_system, param)
implicit none
class(swiftest_nbody_system), allocatable, intent(inout) :: nbody_system !! Swiftest nbody system
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine swiftest_coarray_initialize_system
end interface

interface coclone
Expand Down

0 comments on commit 695371d

Please sign in to comment.