Using and Administering

Examples

A sample program called para_api.c is provided in the samples/llpara subdirectory of the release directory, usually /usr/lpp/LoadL/full.

In order to run this example, you need to do the following:

  1. Copy the sample Makefile and the sample program called para_api.c to your home directory.
  2. Update the startCmd variable in para_api.c to reflect your home directory versus /usr/lpp/LoadL/full/samples/llpara. For example:
    char *startCmd = "/home/user/para_api -s";
    
  3. Issue make to create the executable para_api.
  4. Update your job command file as follows:



    #!/bin/ksh
    # @ initialdir     = /home/user
    # @ executable     = para_api
    # @ output         = para_api.$(cluster).$(process).out
    # @ error          = para_api.$(cluster).$(process).err
    # @ job_type       = parallel
    # @ min_processors = 2
    # @ max_processors = 2
    # @ queue
    

  5. Submit the job command file to LoadLeveler.

    The syntax to invoke the Parallel Master is:

      para_api
    

    The syntax to invoke the Parallel Slave is:

      para_api -s
    

    The Parallel Master does the following:

    Example output follows:
    num_nodes=2
     
    name=host1.kgn.ibm.com address=9.115.8.162 switch_number=-1
     
    name=host2.kgn.ibm.com address=9.115.8.164 switch_number=-1
     
    Connected to host1.kgn.ibm.com at sock 3
    Received acko "8000" and acke "10000" from host 0
     
    Connected to host2.kgn.ibm.com at sock 4
    Received acko "8001" and acke "10001" from host 1
     
    <Master Exiting>
    

    The Parallel Slave does the following:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]