MVAPICH

MVAPICH can be integrated with LSF.

  1. Choose from two options:
    1. Change the MVAPICH source code (if you only want to run MVAPICH with LSF).

      Modify the MVAPICH source code: RSH_CMD = 'blaunch' and build the package.

    2. Write a wrapper script.

      Wrap /usr/bin/rsh on the first execution host or all candidate execution hosts for blaunch as follows:

      Example wrapper script:
      cat /usr/bin/rsh
      #!/bin/sh
      #
      # wrapper /usr/bin/rsh
      # blaunch is used when applicable
      #
      if [ -z "$LSF_BINDIR" \
           -o -z "$LSB_JOBID" \
           -o -z "$LSB_JOBINDEX" \
           -o -z "$LSB_JOBRES_CALLBACK" \
           -o -z "$LSB_DJOB_HOSTFILE" ]; then
          RSH="/usr/bin/rsh.bin"
      else
          RSH=$LSF_BINDIR/blaunch
      fi
      $RSH $*
    3. If you wrote a wrapper script, specify host file with a script.
      Example:
      cat run.mvapich
      #! /bin/sh
      #BSUB -n 2
      #BSUB -o %J.out
      #BSUB -e %J.err
      #BSUB -R 'span[ptile=1]'
      mpirun_rsh -rsh -np $LSB_DJOB_NUMPROC -hostfile $LSB_DJOB_HOSTFILE mympi

  2. Run bsub.

    For example, bsub < run.mvapich.