Enable and Use the external scheduler plugin

Use sch.mod.matchexample.c as an example.

  1. Copy schmod_matchexample.so to LSF_LIBDIR (defined in lsf.conf).
  2. Configure the plugin in lsb.modules; add following line after all LSF modules:
    schmod_matchexample     ()           ()
  3. badmin mbdrestart
  4. Use bsub to submit a job.

    If external message is needed, use the option ‑extsched.

    For example:

    bsub -n 2 -extsched "EXAMPLE_MATCH_OPTIONS=goedel" -R "type==any" sleep 1000

    In order to use -extsched, you must set LSF_ENABLE_EXTSCHEDULER=y in lsf.conf.

  5. Use bjobs to look at external message, and customized pending reason.
    --------------------------------------------------------------------------
    ./bjobs -lp
    Job <224>, User <yhu>, Project <default>, Status <PEND>, Queue <short>, Job Pri
                         ority <500>, Command <sleep 1000>
    Thu Nov 29 15:08:05: Submitted from host <goedel> with hold, CWD <$HOME/LSF4_1/
                         utopia/lsbatch/cmd>, Requested Resources <type==any>;
     PENDING REASONS:
     Load information unavailable: pauli, varley, peano, bongo;
     Closed by LSF administrator: curie, togni;
     Customized pending reason number 20002: goedel;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     SCHEDULING PARAMETERS:
               r15s   r1m  r15m   ut      pg    io   ls    it    tmp    swp    mem
     loadSched   -     -     -     -       -     -    -     -     -      -      -  
     loadStop    -     -     -     -       -     -    -     -     -      -      -  
              total_jobs mbd_size 
     loadSched        -        -  
     loadStop         -        -  
     EXTERNAL MESSAGES:
     MSG_ID FROM       POST_TIME      MESSAGE                             ATTACHMENT 
     0          -             -                        -                      -     
     1      yhu        Nov 29 15:08   EXAMPLE_MATCH_OPTIONS=goedel            N     
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ---------------------------------------------------------------------------