Mike Hawkins
and 1 contributors

Submit API

IBM::Loadleveler Submit API


  use IBM::Loadleveler

  # Submit API function



On successful submission this function returns a `perlised' version of the LL_job structure. See the llsubmit example and the LoadLeveler API header file llapi.h for full information on how to use it. Currently the following LL_job_step structure members are not returned:


llfree_job_info is not implemented because it is done by in the llsubmit call after the data has been transfered to Perl.

A minimal example of using the Submit API is:

        use IBM::LoadLeveler;

        my ($job_name,$owner,$group,$uid,$gid,$host,$steps,$job_step)=llsubmit("/home/mike/test_job/test_job.cmd",NULL,NULL);

        print "Job Name   = $job_name\n";
        print "Owner      = $owner\n";
        print "Group      = $group\n";
        print "UID        = $uid\n";
        print "GID        = $gid\n";
        print "HOST       = $host\n";
        print "STEPS      = $steps\n";
        print "JOB_STEP   = $job_step\n";
        print "JOB_STEP   = $#{$job_step}\n";
        foreach $stepref  (@steps)
                print "STEP_NAME      = $step{'step_name'}\n";
                print "REQUIREMENTS   = $step{'requirements'}\n";
                %usage_info = %{$step{'usage_info'}};
                print "USAGE INFO     = --------------------\n";
                print " STARTER_RUSAGE = $usage_info{'starter_rusage'}\n";
                print "         RU_UTIME  = $rusage{'ru_utime'}\n";
                print "         RU_MAXRSS = $rusage{'ru_maxrss'}\n";
                print " STEP_RUSAGE    = $usage_info{'step_rusage'}\n";
                print " MACH_USAGE ITEMS = $#{$usage_info{'mach_usage'}}\n";


  • $job_cmd_file

    A string containing the name of the Job Command File

  • $monitor_program

    Is a pointer to a string containing the name of the monitor program to be invoked when the state of the job is changed. Set to NULL if a monitoring program is not provided.

    An example of a basic monitor program is:

            open(MAILOUT,"|mail -s '$jobstep Changed State' guest");
            print MAILOUT "\n";
            print MAILOUT "@ARGV\n";
            print MAILOUT "\n";

    This will get called when the job changes to one of the following states:


      The job step has started.


      The job step has completed.


      The job step has been vacated. The job step will be rescheduled if the job step is restartable or if it is checkpointable.


      A startd daemon has rejected the job. The job will be rescheduled to another machine if possible.


      The job step was canceled or could not be started.


      The job step cannot be run because a dependency cannot be met.

  • $monitor_args

    Is a pointer to a string which is stored in the job object and is passed to the monitor program. The maximum length of the string is 1023 bytes. If the length exceeds this value, it is truncated to 1023 bytes. Set to NULL if an argument is not provided.


  • $job_name

  • $owner

  • $groupname

  • $uid

  • $gid

  • $submit_host

  • $numsteps

  • $ref

    $ref is a reference to an array of job step information, each job step is a hash, the key is the name of the element in the LL_job_step structure, eg:

            @steps = @{$ref};
            foreach $stepref ( @steps )
                    print "STEP_NAME      = $step{'step_name'}\n";
                    print "REQUIREMENTS   = $step{'requirements'}\n";
                    print "PREFERENCES    = $step{'preferences'}\n";


LoadLeveler DataAccess perl.

IBM LoadLeveler for AIX 5L: Using and Administering