mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Added support for parallel runs to geometry overlap checking
This commit is contained in:
parent
f96e952c09
commit
00286f1e49
4 changed files with 23 additions and 4 deletions
|
|
@ -36,6 +36,7 @@ contains
|
|||
if (output_tallies) then
|
||||
if (master) call write_tallies()
|
||||
end if
|
||||
if (check_overlaps) call reduce_overlap_count()
|
||||
end if
|
||||
|
||||
#ifdef PETSC
|
||||
|
|
@ -69,4 +70,22 @@ contains
|
|||
|
||||
end subroutine finalize_run
|
||||
|
||||
!===============================================================================
|
||||
! REDUCE_OVERLAP_COUNT accumulates cell overlap check counts to master
|
||||
!===============================================================================
|
||||
|
||||
subroutine reduce_overlap_count()
|
||||
|
||||
#ifdef MPI
|
||||
if (master) then
|
||||
call MPI_REDUCE(MPI_IN_PLACE, overlap_check_cnt, n_cells, &
|
||||
MPI_INTEGER8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
else
|
||||
call MPI_REDUCE(overlap_check_cnt, overlap_check_cnt, n_cells, &
|
||||
MPI_INTEGER8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
end if
|
||||
#endif
|
||||
|
||||
end subroutine reduce_overlap_count
|
||||
|
||||
end module finalize
|
||||
|
|
|
|||
|
|
@ -275,8 +275,8 @@ module global
|
|||
integer :: verbosity = 7
|
||||
|
||||
! Flag for enabling cell overlap checking during transport
|
||||
logical :: check_overlaps = .false.
|
||||
integer, allocatable :: overlap_check_cnt(:)
|
||||
logical :: check_overlaps = .false.
|
||||
integer(8), allocatable :: overlap_check_cnt(:)
|
||||
|
||||
! Trace for single particle
|
||||
logical :: trace
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ contains
|
|||
if (particle_restart_run) run_mode = MODE_PARTICLE
|
||||
|
||||
! Warn if overlap checking is on
|
||||
if (check_overlaps) then
|
||||
if (master .and. check_overlaps) then
|
||||
message = ""
|
||||
call write_message()
|
||||
message = "Cell overlap checking is ON"
|
||||
|
|
|
|||
|
|
@ -1504,7 +1504,7 @@ contains
|
|||
write(ou,*)
|
||||
|
||||
100 format (1X,A,T15,A)
|
||||
101 format (1X,I8,T15,I8)
|
||||
101 format (1X,I8,T15,I12)
|
||||
|
||||
end subroutine print_overlap_check
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue