UCLA Parallel Computing Laboratory

Grey Line

Parsec and MPC

Parsec (formerly Maisie) is an extension of the C language created by Rajive Bagrodia and some of his past graduate students. Parsec is a parallel simulation language.

Parsec uses of the newly updated MPC compiler, which now supports ANSI C style declarations, and has some additional restrictions not applicable to the older compiler.


How to use MPC on CS Machines

Those of you with accounts are welcome to use the CS department version of the compiler for development.

If you are a graduate student in the CS department, you can use the sequential implementation of Parsec for Solaris. It is located in /r/misc1/parsec/1.1/solaris/bin/pcc.

For MPC, compile with the -sync mpc. For parallel simulations use -sync cons


How to use Parsec on the IBM SP

To login, type:
  
  rlogin cluster.oac.ucla.edu -l login_id

Setup

The Parsec compiler will be in the following directory, so add it to your default path:
  /u/data02/ieczmay/parsec/bin
If your default shell is csh or tcsh, you can do this with the following command:
  set path=($path /u/data02/ieczmay/parsec/bin)
In order to run Parsec programs on the SP, you need to set three environmental variables. For convenience, you may wish to place these definitions in your .cshrc file.
  setenv MP_PROCS    4        #or number of processors you wish to use
  setenv MP_HOSTFILE hostfile #hostfile is a list of nodes, see below
  setenv MP_EUILIB   ip
In order to run your program on multiple processors, you need to create a hostfile (a regular text file). You probably should put this in your home directory, and then define MP_HOSTFILE with the absolute path. The contents of the file should be:
  f01n09.sp
  f01n10.sp
  f01n11.sp
  f01n12.sp
  f01n13.sp
  f01n14.sp
  f01n15.sp
  f01n16.sp
These are the names of the SP2's interactive nodes (processors). To use more than 8 processors, you can repeat the names, or you can add alpha, beta, gamma, and delta.

Compilation

To compile your Parsec program to run on one processor, type:
  pcc -o binary_name program_name
To compile your Parsec program for parallel execution, type:
  pcc -sync mpc -o binary_name program_name
To compile your Parsec program for conservative simulation execution, type:
  pcc -sync cons -o binary_name program_name
To run your program in parallel, type:
  binary_name -procs 4
(if procs is not specified, MP_PROCS is used)


Return to Parsec Home Page
Last updated Sunday, 18-Nov-2001 12:25:09 PST