Enabling Dynamic Cluster hosts to run any LSF job

Enable Dynamic Cluster hosts to run any non-Dynamic Cluster jobs.

About this task

By default, Dynamic Cluster hosts only run Dynamic Cluster jobs. To enable Dynamic Cluster hosts to run any non-Dynamic Cluster jobs (that is, to run jobs that do not specify any Dynamic Cluster templates), set up a default external submission (esub) script that modifies all non-Dynamic Cluster to run on either physical or virtual Dynamic Cluster hosts.

Procedure

  1. Create an external submission (esub) script file named esub.myesub in the directory specified by the LSF_SERVERDIR paramater in lsf.conf.

    Create the script file based on whether you want non-Dynamic Cluster jobs to run on physical or virtual machines.

    • To modify all non-Dynamic Cluster jobs to run on physical Dynamic Cluster hosts:
      #!/bin/sh
      #
      if [ -z "$LSB_SUB_PARM_FILE" ]; then
          # if not set do nothing
          exit 0
      fi
      
      exec 1>&2
      . $LSB_SUB_PARM_FILE
      
      if [ -z "$LSB_SUB4_DC_TEMPLATE" ]; then
          if [ "$LSB_SUB_QUEUE" == "priority" ]; then
              echo "LSB_SUB4_DC_TEMPLATE=\"VM_T1\"" >> $LSB_SUB_MODIFY_FILE
          else
              echo "LSB_SUB4_DC_TEMPLATE=\"any\"" >> $LSB_SUB_MODIFY_FILE
          fi
      fi
      
      if [ -z "$LSB_SUB4_DC_MTYPE_VM" ] && [ -z "$LSB_SUB4_DC_MTYPE_PM" ]; then
          echo "LSB_SUB4_DC_MTYPE_ANY=Y" >> $LSB_SUB_MODIFY_FILE
      fi
    • To modify all non-Dynamic Cluster jobs to run on virtual Dynamic Cluster hosts:
      if [ -z "$LSB_SUB4_DC_TEMPLATE" ]; then
          # Select dc template based on queue
          if [ "$LSB_SUB_QUEUE" == "QUEUE_1" ]; then
              echo "LSB_SUB4_DC_TEMPLATE=\"vm1\"" >> $LSB_SUB_MODIFY_FILE
          else
              echo "LSB_SUB4_DC_TEMPLATE=\"any\"" >> $LSB_SUB_MODIFY_FILE
          fi
      fi
      
      #Check if -dc_vmaction save is specified, if not, then select action based on queue
      if [ -z "$LSB_SUB4_DC_PREEMPTACTION_VM" ]; then
          #Select dc_vmaction based on queue
          echo "LSB_SUB4_DC_PREEMPTACTION_VM=\"savevm\"" >> $LSB_SUB_MODIFY_FILE
      fi
      
      #Check if -dc_mtype vm is specified, if not, then let job running on DC VM host
      if [ -z "$LSB_SUB4_DC_MTYPE_PM" ] && [ -z "$LSB_SUB4_DC_MTYPE_ANY" ]; then
          echo "LSB_SUB4_DC_MTYPE_VM=Y" >> $LSB_SUB_MODIFY_FILE
      fi
  2. Configure LSF to specify a mandatory esub method to apply to all job submissions.

    Edit lsf.conf and specify the LSB_ESUB_METHOD parameter:

    LSB_ESUB_METHOD="myesub"

  3. Restart mbatchd for your changes to take effect.

    badmin mbdrestart