bem_coulomb_fmm_periodic_cell_cache Module

periodic2 root operator のセル単位 cache の読み書きと排他。前計算の数値部分(bem_coulomb_fmm_periodic_root_ops) からファイル I/O とロックを分けたもの。呼ぶのは MPI root だけで、collective は使わない。


Uses

  • module~~bem_coulomb_fmm_periodic_cell_cache~~UsesGraph module~bem_coulomb_fmm_periodic_cell_cache bem_coulomb_fmm_periodic_cell_cache module~bem_coulomb_fmm_periodic_cache bem_coulomb_fmm_periodic_cache module~bem_coulomb_fmm_periodic_cell_cache->module~bem_coulomb_fmm_periodic_cache module~bem_coulomb_fmm_types bem_coulomb_fmm_types module~bem_coulomb_fmm_periodic_cell_cache->module~bem_coulomb_fmm_types module~bem_filesystem bem_filesystem module~bem_coulomb_fmm_periodic_cell_cache->module~bem_filesystem module~bem_kinds bem_kinds module~bem_coulomb_fmm_periodic_cell_cache->module~bem_kinds module~bem_coulomb_fmm_periodic_cache->module~bem_filesystem module~bem_coulomb_fmm_periodic_cache->module~bem_kinds iso_fortran_env iso_fortran_env module~bem_coulomb_fmm_periodic_cache->iso_fortran_env module~bem_coulomb_fmm_types->module~bem_kinds module~bem_mpi bem_mpi module~bem_coulomb_fmm_types->module~bem_mpi module~bem_panel_geometry bem_panel_geometry module~bem_coulomb_fmm_types->module~bem_panel_geometry module~bem_periodic_shell_mean bem_periodic_shell_mean module~bem_coulomb_fmm_types->module~bem_periodic_shell_mean module~bem_periodic_zero_mode_plan bem_periodic_zero_mode_plan module~bem_coulomb_fmm_types->module~bem_periodic_zero_mode_plan iso_c_binding iso_c_binding module~bem_filesystem->iso_c_binding module~bem_kinds->iso_fortran_env module~bem_mpi->module~bem_kinds module~bem_panel_geometry->module~bem_kinds ieee_arithmetic ieee_arithmetic module~bem_panel_geometry->ieee_arithmetic module~bem_periodic_shell_mean->module~bem_kinds module~bem_periodic_zero_mode_plan->module~bem_kinds module~bem_periodic_zero_mode_plan->ieee_arithmetic module~bem_constants bem_constants module~bem_periodic_zero_mode_plan->module~bem_constants module~bem_sorting bem_sorting module~bem_periodic_zero_mode_plan->module~bem_sorting module~bem_types bem_types module~bem_periodic_zero_mode_plan->module~bem_types module~bem_constants->module~bem_kinds module~bem_sorting->module~bem_kinds module~bem_types->module~bem_kinds module~bem_outflow_spectrum bem_outflow_spectrum module~bem_types->module~bem_outflow_spectrum module~bem_outflow_spectrum->module~bem_kinds sheath_model sheath_model module~bem_outflow_spectrum->sheath_model

Used by

  • module~~bem_coulomb_fmm_periodic_cell_cache~~UsedByGraph module~bem_coulomb_fmm_periodic_cell_cache bem_coulomb_fmm_periodic_cell_cache module~bem_coulomb_fmm_periodic_root_ops bem_coulomb_fmm_periodic_root_ops module~bem_coulomb_fmm_periodic_root_ops->module~bem_coulomb_fmm_periodic_cell_cache module~bem_coulomb_fmm_plan_ops bem_coulomb_fmm_plan_ops module~bem_coulomb_fmm_plan_ops->module~bem_coulomb_fmm_periodic_root_ops module~bem_coulomb_fmm_core_build bem_coulomb_fmm_core_build module~bem_coulomb_fmm_core_build->module~bem_coulomb_fmm_plan_ops

Derived Types

type, public ::  periodic_cell_cache_lock_type

欠けたセルを作って publish するまで保持する cache ロック。

Components

Type Visibility Attributes Name Initial
logical, public :: held = .false.
integer, public :: fd = -1

Subroutines

public subroutine lookup_cell_cache(plan, nanchor, required, cached_cells, cached_blocks, have, lock)

required のセルを cache から読む。足りなければ cache ディレクトリを作ってロックを取り、待つ間に他の job が 足したセルを読み直す。それでも足りなければロックを保持したまま返し、呼び出し側が作ったセルを publish_cell_cache_and_unlock で書く。have は cache から得たセル。

Arguments

Type IntentOptional Attributes Name
type(fmm_plan_type), intent(in) :: plan
integer(kind=i32), intent(in) :: nanchor
logical, intent(in) :: required(:)
integer(kind=i32), intent(out), allocatable :: cached_cells(:)
real(kind=dp), intent(out), allocatable :: cached_blocks(:,:,:)
logical, intent(out) :: have(:)
type(periodic_cell_cache_lock_type), intent(out) :: lock

public subroutine publish_cell_cache_and_unlock(plan, nanchor, cached_cells, cached_blocks, new_cells, new_blocks, lock)

cache にあったセルと新しく作ったセルを合わせて書き、ロックを外す。

Arguments

Type IntentOptional Attributes Name
type(fmm_plan_type), intent(in) :: plan
integer(kind=i32), intent(in) :: nanchor
integer(kind=i32), intent(in), allocatable :: cached_cells(:)
real(kind=dp), intent(in), allocatable :: cached_blocks(:,:,:)
integer(kind=i32), intent(in), allocatable :: new_cells(:)
real(kind=dp), intent(in), allocatable :: new_blocks(:,:,:)
type(periodic_cell_cache_lock_type), intent(inout) :: lock