#!/bin/bash #BSUB -q mpi # Queue name for MPI jobs. Ask sys admin. #BSUB -n 160 # Request 160 cores. #BSUB -R 'span[ptile=16]' # Request 16 cores per machine, ie, 10 (=160/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=1 export MAFFT_MPIRUN="mpirun -n 160 -npernode 16 -bind-to none" # for OpenMPI #export MAFFT_MPIRUN="mpirun -n 160 -perhost 16 -binding none" # for MPICH? # 1 thread x 16 processes = 16 threads run on each of 10 machines. # 16 threads x 10 machines = total 160 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