lect03 - Notes CMSC 714 Lecture 3 Message Passing with PVM...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CMSC 714 Lecture 3 Message Passing with PVM and MPI Alan Sussman CMSC 714 – Alan Sussman and J. Hollingsworth 2 Notes ! To access papers in ACM or IEEE digital library, must come from a UMD IP address ! Accounts emailed next week for UMIACS bug cluster and for SMP ! First assignment (MPI) announced next week ! Check Readings page to see when you are assigned to send questions for a lecture – 2-4 questions on average, more is OK – by 6PM day before lecture CMSC 714 – Alan Sussman and J. Hollingsworth 3 Last time ! Coordination for parallel programs – synchronization – load balancing ! Control vs. data parallelism ! Metrics – Speedup - vs. best known serial algorithm – Scaled speedup – Amdahl’s law – Maximize computation to communication ratio ! Writing parallel programs – compiler converts old serial code – serial langage plus communication library – new programming language – hybrid - old language with new constructs CMSC 714 – Alan Sussman and J. Hollingsworth 4 PVM ! Provide a simple, free, portable parallel environment ! Run on everything – Parallel Hardware: SMP, MPPs, Vector Machines – Network of Workstations: ATM, Ethernet, • UNIX machines and PCs running Win32 API – Works on a heterogenous collection of machines • handles type conversion as needed ! Provides two things – message passing library • point-to-point messages • synchronization: barriers, reductions – OS support • process creation (pvm_spawn)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMSC 714 – Alan Sussman and J. Hollingsworth 5 PVM Environment (UNIX) ! One PVMD per machine – all processes communicate through pvmd (by default) ! Any number of application processes per node CMSC 714 – Alan Sussman and J. Hollingsworth 6 PVM Message Passing ! All messages have tags – an integer to identify the message – defined by the user ! Messages are constructed, then sent – pvm_pk{int,char,float}(*var, count, stride) – pvm_unpk{int,char,float} to unpack ! All processes are named based on task ids (tids) – local/remote processes are the same ! Primary message passing functions – pvm_send(tid, tag) – pvm_recv(tid, tag) CMSC 714 – Alan Sussman and J. Hollingsworth 7 PVM Process Control ! Creating a process – pvm_spawn(task, argv, flag, where, ntask, tids) – task is name of program to start – flag and where provide control of where tasks are started – ntask determines how many copies are started – program must be installed on each target machine – returns number of tasks actually started ! Ending a task – pvm_exit – does not exit the process, just the PVM machine ! Info functions – pvm_mytid() - get the process task id CMSC 714 – Alan Sussman and J. Hollingsworth
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/12/2012 for the course CMSC 714 taught by Professor Staff during the Fall '07 term at Maryland.

Page1 / 5

lect03 - Notes CMSC 714 Lecture 3 Message Passing with PVM...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online