#!/bin/bash #BSUB -q mpi # Queue name for MPI jobs. Ask sys admin. #BSUB -n 96 # Request 96 cores. #BSUB -R 'span[ptile=16]' # Request 16 cores per machine, ie, 6 (=96/16) machines. #BSUB -o logfile # stdout. Any file name is ok. #BSUB -e errfile # stderr. Any file name is ok. #BSUB -J mafft-mpi # Any job name is ok. # Configure MPI as necessary. #. /foo/bar/mpivars.sh # Configuration for the pairwise alignment stage: export MAFFT_N_THREADS_PER_PROCESS=8 export MAFFT_MPIRUN="mpirun -n 12 -npernode 2 -bind-to none" # for OpenMPI #export MAFFT_MPIRUN="mpirun -n 12 -perhost 2 -binding none" # for MPICH? # 8 threads x 2 processes = 16 threads run on each of 6 machines. # 16 threads x 6 machines = total 96 threads run. # Configuration for progressive alignment stage: /somewhere/bin/mafft --mpi --large --globalpair --threadtb 16 input > output # 16 threads run on one of the machines assigned by scheduler. # --globalpair can be replaced by --genafpair, --localpair, --oldgenafpair