slide1 n.
Download
Skip this Video
Download Presentation
The XPI Interface

Loading in 2 Seconds...

play fullscreen
1 / 21

The XPI Interface - PowerPoint PPT Presentation


  • 60 Views
  • Uploaded on

The XPI Interface. Early thoughts on the XPI Representation Will be updated/changed frequently. Goals. Provide Programming Execution Model Functionality: ParalleX / HPX Speed: Incur minimal overhead Interface: Similar to MPI when possible Small: minimal set of functions and objects.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'The XPI Interface' - quinta


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide2

Early thoughts on the XPI Representation

Will be updated/changed frequently

goals
Goals
  • Provide Programming Execution Model
  • Functionality: ParalleX / HPX
  • Speed: Incur minimal overhead
  • Interface: Similar to MPI when possible
  • Small: minimal set of functions and objects
things we rely on being fast
Things We Rely on Being Fast
  • Remote Direct Memory Addressing
  • Light Weight Threads
  • Active Messages (Parcels)
  • Atomic Memory Operations
  • Work Queues
slide5
LCO
  • Constructor
    • In: receptor, byte_array
  • get_gid
    • Out: GID
  • free
slide6
LCO
  • waitany # listen to multiple lco's
  • counted_waitany # listen to multiple lco's
slide7
LCO
  • write # possibly remote operation
    • In: byte_array
    • In: Offset
    • In: Len
  • wait # local, returns when a write occurs
    • In: Timeout
    • Out: return code: error, interrupt, success, etc.
  • counted_wait # local, return when number of writes is # greater than the number of # counted waits
    • In: Timeout
complex thread lco
Complex/Thread: LCO
  • Complex/Thread constructor
    • In: Action
    • In: data, byte_array
    • In: receptor, byte_array # can be null
    • Optional In: contin1, (T) Thread, (TL) Thread_list
    • Optional In: contin2, (G) GID, (GL) GID_list
  • start
    • Optional Out: (R) RunningThread
      • set_state
      • get_state
complex
Complex
  • send_and_exit
    • In: byte_array
    • In: Offset
    • In: Length
    • # This writes to all continuations# and terminates the thread
pseudo c code

XPI_Action action;

XPI_Thread thread, next1, next2;

XPI_RunningThread run;

XPI_GID gid;

struct BH_data *bh_data;

XPI_Buffer_init(sizeof(BH_data),XPI_RECEIVE,&bh_data);

...

XPI_Thread_init_T(&thread,&action,bh_data,&next);

XPI_Thread_start_R(&thread,&run);

XPI_Thread_getgid(&thread,&gid);

....

XPI_RunningThread_set_state(&run,XPI_TERMINATE);

Pseudo C Code
action portable function ref
Action: Portable Function Ref
  • Action constructor
    • In: function_id, String
    • In: data_size, int
    • In: data_repacker, Action
      • Name of function used to repackage bytes for use on possibly different architectures available on a machine. Potentially difficult to write, auto generated by XPIPP tool based in on interface definition language. Null used on machines with homogeneous architecture.
memory managment
Memory Managment
  • mem_alloc
    • In: size, int
    • In: flags, int
      • RECEIVE: can be a target for RDMA
    • In: data_repacker, Action
      • # special value: IMMOBILE
      • # special value: ARRAY_OF_INT
      • # rely on tools to generate repackers
    • Out: ref, (P) byte_array, (G) GID
memory management
Memory Management
  • mem_free
    • In: data, (P) byte_array, (G) GID
  • mem_getptr
    • In: GID
    • Out: byte_array
  • mem_getgid,
    • In: byte_array
    • out: GID
  • Use this to unify disk and memory access as Jack Dennis suggests?
pseudo c code1

// Data managed by XPI

void init_data(void *intrinsic,void *recvd) {

struct BH_data *bh_data =

(struct BH_data *)intrinsic;

...

BH_event_horizon *eh;

XPI_Buffer_init(sizeof(eh),flags,&eh);

XPI_send_and_exit(eh); // received by continuations

}

XPI_Action action;

XPI_Action_init(&action,"black_hole.init_data",10,NULL);

Pseudo C Code
workqueue lco
WorkQueue: LCO
  • WorkQueue constructor
    • Out: id, (R) GID
    • In: receptor, byte_array
  • # WorkQueue runs one thread at a time. All threads share# the receptor as the second argument to the action
  • add:
    • In: Complex/Thread # called if the GID is a parcel target
parcels
Parcels
  • Parcel constructor:
    • In: Action
    • In: Data
    • In: destination, GID
    • Optional In: contin, (G) GID, (GL) GID_list
  • start
locality
Locality
  • static Locality get_locality()
    • get_gid:
      • Out: GID
    • get_property:
      • In: name, String
      • Out: value, int
process
Process
  • Process constructor
    • In: parent, GID
    • In: Locality_List
  • set_policy: In: policy, In: param
  • get_policy: In: policy, Out: param
  • get_gid: Out: GID
process1
Process
  • bind_symname
    • In: sym_name, String # e.g. "console"
    • In: GID
  • unbind_symname
    • In: sym_name, String
  • get_main: static: Out: GID
  • get_parent: Out: GID, In: GID
    • all GID's have a parent process!
  • get_current: static: Out: GID
parcels1
Parcels
  • Semantically similar to Thread
  • A better way to start a thread: Destination can be a process, that starts a thread at the least loaded of the managed localities
mobile objects agas
Mobile Objects (AGAS)
  • WorkQueue (easy)
  • Suspended Thread (difficult)
  • Just move work queues to start?