1 / 27

PVM

PVM. PVM - What Is It?. Stands for: Parallel Virtual Machine A software tool used to create and execute concurrent or parallel applications. Operates on a collection of heterogenous Unix computers connected by one or more networks. Communication accomplished by message passing.

micah
Download Presentation

PVM

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. PVM

  2. PVM - What Is It? • Stands for: Parallel Virtual Machine • A software tool used to create and execute concurrent or parallel applications. • Operates on a collection of heterogenous Unix computers connected by one or more networks. • Communication accomplished by message passing

  3. PVM - What Is It? • Comprised of two main components • the PVM daemon process (pvmd3) • library interface routines (libpvm3.a, libfpvm3.a & libgpvm3.a) • Public domain software package developed at Oak Ridge National Laboratory.

  4. PVM Components

  5. PVM Daemon (pvmd3) • The PVM daemon (pvmd3) is a Unix process which oversees the operation of user processes within a PVM application and coordinates inter-machine PVM communications.

  6. PVM Daemon (pvmd3) • One daemon runs on each machine configured into your parallel virtual machine. Other users, with their own parallel virtual machines, will have their own pvmd3s running. • User processes communicate with each other through the daemons.

  7. PVM Libraries • libpvm3.a - Library of C language interface routines. Always required. • They contain simple subroutine calls that the application programmer may imbed in concurrent or parallel application code.

  8. Provide ability to: • initiate and terminate processes • pack, send, receive and broadcast messages • synchronize via barriers • query and dynamically change configuration of the parallel virtual machine

  9. Libraries • do not directly communicate to other processes. Instead, they send commands to the local daemon and receive status information back. • Can be installed in user filespace - default is $HOME/pvm3/lib. • Data format conversion (XDR) performed automatically between hosts of different architectures.

  10. Getting Started • Create a directory ~/pvm3/bin/ARCH on each machine for your executable components. • create a soft link to the actual pvm3/lib location (% ln -s ~snell/pvm3/lib ~/pvm3/lib) • PVM_ROOT should be set to ~/pvm3 • Include the appropriate PVM library routine calls in your code.

  11. PVM Routines

  12. Process Control & Information • Processes are identified by process IDs • Each process must acquire a list of all the process IDs in the group • Functions • pvm_mytid • pvm_siblings • Must call pvm_exit() to quit

  13. Sending • Initialize buffers • Pack the message • Send pvm_initsend(PvmDataDefault); pvm_pkint(&token, count, stride); pvm_send(dest, msgtag);

  14. Receiving • Receive the message • Unpack pvm_recv(src, msgtag); pvm_upkint(&token, count, stride);

  15. Compile Your Application Components • Always need libpvm3.a library. • % cc -o myprog myprog.c -I$PVM_ROOT/include -L$PVM_ROOT/lib/$PVM_ARCH -lpvm3 • For Dynamic Groups, also need libgpvm3.a added before libpvm3.a • Make sure that executable components are located in ~/pvm3/bin/ARCH on each machine as required.

  16. Create your PVM hostfile • Your PVM hostfile defines your parallel virtual machine. It contains the names of all desired machines, one per line • Must reside only on the machine where you start up PVM • The filename can be whatever you like • Comment lines start with "#" • Precede hostname with "&" if dynamically added later

  17. Other options permitted: • lo = login userid • pw = password entry required • dx = daemon path if not using default • ep = executable program component paths if not using default ~/pvm3/bin/ARCH

  18. Create Your $HOME/.rhosts file • The .rhosts is a standard Unix "trusted hosts" file - permits remote login and command execution without password. It is not unique to PVM - simply used by PVM. • Must be in your home directory • Should be readable by user only! • Format: host.domain.name userid

  19. Start the Master PVM Daemon • Start up the master (first) daemon. • % pvmd3 hostfile & • Must be started on your local machine • Automatically starts up daemons on all other machines (remote) specified in your hostfile.

  20. Tips • Do not run in the background if using the password (pw) specification in your hostfile. • Should only have one pvmd3 running on each machine in your virtual machine! • PVM console can be started after pvmd3 by typing "pvm". PVM console commands can then be issued.

  21. Execute your application • Begin execution of your program on your local machine • % myprog • What happens from here depends upon your application.

  22. Quit PVM • Make sure all application components include a PVM library call of "pvmfexit(info)" or "pvm_exit()". • Halting the master pvmd3 will automatically kill all other pvmd3s and all processes enrolled in this PVM. • Running in pvm console mode: use "halt" command

  23. If it won't die • Abnormal terminations of PVM may leave files in /tmp which prevent you from restarting (known bug). Should delete all /tmp/pvm*. files on all machines before restarting the master pvmd3. • Try "~clement/bin/kill-pvms" if all else fails

  24. Miscellaneous & Hints • The most common problem in starting PVM daemons is probably due to daemons already running on the machine(s), or the existence of a /tmp/pvmd.uid file. You'll need to kill old daemons and/or remove any /tmp/pvmd.uid files. • The second most common problem is probably due to incorrect .rhost files.

  25. Other Problems • Another, less frequent startup problem is due to .cshrc files that require interactive input or which display messages.

  26. Be Careful • Be careful of concurrent I/O to the same files in a shared filesystem! For concurrent I/O (writing) in a shared filesystem, you may want to implement a scheme to assign unique names to output files.

  27. Your Assignment • Specifications are on the web • Using a Jacobi 5 point stencil, solve the 2D steady state temperature distribution problem on a 768 x 768 grid. • Use formula 2.1 on page 34 • Report your execution times on 2, 4, and 8 processors.

More Related