Test the job forwarding model

The following instructions explain how to configure the job forwarding model on two clusters. Cluster2 will be the execution cluster; it will run jobs for cluster1.

  1. In the submission cluster, edit the LSF_TOP/conf/lsbatch/cluster_name/configdir/lsb.queues file and add a queue to send jobs to the execution cluster.

    For example, configure a queue called sendq in cluster1 that will send all jobs to execute in cluster2:

    Begin Queue
    QUEUE_NAME  = sendq
    SNDJOBS_TO  = receiveq@cluster2
    HOSTS       = none
    DESCRIPTION = Jobs submitted to this queue will be run in cluster2
    End Queue

    HOSTS = none specifies that this queue cannot place jobs on any local hosts.

  2. Reconfigure the cluster:
    % badmin reconfig
  3. In the execution cluster, edit the LSF_TOP/conf/lsbatch/cluster_name/configdir/lsb.queues file and add a queue to receive jobs sent from the submission cluster.

    For example, configure a queue called receiveq in cluster2 that will receive jobs from cluster1:

    Begin Queue
    QUEUE_NAME   = receiveq
    PRIORITY     = 40
    RCVJOBS_FROM = cluster1
    End Queue
  4. Reconfigure the cluster:
    % badmin reconfig
  5. Use the bclusters command to make sure the queues are configured correctly.

    For example, in cluster1:

    % bclusters
    LOCAL_QUEUE  JOB_FLOW  REMOTE  CLUSTER  STATUS
    sendq       send      receiveq  cluster2 ok

    For example, in cluster2:

    % bclusters
    LOCAL_QUEUE  JOB_FLOW  REMOTE  CLUSTER  STATUS
    receiveq       recv      -          cluster1 ok
  6. Submit a job to make sure the queues are configured correctly.

Example

Submit a job to cluster1 that will run in cluster2:

% bsub -q sendq -R “type==any” sleep 500
Job <103> is submitted to queue <sendq>.
% bjobs
JOBID  USER  STAT  QUEUE   FROM_HOST       EXEC_HOST       JOB_NAME   SUBMIT_TIME
103    user1 RUN   sendq  hostA           hostE@cluster2  sleep 500  Nov 13 11:44

You can also view this job from cluster2, where it has a new job ID:

JOBID USER  STAT QUEUE         FROM_HOST       EXEC_HOST  JOB_NAME   SUBMIT_TIME
899   user1 RUN  receiveq      hostA@cluster1  hostE      sleep 500  Nov 13 11:44