        
        
        
        
        
        
        
        
        
        
        
        
        
        
        The Parallel Applications Development Environment
        
                              (PADE)
        
                          User's Manual
        
        
                        Judith E. Devaney
                          Robert Lipman
                            Minwen Lo
                       William F. Mitchell
        
           Computing and Applied Mathematics Laboratory
        
                           Mark Edwards
                         Charles W. Clark
                        Physics Laboratory
        
        
          National Institute of Standards and Technology
                    PADE -- Major Release 1.4
        
                        November 15, 1995
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                      Abstract
        
        This manual describes the use of the Parallel Applications Development
        Environment (PADE) developed  at the  National Institute of  Standards
        andTechnology (NIST).  PADE is  a flexible, customizable  environment
        fordeveloping  parallel applications  that use  the Parallel  Virtual
        Machine (PVM)  message-passing library.    It  provides an  integrated
        framework for all phases of development of  a message-passing parallel
        application:    editing,   compilation,  execution,   and  performance
        monitoring and enhancement.  The PADE package consists of an intuitive
        graphical user  interface, a  suite of  PVM  utilities, and  extensive
        documentation in PostScript,  ASCII, and HTML formats.   PADE  is most
        useful with  a heterogeneous  virtual machine  consisting of  multiple
        architectures and/or multiple file systems where it  aids the parallel
        developer by  helping to  keep track  of  which source  files must  be
        sent and  compiled on  which  hosts, sending  the files,  issuing  the
        compilation commands, and displaying the results of the compilation on
        thedeveloper's terminal.
         Some  eminent  scientists  sprinkle  their  speech  with  foreign  or
        foreign-sounding phrases, and  in emulation of  this practice we  have
        adopted the pronunciation of  PADE as ``pah-DAY'',  which incidentally
        honors the  French  mathematician  Henri  Pad'e  (1863-1953).     Those
        whotelephone  NIST  to ask  how  they can  get  paid may  engender  a
        misunderstanding.
        
                                   Usage license
         The PADE  software and its documentation  have been produced  as part
        ofwork  done by  the U.S.  Government, and  are not  subject to  U.S.
        copyright.
         The mention of specific products, trademarks,  or brand names in PADE
        documentation is for purposes of identification only.  Such mention is
        notto be interpreted  in any way  as an endorsement  or certification
        ofsuch products or brands by the National Institute  of Standards and
        Technology.
        
        UNIX is a registered trademark of X/Open Company Ltd.
        IBM, AIX,  RISC  System/6000  and  SP2 are  trademarks  or  registered
        trademarks of International Business Machines Corporation.
        Intel, i486  and Pentium  are trademarks or  registered trademarks  of
        Intel Corporation.
        X Window  System  is  a  trademark  of   Massachusetts  Institute  of
        Technology.
        IRIX, Onyx and SGI are trademarks or registered  trademarks of Silicon
        Graphics, Inc.
        SPARCstation is a trademark of SPARC International, Inc.
        Sun and  SunOS  are  trademarks  or  registered   trademarks  of  Sun
        Microsystems, Inc.
        NeXT and NEXTSTEP are trademarks of NeXT Computer, Inc.
        Netscape is a trademark of Netscape Communications Corporation.
        Motorola is a registered trademark of Motorola, Inc.
        CRAY, CRAY Y-MP and UNICOS are trademarks of Cray Research, Inc.
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                         1
        
        
        
        
        
        
        
        Contents
        
        
        
        1 Introduction to PADE                                               5
          1.1The PADE Philosophy . . . . . . . . . . . . . . . . . . . . .  5
          1.2How PADE Works  . . . . . . . . . . . . . . . . . . . . . . .  7
          1.3How to Get PADE . . . . . . . . . . . . . . . . . . . . . . .  8
          1.4Changes Since Version 1.0 . . . . . . . . . . . . . . . . . .  8
          1.5Known Bugs  . . . . . . . . . . . . . . . . . . . . . . . . .  9
        
        2 Preparing to Use PADE                                             10
          2.1Environment Variables and Path  . . . . . . . . . . . . . . . 10
          2.2PVM Directory . . . . . . . . . . . . . . . . . . . . . . . . 11
          2.3The .rhosts File  . . . . . . . . . . . . . . . . . . . . . . 11
        3 Running PADE: A Tutorial                                          12
          3.1Example PADE Session  . . . . . . . . . . . . . . . . . . . . 13
           3.1.1 Starting PADE . . . . . . . . . . . . . . . . . . . . . . 13
           3.1.2 Starting the Virtual Machine. . . . . . . . . . . . . . . 14
           3.1.3 Entering Host Names . . . . . . . . . . . . . . . . . . . 14
           3.1.4 Entering Host Commands via Setup. . . . . . . . . . . . . 15
           3.1.5 Entering Host Commands via Graph. . . . . . . . . . . . . 15
           3.1.6 Entering Files via Setup. . . . . . . . . . . . . . . . . 16
           3.1.7 Entering Files using Graph. . . . . . . . . . . . . . . . 17
           3.1.8 Saving the Setup Information. . . . . . . . . . . . . . . 18
           3.1.9 Running PVMmake . . . . . . . . . . . . . . . . . . . . . 18
           3.1.10Running the Application in a Terminal Window. . . . . . . 18
           3.1.11Running the Application Using PVMmake . . . . . . . . . . 19
           3.1.12Exiting PADE. . . . . . . . . . . . . . . . . . . . . . . 19
          3.2Other PVMmake config files  . . . . . . . . . . . . . . . . . 19
        
        4 PVMmake                                                           20
          4.1Capabilities and Software Components of PVMmake . . . . . . . 20
          4.2Running PVMmake . . . . . . . . . . . . . . . . . . . . . . . 20
          4.3The PVMmake config file . . . . . . . . . . . . . . . . . . . 21
        5 The PADE User's Reference                                         23
          5.1Starting PADE . . . . . . . . . . . . . . . . . . . . . . . . 23
          5.2Auxiliary Windows . . . . . . . . . . . . . . . . . . . . . . 24
          5.3The PADE Main Window  . . . . . . . . . . . . . . . . . . . . 25
          5.4The File Button . . . . . . . . . . . . . . . . . . . . . . . 25
          5.5The Setup Button  . . . . . . . . . . . . . . . . . . . . . . 26
          5.6The PADE Files Window . . . . . . . . . . . . . . . . . . . . 27
          5.7The Undo and Sort Buttons . . . . . . . . . . . . . . . . . . 28
          5.8The Graph Window  . . . . . . . . . . . . . . . . . . . . . . 28
          5.9The PVM Menu  . . . . . . . . . . . . . . . . . . . . . . . . 29
          5.10The PVMmake Menu  . . . . . . . . . . . . . . . . . . . . . . 30
        
        
        
                                         2
        5.11The Apps Menu . . . . . . . . . . . . . . . . . . . . . . . . 31
        5.12The Help Menu . . . . . . . . . . . . . . . . . . . . . . . . 31
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                       3
        
        
        
        
        
        
        
        List of Figures
        
        
        
          5.1The PADE main window  . . . . . . . . . . . . . . . . . . . . 25
          5.2The File menu . . . . . . . . . . . . . . . . . . . . . . . . 25
          5.3The Setup menu  . . . . . . . . . . . . . . . . . . . . . . . 26
          5.4The PADE Files window . . . . . . . . . . . . . . . . . . . . 27
          5.5The Graph window  . . . . . . . . . . . . . . . . . . . . . . 28
          5.6The PVM menu  . . . . . . . . . . . . . . . . . . . . . . . . 29
          5.7The PVMmake menu  . . . . . . . . . . . . . . . . . . . . . . 30
          5.8The Set Files and Commands to Save window . . . . . . . . . . 30
          5.9The Apps menu . . . . . . . . . . . . . . . . . . . . . . . . 31
          5.10The Help menu . . . . . . . . . . . . . . . . . . . . . . . . 31
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                         4
        
        
        
        
        
        
        Chapter 1
        
        
        
        Introduction to PADE
        
        
        
        
        This  chapter  provides  an  overview  of  the  Parallel  Applications
        Development Environment  (PADE). It  describes  the philosophy  behind
        PADE, the basic aspects of  its functionality, and how to  access PADE
        onthe Internet.
         PADE  is   a  flexible,   customizable  environment  for   developing
        parallel applications  that  use the  Parallel Virtual  Machine  (PVM)
        message-passing library.    It provides  an  integrated framework  for
        allphases of development  of a message-passing  parallel application:
        editing,  compilation,  execution,   and  performance  monitoring  and
        enhancement.  PADE is most useful with a heterogeneous virtual machine
        consisting of  multiple architectures  and/or  multiple file  systems.
        Byautomatically selecting  only those files  that have been  modified
        since the last compilation,  PADE can be used  as a parallel  make for
        a heterogeneous  virtual machine.   The  PADE package  consists of  an
        intuitive graphical  user interface,  a suite  of  PVM utilities,  and
        documentation in PostScript, ASCII, and HTML formats.
        
        1.1The PADE Philosophy
        
        Thegoal  of  PADE  is  to  facilitate  the  development  of  parallel
        applications that run on a  heterogeneous virtual machine, that  is, a
        machine composed of independent networked computers (its nodes), which
        maybe of different types, and/or different file systems.
         Such  an application will  have components  that reside  on the  file
        systems of  different  computers  with  different  operating  systems.
        These components will have to  be compiled on each node,  usually with
        differing compiler directives and options.  The compiled versions must
        berun on each node, and the input and output  streams must be managed
        oneach node.
         Consider the basic operations that arise  in the development cycle of
        such a program:
        
        1. Editing source  files (potentially  a different  set of files  for
           each node on the virtual machine).
        
        2. Transferring sets of source files between nodes, as appropriate.
        
        3. Compiling  each   set  of  source  files   on  each  node   (in  a
           heterogeneous environment, the compiler for  each architecture, or
        
        
                                         5
           even each node, may be slightly different).
        
        4. Executing the updated program.
        
        Steps two and three can become  quite time consuming as the  number of
        nodes increases, even  if the variation  of operating systems  between
        nodes is relatively minor (for example, if they are different variants
        ofUnix).  Also,  keeping track of which source files  require editing
        instep one can also become quite cumbersome.
         The basic  concept of PADE  is to provide  a development console  for
        thevirtual machine, so that all essential  parallel development tasks
        canbe carried  out at  a central  location.   This central  location,
        thedevelopment  host,  is the  computer where  all  source files  for
        theparallel  application are  kept  and is  where  PADE is  executed.
        PADE provides a graphical interface  to the operations of  the virtual
        machine.   PADE  allows the  following tasks  to be  performed on  the
        development host, with  transparent access to  the other nodes of  the
        virtual machine:
        
          oDefining the virtual  machine, that is, identifying  the computers
           that will run the various components of the parallel application
        
          oOrganizing the application source files
        
          oEditing source code  appropriate to each host while  retaining all
           source files in a common location on the development host
        
          oBuilding  the   parallel  application   with  a  single   command,
           operations that are  launched by this command  include selectively
           sending  files   to  selected   nodes  of   the  virtual   machine
           (optionally  only files  that  have  been recently  modified)  and
           issuing the appropriate compile command on each node
        
          oReviewing compilation and execution output
        
          oExecuting the application on the virtual  machine, with or without
           the aid of parallel debuggers and performance monitors
        
          oAccessing online help:
        
        
            -- this manual
        
            -- introductory PVM man pages
        
            -- the PADE World-Wide-Web (WWW) home page
        
        
         A graphical interface  is  a useful  aid for  keeping  track of  the
        application, as  it enables  one to  visualize how  the various  parts
        ofthe application are  distributed across the  virtual machine.   The
        current release  of  PADE offers  a  graphical representation  of  the
        virtual machine, which  shows the nodes  and their associated  program
        files on a  two-dimensional diagram.    Many of the  file and  command
        
        
                                         6
        management actions that  are required  during application  development
        canbe  carried  out by  familiar  ``click  and drag''  operations  on
        objects in this diagram, which simplifies much  routine administrative
        work that would otherwise distract the programmer's attention.
        
        1.2How PADE Works
        
        Central to  the operation  of a  program like  PADE is  a vehicle  for
        passing messages between  nodes, that  is, a message-passing  library.
        Thecurrent version  of PADE is  based upon  the widely used  Parallel
        Virtual Machine (PVM) message-passing  library developed at  Oak Ridge
        National Laboratory.    Indeed, it  is a  PVM application  in that  it
        utilizes PVM  calls for all  communication between  processors of  the
        virtual machine, although it  should be straight forward  to implement
        PADE for another message passing library (such as MPI).
         The  PVM software enables  a user  to write  applications in which  a
        collection of computers perform parts of the  application in parallel.
        This group  of computers can  be considered  to be  a virtual  machine
        (VM). Each computer on the VM will sometimes be referred  to as a node
        andsometimes as a host.  These two terms will be used interchangeably
        inthis manual.
         AVM  can be homogeneous,  that is,  consist of identical  processors
        sharing a common file  system, or heterogeneous,  that is, consist  of
        more than one  architecture or  more than one  file system.   PADE  is
        most effective in  aiding parallel development  on the latter type  of
        virtual machine where consistency must be maintained  between files in
        different locations.
         Aworking  PVM application consists  of a set  of files containing  C
        and/or FORTRAN source  codes, makefiles,  data, etc.   Some subset  of
        these files will be  compiled on a  given host of  the VM to create  a
        binary that is the component of the entire PVM program  for that host.
        Thesubset of  files needed to  create this  executable may vary  from
        host to host.  This may be the case for several  reasons some of which
        include:
        
          othe  portion  of the  task  to  be performed  by  the  application
           allotted  to  a particular  host  is  different from  another  for
           load-balancing reasons (some hosts may be faster than others)
        
          onon-portability of the code
        
          ohost-specific code optimizations
        
          oa different  makefile is  required for  compilation on some  hosts
           since there  may be different compiler  names, library paths,  and
           include paths
        
        Thecreation of the binary on  a given host will require  the transfer
        offiles to that host and the launching of the compile command.
         The  two ways  in  which  PADE aids  the  parallel developer  are  by
        helping to keep track of which source files must be  sent and compiled
        onwhich  hosts, and  by actually sending  the files  and issuing  the
        compile commands.  In  the PADE development model the  developer keeps
        
        
        
                                         7
        allsource files on a single host (the development  host) and provides
        thenames of the hosts, the  files needed to build the binary  on each
        host, and the commands required to build the binary on each  host.  In
        therest of this manual,  this information is referred to as  the PADE
        data.
         Once  the PADE  data  have been  entered,  the developer  begins  the
        edit/transfer/compile/execute  cycle.     In  the  edit  phase,   PADE
        enables the developer to  modify any file  described in the  PADE data
        information with a user-specified editor.  PADE  enables the developer
        toperform the transfer and  compile phases in one step  using PVMmake
        (provided in the PADE distribution).   PADE also displays  the results
        ofthe  compilations on the  various hosts  in a  display window  that
        canbe  scrolled through at  leisure and  saved if  desired.   In  the
        execution phase, PADE enables the developer to  launch the application
        being developed and to view the output in a display window.
        
        1.3How to Get PADE
        
        ThePADE package can be obtained by anonymous ftp at
        ftp://math.nist.gov/pub/pade
        inthe  file nist_pade.1.4.x.tar.gz where  the integer  x denotes  the
        number of updates to  release 1.4.0.   Current information on  PADE is
        maintained at the PADE World Wide Web home page at
        http://www.itl.nist.gov/div895/pade/pade.html
        which also contains  links to  all required  software packages and  an
        HTML version of the  PADE User's Guide.   Questions, comments  and bug
        reports can be sent by electronic mail to robert.lipman@nist.gov.
        
        
        1.4Changes Since Version 1.0
        
        Themajor changes to PADE in Version 1.4 are:
        
          oSupport  for Tcl/Tk  8.0 (older  versions  of Tcl/Tk  no
           longer supported)
        
          oEnhanced capability to selectively send files to remote hosts
        
          oNew file browser
        
          oModification of File Browser Default Path preference
        
        Themajor changes to PADE in Version 1.2 are:
        
        
          oAdded capability to selectively send files to remote hosts
        
          oMoved  functions of  the  Setup window  (adding  hosts and  files,
           opening and saving PADE  files) to the Main window under  the File
           and Setup menus and Graph button
        
          oRenamed the Tree View to Graph
        
          oMoved functions of the Run menu to the PVMmake menu and Apps menu
        
        
                                         8
          oMoved functions of the Monitor menu to the Apps menu
        
          oMoved function of  setting preferences under the Help menu  to the
           Preferences menu under the File menu
        
          oMoved function of the Exit button to File menu
        
          oAdded Undo and Sort buttons
        
          oModified hosts  and files manipulation  capabilities in the  Graph
           to have the same capabilities as those under the Setup menu
        
          oAdded  a  .paderc   file  to  save  user  preferences   and  other
           information
        
          oPADE can now be  invoked with the name of a PADE data  file on the
           command line
        
          oMade the  ``look and feel'' of  the graphical user  interface more
           ``standard'', for example:   File menu, accelerator  keys, pasting
           selections into entry windows, double-clicking to  pick items in a
           listbox
        
          oThe  PVMmake   configuration  file  is  no   longer  automatically
           written.  It must be saved under the PVMmake menu
        
          oRemoved NIST-specific directories in pvm_tidy
        
          oAdded -ep  option to  padeinituser, to  specify what directory  to
           initialize
        
          oMajor revision of the Installation and User's Manuals
        
        
        1.5Known Bugs
        
        PVMmake is not  currently capable of  transferring binary  files.   In
        order to transfer a binary file,  it must first be converted  to ASCII
        byuuencode or a similar program.
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                         9
        
        
        
        
        
        
        Chapter 2
        
        
        
        Preparing to Use PADE
        
        
        
        
        This chapter provides instructions for preparing your  environment for
        using PADE. This  consists of  setting several environment  variables,
        adding some  directories  to the  executables  path, preparing  a  PVM
        subdirectory, and creating a .rhosts file.
         Inthis  chapter it is  assumed that all  required software has  been
        installed, including PVM and PADE. See the PADE Installation Guide for
        instructions to install PADE, or consult your  system administrator to
        find the directories where PVM, PADE, and other  software packages are
        installed.
        
        2.1Environment Variables and Path
        
        There are several environment variables  that must be set  before PADE
        will run.    Also,  there are  some  directories to  be  added to  the
        executables path.   This is most easily  accomplished by adding  a few
        lines to the non-login shell startup file (.cshrc,  .profile, .bashrc,
        etc.).  The environment variables on the development host are:
        
          oPADE_ROOT -- the directory in which PADE is installed
        
          oPVM_ROOT -- the directory in which PVM is installed
        
          oPVM_ARCH -- the PVM name of your architecture
        
          oXPVM_ROOT -- the directory in which XPVM is installed (optional)
        
          oTCL_LIBRARY -- the directory in which the TCL library resides
        
          oTK_LIBRARY -- the directory in which the TK library resides
        
          oEDITOR -- your favorite editor (optional; PADE  will prompt if not
           set)
        
        
         The additional  directories to  be added to  the executables path  on
        thedevelopment host are:
        
        $HOME/pvm3/bin/$PVM_ARCH
        $XPVM_ROOT/src/$PVM_ARCH (optional)
        
        
                                         10
        $PADE_ROOT/caml_utils/$PVM_ARCH
        $PADE_ROOT/pade
        $PVM_ROOT/lib/$PVM_ARCH
        $PVM_ROOT/lib
        
         The   caml_utils  directory   is  not   necessarily  installed   under
        $PADE_ROOT. Consult your system administrator for the actual location.
         On the  remote  hosts,  the  user  is  only  required  to  have  the
        environment variables PVM_ROOT and PVM_ARCH. None of the path additions
        arerequired on the remote hosts.
         For   further  information   on  these   environment  variables   and
        directories, see  the  script pade_setenv (if  your  shell is  csh  or
        tcsh), or  pade_export  (if  your shell  is sh,  ksh  or  bash) in  the
        directory  $PADE_ROOT/examples.     An  alternative  to  entering  this
        information in  the shell  startup file  is  to execute  one of  these
        scripts before starting PADE.
        
        2.2PVM Directory
        
        The directory  $HOME/pvm3/bin/$PVM_ARCH  is   where  PVM  looks   for
        executable files for  spawned processes  by default.   If  you do  not
        usethe  ``ep=''  option in  the  PVM  hostfile, this  directory  must
        exist, and  must contain  symbolic links to  some of  the programs  in
        thecaml_utils/$PVM_ARCH directory.   This directory structure  must be
        present on all hosts, development  and remote.  A utility  is provided
        tocreate  the required  directory  structure if  it  does not  exist.
        Itmust  be run  on each  architecture/file-system combination.    The
        executable for this utility is padeinituser, and it is  located in the
        caml_utils/$PVM_ARCH directory.   If you do not use  the ``ep='' option,
        then run
        
        padeinituser
        
        toinitialize the  default directory  $HOME/pvm3/bin/$PVM_ARCH. If  you
        use the  ``ep=''  option  in  the  PVM  hostfile,  then  one  of  the
        directories specified by ep must contain symbolic links to some of the
        CAML Utilities.  This can be accomplished by
        
        padeinituser -ep dir
        
        where dir is a directory specified by ``ep='' in the PVM hostfile.
        
        
        2.3The .rhosts File
        
        ForPADE  to function properly,  a program  on one  machine must  have
        permission to write into the file system of another machine.   This is
        accomplished through the  file .rhosts in  the user's home  directory.
        This file must reside in every file system of the virtual machine, and
        must list every host name in the virtual machine.
        
        
        
        
        
        
                                         11
        
        
        
        
        
        
        Chapter 3
        
        
        
        Running PADE: A Tutorial
        
        
        
        
        PADE is  intended to  be  an intuitive  graphical  user interface  for
        developing parallel applications  on a virtual  machine.  The  typical
        useof PADE consists of the following steps:
        
        1. Initiate the virtual machine using the PVM button.
        
        2. Construct the PADE data using the Setup button or Graph button.
        
        3. Distribute and compile the application using the PVMmake button.
        
        4. Run the application using the Apps button.
        
        5. Edit files, redistribute  modified files, and repeat the  cycle as
           necessary.
        
         In this chapter  we  go through  an example  of  this process  using
        themanager/worker program  in the examples  subdirectory of the  PADE
        distribution.   This program  is a  variation of one  of the  examples
        contained in the PVM distribution.  The files located  in the examples
        subdirectory are:
        
          omanager.c -- A  slightly modified version of the  master.c program
           provided with the PVM software.
        
          oworker.c --  A slightly  modified version  of the slave.c  program
           provided with the PVM software.
        
          omakefile.mw --  A generic  makefile that  can be  used to  compile
           the  manager.c and  worker.c source  files.   A  modified copy  of
           this  makefile will  be needed  for each  architecture/file-system
           combination of the user's virtual machine.
        
          opade_setenv   --  A  script  that  can  be  executed   to  set  the
           environment  variables and  directory  paths  that are  needed  in
           order for  PADE to run.    This file assumes  the user is  running
           either the csh or tcsh shell.
        
          opade_export  --  A script  similar  to pade_setenv except  that  it
           assumes the user is running either the sh, ksh, or bash shell.
        
        
                                         12
          omw -- An example PADE data file used to compile the source files.
        
          omw.pvmmake  -- The  PVMmake config  file corresponding  to the  mw
           PADE data file.
        
          opvmmake.output --  An example of  the output from running  PVMmake
           to compile the manager/worker example.
        
          omw_make_clean --  An  example PADE  data file  used  to remove  the
           executable and object  files created on all virtual  machine nodes
           during compilation of the manager/worker example program.
        
          omw_make_clean.pvmmake -- The  PVMmake config file  corresponding to
           the mw_make_clean PADE data file.
        
          omw_run   --  An  example  PADE  data  file  used   to  execute  the
           manager/worker program using PVMmake.
        
          omw_run.pvmmake  -- The  PVMmake command  file corresponding to  the
           mw_run PADE data file.
        
         The manager.c and  worker.c source files need not be modified  by the
        user.   The  user will  need to  make several  copies of  makefile.mw,
        possibly one for  each node on  the virtual  machine, and modify  each
        appropriately.   The PADE data  files and corresponding PVMmake  files
        areprovided only as examples and will not be needed by the user.
        
        3.1Example PADE Session
        
        Inthis  section a  PADE session  is followed  step by  step.   It  is
        assumed that the PADE software  is installed as described in  the PADE
        Installation Guide,  and  that  the user  has  configured his  or  her
        environment as described  in Chapter 2  of this manual.   Each of  the
        following subsections contains  a brief explanation  of a step of  the
        PADE session and the specific actions you should take.
         Before  beginning  the   tutorial,  you  should  copy   the  examples
        subdirectory to  another directory and  create several  copies of  the
        makefile.   You  will need  one makefile  for each  architecture/file-
        system  pair  in  your  virtual  machine.     Put   each  makefile  in
        makefile.hostname where hostname  is the name  of one of the  machines
        with the given  architecture/file-system, and  modify the makefile  as
        needed.
        
        
        3.1.1Starting PADE
        
        PADE is  invoked by typing  pade at  the command  prompt.   PADE  will
        first read  environment variables  and then  search the  path for  the
        stand-alone programs that it can potentially execute.  The user should
        seethe following message in the window in which PADE was invoked:
        
        Welcome to PADE (1.4)
        Checking environment variables
        Checking commands
        
        
                                         13
        PADE will then proceed with a list of the stand-alone programs that it
        wasunable to find  by searching the  directories in the  user's PATH,
        andenvironment variables that it was unable to find.  After this, the
        PADE main window (Figure 5.1) should appear.
        
         1. Type pade at the command prompt.
        
        3.1.2Starting the Virtual Machine
        
        Thefirst action the user should take after invoking PADE is to create
        a PVM  hostfile and  start the  PVM console.    The  user is  strongly
        encouraged to keep the pop-up  window containing the PVM  console open
        aslong as PADE  is running.   One reason for  this is that  PADE will
        hang if the user executes a parallel application that hangs.  This can
        beremedied by halting the VM from the PVM console.
        
        1. Select Edit Hostfile...  under the PVM button.
        
        2. Enter a  file name (for example,  pvmhostfile) in the  pop-up PADE
           Edit  File window,  and click  on  the editor  button (the  editor
           button will be labeled  with the editor specified by the  user for
           example, vi).
        
        3. In the  pop-up editor window,  create a  file containing the  host
           names in the virtual machine, one name per line.
        
        4. Select PVM console under the PVM button.
        
        5. Type conf at  the PVM prompt in  the pop-up PVM console  window to
           view the configuration of your virtual machine.
        
        
        3.1.3Entering Host Names
        
        Thefirst part  of the set-up  process is to  construct the PADE  host
        list.  Hosts may be added to the list one at a  time using Add Host...
        under the Setup button, however it is quicker to obtain  the host list
        directly from the  PVM hostfile  as described  above.   It is  crucial
        that the host names be identical  to those known to PVM,  as indicated
        bythe  PVM console command  conf.   A  common example  of when  these
        names may differ is that PVM may drop the domain from  the name of the
        development host.
        
        1. Select Add from Hostfile ...  under the Setup button.
        
        2. Double-click  on  the name  of  the  PVM hostfile  you  previously
           created.
        
        3. If  any  of the  host  names  in  the  PADE main  window  are  not
           identical to those in the PVM console window, then
        
        
           (a) Click on the host name in the PADE main window.
        
        
        
                                         14
           (b) Select Modify Host under the Setup button.
        
           (c) Edit the host name in the pop-up PADE Modify Host window.
        
           (d) Click on Apply
        
        
        3.1.4Entering Host Commands via Setup
        
        Nowthat all  the hosts  have been  entered, the  user can proceed  to
        enter the host commands.  The commands to be  entered for a particular
        host will be  those necessary  to compile  the manager.c and  worker.c
        programs.  In this example, the general procedure  for compiling these
        programs will be to change  to the remote-host directory in  which the
        source files  are located  and to  issue the  ``make'' command.    The
        makefile appropriate  to the particular  host will  have already  been
        sent as part of the file-transfer phase of the process of building the
        parallel application.
        
        1. Click on the first host name in the PADE main window.
        
        2. Select Modify Host under the Setup button.
        
        3. Enter the command
           cd <path to your home directory>/pvm3/bin/ARCH; make
           in the Host  commands:  part of  the pop-up window, where  ARCH is
           the PVM architecture name for that host.
        
        4. Click on Apply.
        
        
        3.1.5Entering Host Commands via Graph
        
        Analternative approach to entering  host commands is to use  the PADE
        Graph.
        
        1. Click on the Graph button.
        
        2. Select Modify under the Hosts button in the PADE Graph window.
        
        3. Click on the circle representing the second host.
        
        4. Enter the command
           cd <path to your home directory>/pvm3/bin/ARCH; make
           in the Host  commands:  part of  the pop-up window, where  ARCH is
           the PVM architecture name for that host.
        
        5. Click on Apply.
        
        6. Repeat for remaining hosts.
        
        7. Click on Close in the PADE Graph window.
        
        
        
        
                                         15
          At this point,  you should  enter the  host commands  for all  hosts
         using either the Setup or Graph approach.  Note that if two hosts have
         thesame architecture and share a common file system, only one of them
         needs the compilation commands.
        
         3.1.6Entering Files via Setup
        
         Thenames of the files that must be transferred  from development host
         toremote host must be entered for each remote host.  In this example,
         three files will  be transferred to  each host.   They are  manager.c,
         worker.c, and makefile.*, where the makefile  name extension indicates
         forwhich host the makefile is appropriate.
          The following process  shows three ways to enter file names:   1) use
         thefile browser,  2) copy and  modify an existing  file name, and  3)
         type in  the file name  using path  names from  prior entries.    When
         typing in file names, it is possible to use the ``*'' symbol as a wild
         card.  For example,  *.c will create an  entry for each file  with the
         suffix ``c''.
        
         1. Click on the first host name in the PADE main window.
        
         2. Select Setup Files...  under the Setup button.
        
         3. Click on the Add button in the PADE Files window.
        
         4. Click on the File Browser button in the pop-up window.
        
         5. Double-click on manager.c in the file browser.
        
         6. Type <full  path of  your root  directory>/pvm3/bin/ARCH/manager.c
            in the Remote file:  part of the PADE Add File window.
        
         7. Click on Apply and Close.
        
         8. Click on the manager.c line in the PADE Files window.
        
         9. Click on Copy in the PADE Files window.
        
        10. Click on Modify in the PADE Files window.
        
        11. Change manager.c to worker.c on the Local  file:  and Remote file:
            lines of the PADE Modify File window.
        
        12. Click on Apply.
        
        13. Click on Add in the PADE Files window.
        
        14. Click on Fill with last path in the Local  file:  part of the PADE
            Add File window.
        
        15. Type the name of the makefile to send to this host.
        
        16. Click on  Fill with last  path in  the Remote file:   part of  the
            PADE Add File window.
        
        
                                          16
        17. Type makefile
        
        18. Click on Apply and Close.
        
        19. Click on Close in the PADE Files window.
        
         3.1.7Entering Files using Graph
        
         Analternate means of creating the file list is to use the PADE Graph.
         Thefollowing process shows  two ways to copy  the file list  from one
         host to another.   Steps 1 through  9 illustrate copying files  one at
         a time from the first  host to the second  host.  Steps 10  through 13
         illustrate copying files all at once from the first host  to the third
         host.
        
        
         1. Click on Graph in the PADE main window.
        
         2. Select Copy under the Files button of the PADE Graph window.
        
         3. Click on the manager.c rectangle of the first host.
        
         4. Repeat for worker.c and makefile.
        
         5. Drag  the   newly  created  manager.c,   worker.c,  and   makefile
            rectangles from the first  host to the second host, and  drop them
            on the circle.
        
         6. Select Modify under the Files button.
        
         7. Click on the makefile rectangle of the second host.
        
         8. Change  the  name of  the  makefile  under  Local file:    to  the
            makefile for  the second  host, and  change the  path to have  the
            correct ARCH under Remote file:, and click on Apply.
        
         9. In  the same  way,  modify the  path  for the  Remote  file:   for
            manager.c and worker.c
        
        10. Select Copy From Host under the Files button.
        
        11. Click on the circle  of the first host, and then on  the circle of
            the third host.
        
        12. Change the name  of the makefile and  paths for the third  host as
            described above.
        
        13. Repeat for remaining hosts and click on Close.
        
          Atthis  point, you should  enter the file  list for all hosts  using
         either the Setup or Graph approach.   Note that if two hosts  have the
         same architecture and  share a common  file system,  only one of  them
         needs to receive the files.
        
        
        
                                          17
        3.1.8Saving the Setup Information
        
        Once all of the hosts,  host commands, and files have been  entered to
        your satisfaction, the  information can  be saved.   The first  action
        saves the  information in  a file  for PADE,  and can  be loaded  into
        another PADE session.   The second  action creates the  PVMmake config
        file (see Chapter 4) which contains the commands for PVMmake.
        
        1. Select Save under the File button in the PADE main window.
        
        2. Type a  file name, for example  my_mw, in  the File name:   line of
           the file browser, and click on OK.
        
        3. Select Save Config File as...  under the PVMmake button.
        
        4. Type a file name,  for example my_mw.pvmmake, in  the file browser,
           and click on OK.
        
        
        3.1.9Running PVMmake
        
        With the  PADE data  entered,  you  are now  ready  to distribute  the
        files and compile the  manager/worker example program.   It  is always
        a good idea to list the  PVMmake config file to verify that  your PADE
        data is  correct.   The format  of the  PVMmake config  file is  given
        inChapter 4.   The  output of  PVMmake can be  displayed in either  a
        terminal window (xterm, or a  type specified by user preference)  or a
        scrollable/savable window, depending on  which form of the  Run button
        youchoose.  For comparison, an example of this output can be found in
        thefile pvmmake.output in the examples subdirectory.
        
        1. Select List Config File under the PVMmake button.
        
        2. After reviewing the file, click on Close.
        
        3. Select Run (in PADE window) under the PVMmake button.
        
        4. After viewing the output in the pop-up window, click on Close.
        
        3.1.10Running the Application in a Terminal Window
        
        Once the manager/worker  program has  compiled successfully, the  next
        order of business is to run it.   This can be done within  PADE in two
        different methods:   in a  terminal window, or  by PVMmake.   For  the
        remainder of  this section,  we will assume  that the  terminal is  of
        type xterm.  The xterm method is useful when  the application requires
        interactive input at the terminal and  when the user does not  wish to
        save anything the application writes to standard output.   The PVMmake
        method is useful if the output  of the application that is  written to
        thescreen is important  to the user and  if the input to  the program
        canbe redirected.
        
        1. Select Add...  under the Apps button.
        
        
        
                                         18
        2. Type manager in the pop-up window, and click on Done.
        
        3. Select manager under Run (in xterm) under the Apps button.
        
        4. When you are prompted in the xterm window  for the number of slave
           programs, enter a reasonable integer, for example 10.
        
        5. Type exit at the shell prompt in the xterm window.
        
        3.1.11Running the Application Using PVMmake
        
        Torun the parallel application  using PVMmake, you create a  new PADE
        data configuration  with the  development host  as the  only host,  no
        files to transfer, and the  command being what is required to  run the
        application.  Interactive input must  be redirected from a file.   The
        output from the  pop-up window can  be saved to a  file with the  Save
        button.
        
        
        1. Select New under the File button to delete the current PADE data.
        
        2. Select  Add  Host...    under  the Setup  button,  and  enter  the
           development host name and the command
           cd $HOME/pvm3/bin/$PVM_ARCH; manager < manager.input
        
        3. Save the  new PADE data  file and PVMmake  config file with a  new
           name, for example, my_mw_run.
        
        4. Create  a file  called  manager.input  in $HOME/pvm3/bin/$PVM_ARCH
           containing just an integer, for example, 10.
        
        5. Select Run (in PADE window) under the PVMmake button.
        
        3.1.12Exiting PADE
        
        1. Select Exit under the File button in the PADE main window.
        
        3.2Other PVMmake config files
        
        Itis  useful in the  development process  to create  and use  PVMmake
        config files  for other purposes.    An example  of this  is a  ``make
        clean'' config file.   A sample of such  a config file is  provided in
        theexamples subdirectory  under the name  mw_make_clean.   This  config
        file contains  commands instructing  PVMmake to  issue ``make  clean''
        commands on each host.  Users who inspect the sample makefile provided
        with the PADE  distribution will notice  a ``clean'' directive at  the
        bottom.
         Many  other routine  functions  can be  automated  in a  way  similar
        tothe  ``make clean''  example.   In  this sense,  PADE  can be  used
        creatively for more tasks than just parallel program development.
        
        
        
        
        
        
                                         19
        
        
        
        
        
        
        Chapter 4
        
        
        
        PVMmake
        
        
        
        
        This chapter  discusses the  function and  operation  of PVMmake,  the
        utility that  mediates all  communications made  by  PADE between  the
        development host and other nodes of the virtual machine.   The actions
        ofPVMmake usually take  place without the  need for attention  by the
        user.   However, if  there is  a problem  during the file-transfer  or
        command-execution operations performed by PVMmake, an understanding of
        the(very simple) PVMmake command syntax is  essential for determining
        theproblem.
        
        4.1Capabilities and Software Components of PVMmake
        
        PVMmake is  a  PVM application,  which  uses the  PVM  message-passing
        library to perform two basic operations:
        
          oFile transfer --  PVMmake can send an arbitrary text  (ASCII) file
           from one arbitrary host to another arbitrary host.
        
          oCommand execution -- PVMmake can issue  an arbitrary shell command
           on an arbitrary host.  Thus PVMmake  can execute Unix commands and
           shell scripts  as well  as compiled  programs.   Furthermore,  the
           output of these  commands, scripts, or programs can be  piped back
           to be viewed on the node where PVMmake was launched.
        
        Thefact that PVMmake performs just these two  basic operations, makes
        theprogram very flexible, powerful, and  very easy to use.   PADE can
        beviewed as being essentially a shell for running PVMmake.
        
        
        4.2Running PVMmake
        
        When the pvmmake binary is launched from the command line, it launches
        a copy of the targets binary  on each node of the virtual  machine and
        then reads  and performs all  of the  commands listed  in the  PVMmake
        config file.  Note that if PVMmake cannot start the targets program on
        allnodes of the virtual  machine (which must already be  running), it
        prints an error message and exits.
         The syntax for starting PVMmake is as follows
        
        pvmmake [-f pvmmake`config`file]
        
        
                                         20
        IfPVMmake is launched without the optional file  name parameter, then
        theprogram looks for a default config file named pvmmake.config.   If
        itdoes not find this file, PVMmake prints an error message and exits.
        PADE essentially works  by processing the  information entered in  the
        Setup window and  writing a PVMmake  config file.   The user can  then
        launch PVMmake to execute the commands contained in this file.
        
        4.3The PVMmake config file
        
        ThePVMmake config file can  be created with an ordinary  text editor.
        Thus PVMmake can be used in parallel applications development by those
        users who do  not have  access to  the X  Window System.   The  syntax
        ofcommands in  the PVMmake config  file is quite  simple and is  best
        illustrated by  an  example.    An  example config  file,  mw.pvmmake,
        iscontained in  the nist_pade/examples  subdirectory.   This file  was
        written by PADE and comes from the manager/worker example.
         The config file contains three types of items:   1) comments, 2) file
        transfer command, and 3) commands to be issued to remote hosts.
         Lines beginning with the # character are comments.
         The  syntax for  the PVMmake  file-transfer command  consists of  two
        elements.  These elements are
        
          oOne line containing the  full path name of the local-host  file to
           be transferred.
        
          oOne or more  lines each containing two  items:  (1) the name  of a
           host to which  the file must be  sent and (2) the  file's location
           on that host.   These two  items must be separated  by whitespace.
           This list of remote hosts/locations must be  terminated by a blank
           line.  A comment cannot take the place of the blank line.
        
         Formally, the syntax is defined by:
        
        
        file`name`on`local`host
        remote`host`1     filename`on`remote`host`1
        remote`host`2     filename`on`remote`host`2
        ...              ...
        remote`host`N     filename`on`remote`host`N
        <BLANK LINE>
        
         Note  that local-host refers  to the  computer on  which the  pvmmake
        binary was launched;  remote-host refers  to any  node of the  virtual
        machine.
         The syntax  for telling PVMmake to issue  a command on a  remote host
        hasthe following form:
        
        @ remote`host command`1; command`2;...command`N [+errors]
        
        Thefirst  character on  the  line must  be the  @ symbol.    This  is
        followed by the  name of the  host on which the  command(s) are to  be
        issued which is, in turn,  followed by one or more  commands separated
        bysemicolons.  An optional  argument +errors is used to  tell PVMmake
        tosend any output generated by  the commands issued back to  the host
        
        
                                         21
        onwhich the pvmmake binary was launched.
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
                                         22
        
        
        
        
        
        
        Chapter 5
        
        
        
        ThePADE User's Reference
        
        
        
        
        This chapter  contains  a  description  of  the  PADE  graphical  user
        interface.   Users  who  prefer to  jump  in and  try  a program  will
        probably want  to  start  with Chapter  3  in  which can  be  found  a
        step-by-step tutorial using  the manager/worker  example program  that
        comes bundled with the PADE source  code.  Each time a button  or menu
        isencountered which is unfamiliar to the user, it can be looked up in
        this chapter.
         Before  running  PADE,  all  required  software  must  be  installed,
        several environment variables must be set, and a  few directories must
        beadded to the  user's executables path.   See the  PADE Installation
        Guide for instructions  for software  installation, and  Chapter 2  in
        this manual for setting the user's environment.
        
        5.1Starting PADE
        
        PADE is invoked with the command
        
        pade [filename]
        
        The filename  is   optional;   if  present  it   must  be  the   name
        ofa PADE data file saved during a previous session.
         Ifthe  file .paderc is  present in the  user's home directory,  PADE
        will read this file to set some internal variables.   The .paderc file
        iswritten at various times during the execution of PADE.  The user is
        notrequired to  create or edit  this file  outside PADE. The  .paderc
        variables are:
        
          oCONFIRM -- either On  or Off for confirmation dialogs; set  in the
           Set Preferences menu (see Section 5.4).
        
          oFILE_PATH -- the directory  where the file browser comes up; set in
           the Set Preferences menu.
        
          oLAST_PVMMAKE  --  time when  PVMmake  was last  run;  set  whenever
           PVMmake is run from PADE.
        
          oTERM -- user's  favorite term command, such  as xterm; set  in the
           Set Preferences menu.
        
        
        
                                         23
          oWWW  -- user's  favorite  WWW  browser command;   set in  the  Set
           Preferences menu.
        
          oAPPn where  n is an integer  -- applications that can  be launched
           from PADE; set in the Apps menu (see Section 5.11).
        
         Menus  use  the  left mouse  button.     Menus can  be  torn  off  by
        selecting the dashed line so that they do not disappear after making a
        selection.  This opens a new window containing the menu,  which can be
        closed or terminated in the usual way for your window manager.
         There  are accelerator  keys for some  of the  menus.   For  example,
        Cntl-o opens a new file (see Figure 5.2).  All menu items that have an
        accelerator key have the control sequence next to the menu item.
         Buttons  are  disabled for  any  actions  that cannot  be  performed,
        either because of  missing optional  software (for  example, XPVM)  or
        because of  the  current  configuration state  (for  example,  PVMmake
        cannot be run until the PVMmake config file has been selected).
        
        
        5.2Auxiliary Windows
        
        This section  describes  several auxiliary  windows that  appear  from
        multiple places within PADE.
        
          oFile Browser --  used to select a file.   A list of files  in your
           home directory  or the directory  specified by Set Preferences  is
           presented.   Double-clicking  on a  file name  selects that  file.
           You can change to  another directory by typing in a  new directory
           name and clicking on Rescan, and create a new  file by typing in a
           new file name.
        
          oPADE Edit File  window -- accesses a  file for editing.   The file
           name can  be entered  in the text  part of the  window; usually  a
           default file is provided by the parent window.   There is a button
           to bring up  the file browser to  select a different file.   There
           is a button to launch the user specified editor command.
        
          oPADE List window  -- a scrollable/savable window used  for listing
           files or output.  The contents can be  saved to a file by clicking
           on the Save button, or discarded by clicking on Close.
        
          oText  entry boxes  -- many  windows have  a  section for  entering
           text.   In most cases  text can be  pasted in from  other non-PADE
           windows.   Mark  text in  the other  window by  dragging the  left
           mouse button over it.  Paste it in  the text entry box by clicking
           on the middle mouse button.
        
          oData entry  windows --  the pop-up windows  for entering the  PADE
           data under the Setup and Graph buttons  contain an Apply button at
           the bottom.   This  must be  pressed to apply  the changes to  the
           PADE data.   When entering file names, the ``*''  character can be
           used as a wildcard.
        
        
        
        
                                         24
        
                         Figure 5.1:  The PADE main window
        
                             Figure 5.2:  The File menu
        
        
        5.3The PADE Main Window
        
        ThePADE main window is shown in Figure 5.1.  The nine buttons will be
        described in subsequent sections of this chapter.   The two scrollable
        windows show the current  PADE data.   The left window lists  the host
        names in the PADE data,  and the right window shows the  commands that
        PVMmake will send to those hosts.
        
        5.4The File Button
        
        TheFile button, illustrated in Figure 5.2, is used  to read and write
        PADE data files, set user preferences, and exit PADE. In all cases, if
        thecurrent PADE data have been modified, the user will be prompted to
        save it before loading new data into pade.  The menu entries are:
        
        
          oNew -- clears the  current PADE data.  This is used  to remove the
           PADE data before creating new data.
        
          oOpen...   --  load a PADE  data file  into PADE.  This is used  to
           retrieve saved data.  It opens a  File Browser window (see Section
           5.2).
        
          oSave  -- write  the current  PADE data  to the  current PADE  data
           file.  This  is used to update a file with the  current PADE data.
           If a PADE data file is not open, a File Browser window pops up.
        
          oSave As...    -- write  the current  PADE data to  any file  name.
           This is  used to save  the current PADE  data in a  new file.   It
           opens a File Browser window.
        
          oPreferences --  sets user preferences.   This  has a submenu  with
           the following entries:
        
        
            -- Terminal  -- the kind of term window that is  used for running
               PVMmake,  applications, and some CAML Utilities,  for example,
               xterm.
        
            -- WWW  Browser --  the user's  favorite World  Wide Web  browser
               command.
        
            -- File  Browser Default Path -- pathname of the  directory where
               the file browser will look for files.
        
            -- Confirmation  Dialog --  toggles on or  off the appearance  of
               confirmation dialog windows whenever an action is taken.
        
        
        
                                         25
        
                            Figure 5.3:  The Setup menu
        
            -- Save  Preferences  --  writes  current  values  of  the  above
               preferences to the .paderc file in the user's home directory.
        
        
          oExit -- end the PADE session.
        
        
        5.5The Setup Button
        
        TheSetup button  (Figure 5.3)  is used to  enter the  PADE data in  a
        textual manner.  Alternatively, see Section 5.8 for how to enter these
        data graphically.   The PADE data  consist a list  of hosts, a set  of
        files to be sent to those hosts, and a set of  commands to be executed
        onthose hosts.
         Most of the  entries in this menu are activated by  first clicking on
        a host name and then selecting the menu entry.  The menu entries are:
        
          oAdd  Host...   --  adds a  new host  to  the list  of hosts.    It
           pops  up a  text entry  box in  which the  user can  enter a  host
           name and a  semicolon separated list of  host commands.   The Last
           Command button  duplicates the  command entered  for the  previous
           host.  When PVMmake is run within PADE,  the host will execute the
           commands.
        
          oAdd from Hostfile...   -- copies  the complete list of  hosts from
           the PVM  hostfile, rather than  entering them one  at a time  with
           the Add Host...   entry.  Note, however, that the  host names must
           match those  shown by the conf  command in the PVM  console window
           (Section  5.9) exactly,  including the  presence or  absence of  a
           domain name.   You may need to modify some of the  host names (see
           Modify Host below).  This entry will pop  up a file browser window
           from which you select a PVM hostfile.
        
          oCopy  Host --  duplicates  a host  entry,  including the  list  of
           commands and  files.   Since  the list  of commands  and files  is
           often nearly identical for different hosts,  a ``copy and modify''
           approach is  often the  quickest way  to create new  hosts in  the
           PADE data.
        
          oModify Host  -- modifies a host  name or commands.   A  text entry
           box will  pop up with  the current host  name and commands,  which
           can be modified.
        
          oDelete Host --  removes a host,  its commands, and its  files from
           the PADE data.
        
          oSetup  Files...   --  creates the  list  of files  to transfer  to
           the host.   The  PADE Files window  will appear.   This window  is
           described in the next section.
        
        
        
        
                                         26
        
                         Figure 5.4:  The PADE Files window
        
        5.6The PADE Files Window
        
        ThePADE Files window  (Figure 5.4) is  brought up by  selecting Setup
        Files...  under the Setup button, or by double-clicking on a host name
        inthe PADE main window.  This window is used to set the list of files
        tocopy from the development  host to another host.   The name  of the
        other host is shown near the top of the window.
         The  scrollable  window  shows  the  current  list  of  files  to  be
        transfered  to  this  host,   including  the  full  pathname   on  the
        development host and the full pathname  on the destination host.   The
        buttons in this window are used to create and modify these data.
        
          oAdd -- adds  a new file to the list.   This button pops up  a text
           entry window in  which you type the  full pathname of the  file on
           the development host, and the full pathname  of where to place the
           file on the destination  host.  On the development host,  the file
           can be selected with the file browser.   For either host, the Fill
           with last path button can reduce typing  by providing the pathname
           of the last file added.
        
          oCopy From Host --  copies the file list from another host.   Often
           a ``copy  and modify''  approach is  the fastest way  to create  a
           file list.  Once the list is copied,  the file designations can be
           changed using  the Modify or  Global Replace buttons (see  below).
           This button  pops up a  window in which  you select the host  from
           which to  copy the  file list.   Either  single-click on the  host
           name and  on the Apply button,  or double-click on the  host name.
           Selecting  Local only  rather than  the default  Local and  remote
           will create a list in which only the  development host part of the
           entries is copied.
        
          oCopy -- copies an  entry in the file list, which  can subsequently
           be modified.   First click on an entry in the list,  and then this
           button.
        
          oModify -- modifies an  entry in the file list.  First  click on an
           entry in  the list,  and then  this button.   This  will pop up  a
           text entry  window containing the  selected entry, which can  then
           be modified.
        
          oGlobal  Replace --  replaces  a string  of  characters by  another
           string in all  pathnames and file names  in this file list.   This
           is particularly useful when the Copy From  Host button was used to
           create the file list,  and the pathname is different on  the other
           host.   Clicking on  this button  pops up a  text entry window  in
           which you enter the  two character strings.  Clicking on  the Last
           Replace button will initialize the strings with  those used in the
           last global replace.
        
          oDelete -- removes an entry from the file list.   First click on an
        
        
        
                                         27
        
                           Figure 5.5:  The Graph window
        
           entry in the list, and then this button.
        
          oUndo  -- identical  to the  Undo button  in the  PADE main  window
           (Section 5.7).
        
          oEdit File -- edits files on the development host.   First click on
           an entry in  the file list, and then  this button.  This  will pop
           up a PADE Edit File window (Section 5.2).
        
        
        5.7The Undo and Sort Buttons
        
        TheUndo and Sort buttons are the only buttons in the main window that
        donot pop up an associated menu  or window.  The Undo button  is used
        tocancel the last action performed by PADE related to hosts, files or
        commands.  The  Sort button is used  to alphabetize the host  list and
        thefile list of each host.
        
        5.8The Graph Window
        
        TheGraph button  in the PADE  main windows pops  up the Graph  window
        (Figure 5.5), which  is used  to enter PADE  data by graphical  means.
        Alternatively, these data can be entered textually by  using the Setup
        button (Section 5.5).
         The main  part of the window  contains a graphical  representation of
        thePADE data.  Each host is represented by a circle with the hostname
        above it.  The files to be transfered to each  host are represented by
        rectangles attached to the  circles and labeled  with the name  of the
        file on the development host.
         Clicking  on  a   circle  brings  up  the  host  name   and  commands
        information in the top of the  Graph window.  Clicking on  a rectangle
        brings up  the  information  about  a  file.    Double-clicking  on  a
        rectangle brings up the Edit File window, equivalent to  the Edit File
        button in the PADE Files window (Section 5.6).
         File designations can  be moved from one host to another  by dragging
        therectangle  with the  left mouse  button,  and dropping  it on  the
        circle of the other  host.  The  functionality of copying a  file from
        onehost to  another is accomplished  by first  copying the file  (see
        below) and then moving it to the other host.
         For  most operations in  the menus  under the  Graph window  buttons,
        youselect the action from the  menu, and then click on the  circle or
        rectangle to which the action is to be applied.
         The buttons in the Graph window are:
        
        
          oHosts -- The operation of the menu  under this button is identical
           to  the menu  under  the  Setup button  of  the PADE  main  window
           (Section 5.5).
        
          oFiles -- The operation of the menu  under this button is identical
           to the  buttons in  the PADE  Files window  (Section 5.6),  except
        
        
                                         28
        
                             Figure 5.6:  The PVM menu
        
           that when an action  is selected you will be prompted (in  the top
           of the Graph window) to click on  the circle(s) or rectangle(s) to
           which the action applies.
        
          oUndo  -- identical  to the  Undo button  in the  PADE main  window
           (Section 5.7).
        
          oSort -- alphabetizes the hosts and the files within each host.
        
          oColumns and  Rows -- these  two buttons change  the layout of  the
           hosts in  this window.    Columns determines the  number of  hosts
           displayed in  a horizontal line.   Rows  determines the number  of
           files that will fit vertically in the window.
        
          oHelp -- displays a summary of some of  the operations in the Graph
           window near the top of the window.
        
        
        5.9The PVM Menu
        
        ThePVM  menu  is  used  to  configure and  execute  PVM  and  related
        programs.  It is pictured in Figure 5.6.  The menu entries are:
        
          oPVM console --  brings up a PVM console,  and starts PVM if  it is
           not already  running.   If  a PVM  hostfile has  not already  been
           selected (see  below), then  the user will  prompted to create  or
           select a hostfile,  or to start PVM  without a hostfile.   The PVM
           console will  come up  in a  term window (for  example xterm,  but
           the type is determined by user preferences,  Section 5.4), and may
           be left  up or closed with  the PVM console command  quit.   It is
           recommended that the console  window be left open in case  the PVM
           application ``hangs''  (which will  also cause PADE  to hang),  in
           which case the console is required to terminate the application.
        
          oPVM  daemon --  starts  the PVM  daemon  without bringing  up  the
           console.  As with PVM console above, the  user will be prompted if
           a hostfile has not been selected.
        
          oxpvm -- launches the XPVM application, a GUI interface to PVM.
        
          opvmstat  --  runs  the  CAML  Utility  pvmstat.      This  returns
           information about the status of the virtual machine.
        
          opvmtidy  -- runs  the CAML  Utility  pvmtidy.    This removes  all
           spurious pvmd.*  files from the nodes  of the virtual  machine and
           kills any  hopelessly lost PVM daemons,  in case PVM was  not shut
           down gracefully.
        
          oPick  Hostfile...     -- selects  an  existing  file  as  the  PVM
           hostfile.  It brings up a file browser.
        
        
        
                                         29
        
                           Figure 5.7:  The PVMmake menu
        
               Figure 5.8:  The Set Files and Commands to Save window
        
        
          oEdit Hostfile...   -- creates or edits a PVM hostfile.   It brings
           up a PADE Edit File window.
        
          oWrite Host list  to Hostfile...  --  creates a PVM hostfile.   The
           file will contain  the same list of  hosts as in the  current PADE
           data.   It brings up  a file browser to  select the file  to write
           the host list to.
        
          oList Hostfile -- displays the current PVM hostfile.
        
        
        5.10The PVMmake Menu
        
        ThePVMmake menu  (Figure 5.7) is  used to  create the PVMmake  config
        file (see Chapter 4) and run PVMmake.
         The entries are:
        
          oSet Files  and Commands  to Save --  opens another window  (Figure
           5.8) in which  you select a subset  of hosts to send  commands to,
           and, for each  host, a subset of files  to send.  This  gives PADE
           nearly as much power for parallel applications  as is found in the
           widely used  make command  for sequential  applications in a  Unix
           environment.   The left  half of the  window allows you to  choose
           which hosts  will receive  commands, and  to toggle between  hosts
           for the  setting of which files  to send.   The right half  of the
           window allows  you to  choose which files  are to  be sent to  the
           selected host.   The Files  modified since last PVMmake  button at
           the bottom  will select those files  that have been  changed since
           the last time PVMmake was run.  The  version of this button on the
           left selects these files  for all hosts, while the version  on the
           right selects  them for one  host.   If the  last PVMmake run  was
           with the current PADE data, then this acts  like make in the sense
           that only  those files  that have  been changed will  be sent  and
           recompiled.   Be cautious, however,  if PVMmake is being  run with
           different PVMmake  files, as in  the ``PVMmake clean'' example  in
           the tutorial (Section 3.2).
        
          oSave  Config  File  as...     --  writes  a  PVMmake  config  file
           containing the  information in  the PADE data,  filtered by  those
           items selected by Set Files and Commands to Save.   It brings up a
           file browser to  select the name of  the config file.   Be careful
           not to overwrite an unfiltered file with the filtered data.
        
          oPick  Config File:    <current filename>  --  selects an  existing
           PVMmake config file.  It brings up a file browser.
        
          oEdit Config File...   -- creates  or edits a PVMmake  config file.
           It brings up a PADE Edit File window.
        
        
                                         30
        
                             Figure 5.9:  The Apps menu
        
                            Figure 5.10:  The Help menu
        
        
          oList Config  File -- lists  the current PVMmake  config file in  a
           scrollable window.
        
          oRun (in xterm) --  runs PVMmake with the output going to  an xterm
           window, or  the type  of term specified  by the user's  preference
           (Section 5.4).
        
          oRun (in PADE  window) -- runs PVMmake  with the output going  to a
           scrollable window.
        
          oSave Config File and Run (in xterm) -- this  is a shortcut that is
           equivalent to pressing Save Config File  as..., selecting the file
           shown under  Pick Config File:   <current filename>, and  pressing
           Run (in xterm).
        
          oSave Config  File and  Run (in  PADE window) --  same as  previous
           button except output goes to a scrollable window.
        
        
        5.11The Apps Menu
        
        The Apps  menu  (Figure  5.9)  can  used  for  running  any  command,
        forexample PVM  applications, performance  monitoring software,  Unix
        commands, etc.   The  most common use  is to  run the PVM  application
        compiled by  PVMmake.     The  commands  are  automatically  saved  in
        the.paderc  file in  the user's  home  directory and  will appear  in
        subsequent PADE sessions.   For the  Modify, Delete, and  Run entries,
        theapplication  or  command  is  selected  from a  submenu  of  known
        commands.
         The menu entries are:
        
          oAdd...   --  adds a  new command  to the list  of known  commands.
           It brings  up a PADE  Entry window for  specifying the command  or
           executable file.
        
          oModify -- change the name of a command.
        
          oDelete -- remove a command from the list of known commands.
        
          oRun (in xterm) -- runs a command.
        
        
        5.12The Help Menu
        
        TheHelp menu (Figure 5.10) contains several sources  of assistance to
        theuser.   These  come from  World Wide  Web pages, man  pages and  a
        system dependent help command.  The entries in this menu are:
        
        
        
                                         31
        oWWW --  selection of a  submenu entry will  spawn the WWW  browser
         specified  by the  user preference  (Section 5.4)  and connect  to
         the selected  WWW page.   The number and  type of entries  in this
         submenu will change over time except for the first two:
        
        
          -- PADE  Home Page --  provides a link to  the PADE home  page at
             NIST.
        
          -- PADE  Manual (local) --  provides a link  to the local  online
             PADE manual.
        
        
        oMan  Pages --  selection of  a submenu  entry  opens a  scrollable
         window with the selected man page.  Currently supports:
        
        
        
          -- pvm_intro -- general  introduction to PVM and  PVM environment
             variables
        
          -- pvm (console) -- description of the PVM console program.
        
          -- pvm3 (daemon) -- description of the PVM daemon program.
        
        
        oxman -- runs the X Window System interface to man pages.
        
        osystem  dependent help  command  -- this  menu  entry varies  from
         system to  system, and is  some form of  help command.   Currently
         supported help commands are:
        
        
          -- IRIS InSight on IRIX
        
          -- InfoExplorer on AIX
        
          -- Helpview on HP-UX
        
          -- AnswerBook on SunOS
        
        
         Consult  your  local  system  documentation   for  information  on
         running the above help commands.
        
        oOn PADE --  prints a brief summary  of the PADE operations  in the
         bottom of the PADE main window.
        
        oUsage License -- prints the PADE usage license.
        
        
        
        
        
        
        
                                       32
