Appendix B: The Block Cyclic Matrix Multiplication Routine for Heterogeneous Platforms


A.2. USER’S GUIDE

A typical session to run the N-body application includes the following steps (see Appendix D for a full mpC user’s guide):

  • Open a virtual parallel machine, vpm,

    mpcopen vpm
  • Translate your mpC program into two C files

    mpcc -I/usr/openwin/include -het nbody.mpc

    The first file, nbody_host.c, will contain code only run by the abstract host-processor. In particlular, this file will contain all the GUI code. The second file, nbody_node.c, will contain code executed by the remaining abstract processors not involved in visualization. Use the full name of the file nbody.mpc if it is not in the current directory. Use a directory other than /usr/openwin/include if necessary (i.e., use the directory where X Windows system holds its include files on the host workstation).

  • Copy files nbody_host.c and nbody_node.c from the current directory to the $MPCLOAD directory

    cp nbody_host.c nbody_node.c $MPCLOAD
  • Broadcast these files from the host workstation to all other workstations involved

    mpcbcast nbody_host.c nbody_node.c
  • Produce executable nbody on all workstations involved

    mpcload -het -o nbody nbody.c -lm -host -L/usr/openwin/lib -lX

  • Use a directory different from /usr/openwin/lib if necessary (i.e., use the directory where X Windows system holds its libraries on the _host workstation). Use an option different from -lX if necessary (i.e., use the proper name for the X library; it may be –lX11 or something else).

  • Run the application

    mpcrun nbody –- text_file
  • The only external argument of the application is the name of data file, text_file. This file should contain input data for the application, for example,

    Number of groups = 8 Group sizes = 300 500 600 400 350 100 300 200

The input data conveys to the application that it should model the evolution of a system of eight groups consisting of 300, 500, 600, 400, 350, 100, 300, and 200 bodies respectively. The application will generate the system. If no external argument is given, the application will model a default system of five groups of bodies.




Parallel Computing on Heterogeneous Networks
Parallel Computing on Heterogeneous Networks (Wiley Series on Parallel and Distributed Computing)
ISBN: B000W7ZQBO
EAN: N/A
Year: 2005
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net