ServerThread Derived Type

type, public, extends(BaseThread) :: ServerThread


Inherits

type~~serverthread~~InheritsGraph type~serverthread ServerThread IntegerVector IntegerVector type~serverthread->IntegerVector sub_array_types type~abstractserver AbstractServer type~serverthread->type~abstractserver containing_server type~basethread BaseThread type~serverthread->type~basethread type~extcollectionvector ExtCollectionVector type~serverthread->type~extcollectionvector ext_collections type~historycollectionvector HistoryCollectionVector type~serverthread->type~historycollectionvector hist_collections type~messagevector MessageVector type~serverthread->type~messagevector request_backlog StringInteger64Map StringInteger64Map type~abstractserver->StringInteger64Map prefetch_offset, stage_offset type~abstractdatareferencevector AbstractDataReferenceVector type~abstractserver->type~abstractdatareferencevector dataRefPtrs type~abstractsocket AbstractSocket type~basethread->type~abstractsocket connection type~integerrequestmap IntegerRequestMap type~basethread->type~integerrequestmap open_requests type~messagevisitor MessageVisitor type~basethread->type~messagevisitor type~extdatacollection ExtDataCollection type~extcollectionvector->type~extdatacollection elements type~historycollection HistoryCollection type~historycollectionvector->type~historycollection elements type~v_wrapper~7 v_Wrapper type~messagevector->type~v_wrapper~7 elements type~v_wrapper~9 v_Wrapper type~abstractdatareferencevector->type~v_wrapper~9 elements StringIntegerMap StringIntegerMap type~extdatacollection->StringIntegerMap file_ids type~formatterptrvector FormatterPtrVector type~extdatacollection->type~formatterptrvector formatters type~netcdf4_fileformatter NetCDF4_FileFormatter type~extdatacollection->type~netcdf4_fileformatter formatter type~filemetadata FileMetadata type~historycollection->type~filemetadata fmd type~stringnetcdf4_fileformattermap StringNetCDF4_FileFormatterMap type~historycollection->type~stringnetcdf4_fileformattermap formatters type~map_set~13 map_Set type~integerrequestmap->type~map_set~13 tree type~surrogatemessagevisitor SurrogateMessageVisitor type~messagevisitor->type~surrogatemessagevisitor type~abstractmessage AbstractMessage type~v_wrapper~7->type~abstractmessage item type~filemetadata->StringIntegerMap dimensions StringVector StringVector type~filemetadata->StringVector order type~stringvariablemap StringVariableMap type~filemetadata->type~stringvariablemap variables type~variable Variable type~filemetadata->type~variable global_var type~formatterptrvector->type~netcdf4_fileformatter elements type~map_s_basenode~13 map_s_BaseNode type~map_set~13->type~map_s_basenode~13 root type~set2~12 set2 type~stringnetcdf4_fileformattermap->type~set2~12 tree type~abstractdatareference AbstractDataReference type~v_wrapper~9->type~abstractdatareference item

Inherited by

type~~serverthread~~InheritedByGraph type~serverthread ServerThread type~mockserverthread MockServerThread type~mockserverthread->type~serverthread type~v_wrapper~12 v_Wrapper type~v_wrapper~12->type~serverthread item type~serverthreadvector ServerThreadVector type~serverthreadvector->type~v_wrapper~12 elements type~serverthreadvectoriterator ServerThreadVectorIterator type~serverthreadvectoriterator->type~v_wrapper~12 elements type~serverthreadvectorriterator ServerThreadVectorRIterator type~serverthreadvectorriterator->type~v_wrapper~12 elements type~baseserver BaseServer type~baseserver->type~serverthreadvector threads type~mockserver MockServer type~mockserver->type~baseserver type~mpiserver MpiServer type~mpiserver->type~baseserver type~multicommserver MultiCommServer type~multicommserver->type~baseserver type~multigroupserver MultiGroupServer type~multigroupserver->type~baseserver type~multilayerserver MultiLayerServer type~multilayerserver->type~baseserver type~openmpserver OpenMPServer type~openmpserver->type~baseserver type~portinfo PortInfo type~portinfo->type~baseserver server_ptr type~servermanager ServerManager type~servermanager->type~baseserver o_server

Components

Type Visibility Attributes Name Initial
logical, public :: terminate = .false.
type(HistoryCollectionVector), public :: hist_collections
type(MessageVector), public :: request_backlog

Constructor

public interface ServerThread

  • private function new_ServerThread(sckt, server, rc) result(s)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractSocket), intent(in), target :: sckt
    class(AbstractServer), intent(in), optional, target :: server
    integer, intent(out), optional :: rc

    Return Value type(ServerThread)


Type-Bound Procedures

procedure, public :: clear_RequestHandle

  • private subroutine clear_RequestHandle(this, rc)

    Arguments

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

procedure, public :: clear_backlog

  • private subroutine clear_backlog(this)

    Arguments

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

procedure, public :: clear_hist_collections

  • private subroutine clear_hist_collections(this)

    Arguments

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

procedure, public :: clear_subarray

  • private subroutine clear_subarray(this, rc)

    Arguments

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

procedure, public :: clear_terminate

  • private subroutine clear_terminate(this)

    Arguments

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

procedure, public :: do_terminate

  • private function do_terminate(this)

    Arguments

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

    Return Value logical

procedure, public :: erase_RequestHandle

  • private subroutine erase_RequestHandle(this, request_id, rc)

    Arguments

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

procedure, public :: get_DataFromFile

  • private subroutine get_DataFromFile(this, message, address, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractDataMessage), intent(in) :: message
    type(c_ptr), intent(in) :: address
    integer, intent(out), optional :: rc

procedure, public :: get_DataFromMem

  • private subroutine get_DataFromMem(this, multi_data_read, rc)

    Arguments

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

procedure, public :: get_RequestHandle

  • private function get_RequestHandle(this, request_id, rc) result(rh_ptr)

    Arguments

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

    Return Value class(AbstractRequestHandle), pointer

procedure, public :: get_connection

  • private function get_connection(this, rc) result(connection)

    Arguments

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

    Return Value class(AbstractSocket), pointer

procedure, public :: get_hist_collection

  • private function get_hist_collection(this, collection_id) result(c)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    integer, intent(in) :: collection_id

    Return Value type(HistoryCollection), pointer

procedure, public :: handle

  • private recursive subroutine handle(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    class(AbstractMessage), intent(in), target :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_AddReadDataCollection

  • private subroutine handle_AddReadDataCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(AddReadDataCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_AddWriteDataCollection

  • private subroutine handle_AddWriteDataCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(AddWriteDataCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_CollectivePrefetchData

  • private subroutine handle_CollectivePrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectivePrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_CollectiveStageData

  • private subroutine handle_CollectiveStageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectiveStageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done

  • private recursive subroutine handle_Done(this, message, rc)

    make sure this server thread will wait for all the other threads to finsh their backlog

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(DoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_collective_prefetch

  • private recursive subroutine handle_Done_collective_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectivePrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_collective_stage

  • private recursive subroutine handle_Done_collective_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectiveStageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_prefetch

  • private recursive subroutine handle_Done_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(PrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_stage

  • private recursive subroutine handle_Done_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(StageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_HandShake

  • private subroutine handle_HandShake(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(HandShakeMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Id

  • private subroutine handle_Id(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout) :: this
    type(IDMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_ModifyMetadata

  • private subroutine handle_ModifyMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(ModifyMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_PrefetchData

  • private subroutine handle_PrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(PrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_ReplaceMetadata

  • private subroutine handle_ReplaceMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(ReplaceMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_StageData

  • private subroutine handle_StageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(StageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Terminate

  • private subroutine handle_Terminate(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    type(TerminateMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done

  • private subroutine handle_Done(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(DoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_prefetch

  • private subroutine handle_Done_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(PrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_collective_prefetch

  • private subroutine handle_Done_collective_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectivePrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_stage

  • private subroutine handle_Done_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(StageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_collective_stage

  • private subroutine handle_Done_collective_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectiveStageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_AddReadDataCollection

  • private subroutine handle_AddReadDataCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(AddReadDataCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_AddWriteDataCollection

  • private subroutine handle_AddWriteDataCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(AddWriteDataCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Id

  • private subroutine handle_Id(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ClientThread), intent(inout) :: this
    type(IDMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_PrefetchData

  • private subroutine handle_PrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(PrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_CollectivePrefetchData

  • private subroutine handle_CollectivePrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectivePrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_StageData

  • private subroutine handle_StageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(StageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_CollectiveStageData

  • private subroutine handle_CollectiveStageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectiveStageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Terminate

  • private subroutine handle_Terminate(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout) :: this
    type(TerminateMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_ModifyMetadata

  • private subroutine handle_ModifyMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(ModifyMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_ReplaceMetadata

  • private subroutine handle_ReplaceMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(ReplaceMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_HandShake

  • private subroutine handle_HandShake(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(HandShakeMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: init

  • private subroutine init(this, sckt, server, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractSocket), intent(in), target :: sckt
    class(AbstractServer), intent(in), target :: server
    integer, intent(out), optional :: rc

procedure, public :: insert_RequestHandle

  • private subroutine insert_RequestHandle(this, request_id, handle, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    integer, intent(in) :: request_id
    class(AbstractRequestHandle), intent(in) :: handle
    integer, intent(out), optional :: rc

procedure, public :: isEmpty_RequestHandle

  • private function isEmpty_RequestHandle(this, rc) result(empty)

    Arguments

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

    Return Value logical

procedure, public :: put_DataToFile

  • private subroutine put_DataToFile(this, message, address, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractDataMessage), intent(in) :: message
    type(c_ptr), intent(in) :: address
    integer, intent(out), optional :: rc

procedure, public :: read_and_gather

  • private function read_and_gather(this, rc) result(dataRefPtr)

    Arguments

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

    Return Value class(AbstractDataReference), pointer

procedure, public :: read_and_share

  • private function read_and_share(this, rc) result(dataRefPtr)

    Arguments

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

    Return Value class(AbstractDataReference), pointer

procedure, public :: receive_output_data

  • private subroutine receive_output_data(this, rc)

    Arguments

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

procedure, public :: run

  • private subroutine run(this, rc)

    Arguments

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

procedure, public :: set_collective_request

  • private subroutine set_collective_request(this, request, have_done)

    Arguments

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

procedure, public :: set_connection

  • private subroutine set_connection(this, connection, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    class(AbstractSocket), intent(in) :: connection
    integer, intent(out), optional :: rc

procedure, public :: set_rank

  • private subroutine set_rank(this, rank)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    integer, intent(in) :: rank

procedure, public :: set_terminate

  • private subroutine set_terminate(this)

    Arguments

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

Source Code

   type, extends(BaseThread) :: ServerThread
      private

      type (ExtCollectionVector)        :: ext_collections
      type (HistoryCollectionVector), public :: hist_collections

      logical                  :: there_is_collective_request = .false.
      logical,public           :: terminate = .false.
      type (MessageVector),public     :: request_backlog
      logical                  :: have_done = .true.
      class(AbstractServer), pointer :: containing_server=>null()
      integer :: thread_rank
      type (IntegerVector) :: sub_array_types
   contains
      procedure :: init
      procedure :: run
      procedure :: set_terminate
      procedure :: set_rank
      procedure :: set_collective_request
      procedure :: do_terminate
      procedure :: clear_terminate

      procedure :: handle_Terminate
      procedure :: handle_Done
      procedure :: handle_Done_prefetch
      procedure :: handle_Done_collective_prefetch
      procedure :: handle_Done_stage
      procedure :: handle_Done_collective_stage
      procedure :: handle_AddReadDataCollection
      procedure :: handle_AddWriteDataCollection
      procedure :: handle_PrefetchData
      procedure :: handle_CollectivePrefetchData
      procedure :: handle_StageData
      procedure :: handle_CollectiveStageData
      procedure :: handle_ModifyMetadata
      procedure :: handle_ReplaceMetadata
      procedure :: handle_HandShake

      procedure :: get_hist_collection
      procedure :: get_DataFromFile
      procedure :: get_DataFromMem
      procedure :: put_DataToFile
      procedure :: read_and_gather
      procedure :: read_and_share
      procedure :: receive_output_data
      procedure :: clear_hist_collections
      procedure :: clear_backlog
      procedure :: clear_subarray

   end type ServerThread