MPICH2 : Introduction to MPI_Init - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

MPICH2 : Introduction to MPI_Init

Description:

Routines either defined in the ADI or used within the ADI. MPIU ... Obey the interfaces. And link. However. Too complicated. Too deep reference link. Scattered source ... – PowerPoint PPT presentation

Number of Views:153
Avg rating:3.0/5.0
Slides: 15
Provided by: adore
Category:

less

Transcript and Presenter's Notes

Title: MPICH2 : Introduction to MPI_Init


1
MPICH2 Introduction to MPI_Init
  • Oct 5, 2005
  • Sogang University
  • Distributed Computing Communication Laboratory
  • Eunseok, Kim

2
Outline
  • Internal routine naming
  • Flow chart of MPI_Init ()
  • Global Object
  • Series of functions
  • Conclusion

3
Internal routine name
  • MPI
  • MPI implementation
  • MPIR
  • Routines used only within the MPI implementation
  • Outside of the ADI
  • MPID
  • Routines either defined in the ADI or used within
    the ADI
  • MPIU
  • Routines that are defined in the util directory
    and may be used by either the ADI or the
    implementation of the MPI routines

4
Concept of Initialization
  • Lazy initialization
  • Each module initialize itself
  • Reduce
  • Executable size
  • Link time
  • Enabled by Weak symbol option

5
MPI_Init
MPI_Init(int argc, )
MPIR_Init_thread( int argc..)
MPIR_Err_init( int argc..)
MPIR_Wtime_init( int argc..)
MPIR_Datatype_init( int argc..)
MPIR_Nest_init( int argc..)
MPID_Init ( int argc..)
MPIDI_CH3_Init( int argc..)
End of MPI_Init
6
Global Object
  • MPIR_Process
  • MPIDI_Process
  • MPIDI_CH3_Process
  • Etc
  • Each module has its own global variable
  • Init finalized within the module

7
MPIR_Process
  • Comm
  • Comm_world
  • Comm_self
  • Comm_parent (spawn)
  • Group
  • Remote / local
  • Comm_kind
  • Intra / inter
  • VCRT (Virtual Connection Reference Table)
  • Thread
  • Condition variables
  • Attribute
  • Attribute variable
  • Attribute function

8
MPIDI_Process
  • Receive queue
  • Posted
  • Unexpected
  • Process group id rank
  • Condition variable

9
MPIDI_CH3I_Process
  • Parent port number
  • Accept queue
  • Condition variable

10
MPI_Init()
  • Declare nest level value
  • Ex) MPID_MPI_INIT_STATE_DECL(MPID_STATE_MPI_INIT)
  • Init critical section
  • Thread mutex creation
  • Call MPIR_Init_thread

11
MPIR_Init_thread()
  • Address alignment issues
  • Ex) HAVE_WINDOWNS_H, _WIN64
  • Setup MPIR_Process object
  • attrs
  • Init comm (null)
  • Call all MPID_Init type functions
  • Ex) MPIR_Err_init(), MPIR_Datatype_init()
  • Determine Several policy
  • Ex) allowing the device to select an alternative
    function for some function
  • Call MPID_Init (Ch3)

12
MPID_Init
  • Init receive queues
  • Set processor name and other configurations
  • By system call and environmental variable
  • Call MPIDI_CH3_Init
  • Assign Process group id rank to MPIDI_Process
  • Cf) rank in comm_world
  • Init MPI_COMM_(WORLD / SELF) object
  • Creating VCRT
  • Get parent or parent port
  • Determine who my parent is
  • Others or no parent
  • Synchronization through MPIR_Bcast

13
MPIDI_CH3_Init
  • PMI_Init
  • Port
  • Host name
  • Fd (socket)
  • PMI_Get_(rank/id)
  • Pg_rank
  • Pg_id
  • Init and create Process group
  • Init pgs vct and send-queue

14
Summary
  • Modular architecture
  • Provides independence
  • Local init / finalization
  • Developer can implement an algorithm within a
    specific module
  • Obey the interfaces
  • And link
  • However
  • Too complicated
  • Too deep reference link
  • Scattered source
  • More precise analysis can be possible
  • After analyzing coll and ptp, etc
Write a Comment
User Comments (0)
About PowerShow.com