MultiGroupServer Derived Type

type, public, extends(BaseServer) :: MultiGroupServer


Inherits

type~~multigroupserver~~InheritsGraph type~multigroupserver MultiGroupServer type~baseserver BaseServer type~multigroupserver->type~baseserver type~simplecommsplitter SimpleCommSplitter type~multigroupserver->type~simplecommsplitter splitter type~vector_array vector_array type~multigroupserver->type~vector_array buffers type~abstractserver AbstractServer type~baseserver->type~abstractserver type~serverthreadvector ServerThreadVector type~baseserver->type~serverthreadvector threads type~abstractcommsplitter AbstractCommSplitter type~simplecommsplitter->type~abstractcommsplitter type~commgroupdescriptionvector CommGroupDescriptionVector type~simplecommsplitter->type~commgroupdescriptionvector group_descriptions StringInteger64Map StringInteger64Map type~abstractserver->StringInteger64Map prefetch_offset, stage_offset type~abstractdatareferencevector AbstractDataReferenceVector type~abstractserver->type~abstractdatareferencevector dataRefPtrs type~commgroupdescription CommGroupDescription type~commgroupdescriptionvector->type~commgroupdescription elements type~v_wrapper~13 v_Wrapper type~serverthreadvector->type~v_wrapper~13 elements type~v_wrapper~9 v_Wrapper type~abstractdatareferencevector->type~v_wrapper~9 elements type~serverthread ServerThread type~v_wrapper~13->type~serverthread item

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: port_name
integer, public :: InNode_Comm
integer, public :: InNode_Rank
integer, public :: InNode_npes
integer, public :: NodeRoot_Comm
integer, public :: Node_Num
integer, public :: Node_Rank
integer, public, allocatable :: Node_Ranks(:)
integer, public :: back_Comm
integer, public, allocatable :: back_ranks(:)
integer, public :: comm
integer, public :: front_Comm
integer, public, allocatable :: front_ranks(:)
integer, public :: nfront
integer, public :: npes
integer, public :: num_clients = 0
integer, public :: nwriter
integer, public :: rank
integer, public :: server_Comm
integer, public :: status
logical, public :: I_am_back_root
logical, public :: I_am_front_root
logical, public :: all_backlog_is_empty = .true.
logical, public, allocatable :: serverthread_done_msgs(:)
logical, public :: terminate
type(AbstractDataReferenceVector), public :: dataRefPtrs
type(ServerThreadVector), public :: threads
type(SimpleCommSplitter), public :: splitter
type(StringInteger64Map), public :: prefetch_offset
type(StringInteger64Map), public :: stage_offset
class(vector_array), public, allocatable :: buffers(:)

Constructor

public interface MultiGroupServer

  • private function new_MultiGroupServer(server_comm, port_name, nwriter_per_node, with_profiler, rc) result(s)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: server_comm
    character(len=*), intent(in) :: port_name
    integer, intent(in) :: nwriter_per_node
    logical, intent(in), optional :: with_profiler
    integer, intent(out), optional :: rc

    Return Value type(MultiGroupServer)


Type-Bound Procedures

procedure, public :: I_am_NodeRoot

  • private function I_am_NodeRoot(this) result(yes)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this

    Return Value logical

procedure, public :: I_am_ServerRoot

  • private function I_am_ServerRoot(this) result(yes)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this

    Return Value logical

procedure, public :: add_DataReference

  • private subroutine add_DataReference(this, DataRef)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    class(AbstractDataReference), intent(in), target :: DataRef

procedure, public :: add_connection

  • private subroutine add_connection(this, socket)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseServer), intent(inout), target :: this
    class(AbstractSocket), intent(in), target :: socket

procedure, public :: am_I_reading_PE

  • private function am_I_reading_PE(this, id) result(yes)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this
    integer, intent(in) :: id

    Return Value logical

procedure, public :: clean_up

  • private subroutine clean_up(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: clear_DataReference

  • private subroutine clear_DataReference(this)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout), target :: this

procedure, public :: clear_RequestHandle

  • private subroutine clear_RequestHandle(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: create_remote_win

  • private subroutine create_remote_win(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: distribute_task

  • private subroutine distribute_task(this, id, node_rank, innode_rank)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this
    integer, intent(in) :: id
    integer, intent(out) :: node_rank
    integer, intent(out) :: innode_rank

procedure, public :: get_AllBacklogIsEmpty

  • private function get_AllBacklogIsEmpty(this) result(status)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this

    Return Value logical

procedure, public :: get_DataFromMem

  • private subroutine get_DataFromMem(this, multi, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseServer), intent(inout), target :: this
    logical, intent(in) :: multi
    integer, intent(out), optional :: rc

procedure, public :: get_DataReference

  • private function get_DataReference(this, ith) result(DataRef)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in), target :: this
    integer, intent(in), optional :: ith

    Return Value class(AbstractDataReference), pointer

procedure, public :: get_communicator

  • private function get_communicator(this) result(communicator)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(in) :: this

    Return Value integer

procedure, public :: get_dmessage

  • private function get_dmessage(this, rc) result(dmessage)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseServer), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(AbstractMessage), pointer

procedure, public :: get_status

  • private function get_status(this) result(status)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this

    Return Value integer

procedure, public :: get_writing_PE

  • private function get_writing_PE(this, id) result(rank)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(in) :: this
    integer, intent(in) :: id

    Return Value integer

procedure, public :: init

  • private subroutine init(this, comm, port_name, profiler_name, with_profiler, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    integer, intent(in) :: comm
    character(len=*), intent(in) :: port_name
    character(len=*), intent(in), optional :: profiler_name
    logical, intent(in), optional :: with_profiler
    integer, intent(out), optional :: rc

procedure, public :: put_dataToFile => put_DataToFile

  • private subroutine put_DataToFile(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: receive_output_data

  • private subroutine receive_output_data(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: report_profile

  • private subroutine report_profile(this, RC)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    integer, intent(out), optional :: RC

procedure, public :: set_AllBacklogIsEmpty

  • private subroutine set_AllBacklogIsEmpty(this, status)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    logical :: status

procedure, public :: set_collective_request

  • private subroutine set_collective_request(this, request, have_done)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseServer), intent(inout), target :: this
    logical, intent(in) :: request
    logical, intent(in) :: have_done

procedure, public :: set_status

  • private subroutine set_status(this, status)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    integer, intent(in) :: status

procedure, public :: start

  • private subroutine start(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: start_back

  • private subroutine start_back(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: terminate_backend_server

  • private subroutine terminate_backend_server(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MultiGroupServer), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: update_status

  • private subroutine update_status(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractServer), intent(inout) :: this
    integer, intent(out), optional :: rc

Source Code

   type,extends (BaseServer) :: MultiGroupServer
      character(len=:), allocatable :: port_name
      integer :: front_Comm
      integer :: back_Comm
      integer :: server_Comm
      integer :: nwriter ! nback or number of back end
      integer :: nfront  ! number of front end
      logical :: I_am_front_root
      logical :: I_am_back_root
      integer, allocatable :: back_ranks(:)
      integer, allocatable :: front_ranks(:)
      class(vector_array), allocatable :: buffers(:)
      type(SimpleCommSplitter) :: splitter
   contains
      procedure :: start
      procedure :: start_back
      procedure :: get_communicator
      procedure :: receive_output_data
      procedure :: create_remote_win
      procedure :: put_dataToFile
      procedure :: clean_up
      procedure :: terminate_backend_server
   end type MultiGroupServer