1 / 14

CS 584 Lecture 17

CS 584 Lecture 17. Assignment? C* program Papers Test When?. Glenda Help. Glenda tutorial Postscript paper Local configuration HTML document Both available from our web page. Glenda. Supports 2 models of parallelism Agenda Master-slave SPMD kindof

tejano
Download Presentation

CS 584 Lecture 17

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 584 Lecture 17 • Assignment? • C* program • Papers • Test • When?

  2. Glenda Help • Glenda tutorial • Postscript paper • Local configuration • HTML document • Both available from our web page

  3. Glenda • Supports 2 models of parallelism • Agenda • Master-slave • SPMD kindof • Master just spawns jobs and waits for them to finish

  4. Glenda goals • Be Linda • Hide PVM as much as possible • Maintain PVM message passing ability • Maintain PVMs portability

  5. Linda vs. Glenda • Linda has no mechanism to determine a process number. • Linda provides no means to communicate other than tuple space. • Glenda does not provide the eval function • We must spawn the process, and put out a tuple for it to evaluate.

  6. Glenda functions • tid = gl_mytid() • tid = gl_spawn( char *name ) • gl_out( char *key, …..) • gl_in(char *key, …..) similarly gl_inp • gl_rd(char *key, …..) similarly gl_rdp • gl_outto(int tid, char *key, …..) • gl_into(char *key, …..) • gl_exit()

  7. Glenda programming • First join Glenda by calling gl_mytid • Then the master uses gl_spawn to start up as many workers as you need. • One per call • The tid of the worker is returned • gl_outto and gl_into are used to send and receive tuples directly • No Structures, unions, or typedefs

  8. gl_out • Variable argument list • Values can be scalar or arrays • Array sizes are implicit unless declared • Sizes of 2-d arrays must be declared gl_out( "data", j, k, val) gl_out( "row", l, x:len) // declares the length to be len gl_out( "col", x[j]:len) // 2d array

  9. gl_in, gl_inp, gl_rd, and gl_rdp • Similar to gl_out • gl_in blocks gl_inp returns 1 or 0 • The ? is used to indicate variable data • Other arguments used for matching gl_in( "data", j, k, ? val) gl_in( "row", l, ? x:len) // declares the length to be len gl_in( "col", ? x[j]) // 2d array or single element

  10. gl_outto and gl_into • Send a tuple directly to a process • Similar to gl_out and gl_in • gl_out requires the destination id gl_outto( tid, "data", j, k, val) gl_into( "data", j, k, ? val) • If tid is an array, gl_outto is a broadcast. gl_outto( tid : len, "data", j, k, val)

  11. How does Glenda work? • Runs on top of PVM • Special process • Global Tuple Server • Glenda uses a preprocessor to convert a Glenda program into a PVM program

  12. Using Glenda • Add ~snell/glenda/bin to your PATH • Copy the global tuple server to your pvm3/bin/HPPA directory. • Write your Glenda program • Must have a .cg extension • Run cgpp on your program • Compile the result using the C compiler

  13. Using Glenda • Copy your executables to your pvm3/bin/HPPA directory • Start up PVM • Configure your virtual machine • Run gts • Run your master program

  14. Assignment • Redo Lab 1 using Glenda • Compare your speedups and execution times with the previous two labs.

More Related