HMC Homepage      CS Home

Using PVM

PVM is a software system that enables a collection of heterogeneous computers to be used as a coherent and flexible concurrent computational resource.

The individual computers may be shared- or local-memory multiprocessors, vector supercomputers, specialized graphics engines, or scalar workstations, that may be interconnected by a variety of networks, such as ethernet, FDDI.

User programs written in C, C++ or Fortran access PVM through library routines.

Setting Local Environment

  1. Add the following lines to ~/.cshrc

    	setenv PVM_ROOT /usr/local/pvm3
    	setenv PVM_ARCH SUN4SOL2
    	set path=($path /usr/local/pvm3/lib)
    

Sample Hello Programs

Make a directory call examples and put the following files in it.
  1. hello.c
  2. hello_other.c
  3. Makefile.aimk

Compile Sample Hello Programs

Use the following command to compile the sample program. After compilation, it will create a directory call SUN4SOL2 and put the executables there.
 	aimk hello hello_other

Running Sample Hello Program

  • To run the sample hello program from a shell prompt

    	cd SUN4SOL2
    	./hello
    
  • To run the sample hello program from the pvm console

    	cd SUN4SOL2
    	pvm
    	spawn -> hello
    
  • Here's a sample output:
    	i'm t40012
    	from t40013: hello, world from turing
    

Copyright (c) HMC Computer Science Department. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License.''

HMC Computer Science Department
Contact Information
Last Modified Tuesday, 22-May-2001 16:32:29 PDT