start-meme.txt

来自「EM算法的改进」· 文本 代码 · 共 145 行

TXT
145
字号
#!/bin/sh## $Id: start-meme.txt 1339 2006-09-21 19:46:28Z tbailey $# $Log$# Revision 1.10  2005/10/07 05:33:55  nadya# keep uniform name MEME_LOGS throughout scripts.## Revision 1.9  2005/10/05 23:10:43  nadya# revert to previous version. For now the exit case is used for all the# unknown and untested mopicc and queing combinations.## Revision 1.8  2005/10/05 08:43:57  wilfred# commented out the exit for meme server start up process if mpicc isn't found.# configure should indicate whether serial or parallel will be installed.## Revision 1.7  2005/10/05 06:18:35  nadya# use full path for "rm". Asssume everybody has /bin/rm.## Revision 1.6  2005/10/02 05:48:07  nadya# use variable to call meme-client## Revision 1.5  2005/08/25 21:04:41  nadya# check for config file existance## Revision 1.4  2005/08/25 20:22:11  nadya# -add -V to get all the shell variables when using qsub## Revision 1.3  2005/08/24 00:32:55  nadya# use csh scripts for now when starting the servers## Revision 1.2  2005/08/12 17:51:03  nadya# use meme_config file to set variables## Revision 1.1.1.1  2005/07/28 23:56:39  nadya# Importing from meme-3.0.14, and adding configure/make## load localization variables configured during installif [ -f @MEMEDIR@/etc/meme_config ] ; then    . @MEMEDIR@/etc/meme_configelse    echo "@MEMEDIR@/etc/meme_config does not exist. Meme installation is incomplete"    exit 1fi########################################################            define functions######################################################## Set up the MEME commandfunc_set_mpi () {    if [ $nprocs == 1 ] ; then      mpiargs=""      return    fi    case "$mpi" in        mpich)            mpiargs="-p $nprocs -nolocal -machinefile $tmpdir/machines"            ;;        mpich_mpd)            mpiargs="-p $nprocs -1 -m $tmpdir/machines"            ;;        lam)            mpiargs="-p $nprocs"             ;;        *)            echo "Unknown type of MPI: $mpi"            exit 1    esac}# Set queueing commandfunc_set_queue () {    case "$qsystem" in        sge)            qsub="qsub -pe mpich $nprocs -l h_rt=$maxtime $queue -j y -o $jobout -S $shell -V %s"            ;;        pbs)            qsub="qsub -lncpus=$nprocs -l walltime=$maxtime $queue -j oe -o $jobout -S $shell %s"             ;;        shell)            qsub="$shell %s &"            ;;        *)            echo "Unknown queueing system"            exit 1    esac}# Set logfilefunc_log () {    log=$MEME_LOGS/meme.startup.log}# Print usage infofunc_usage () {    func_log    echo "Uses meme-client to check if server is running."    echo "If not, starts the meme-server and updates"    echo "file $log"}# Check if server is alive   func_ping() {    tmpfile=/tmp/start-meme.$$    echo "ping" > $tmpfile    $MEME_BIN/$MEME_CLIENT_EXEC $MEME_PORT $HOST $tmpfile 1    ALIVE=$?    if [ -f $tmpfile ] ; then       /bin/rm -f $tmpfile    fi}# If server is already running do nothing, otherwise# start the server, and update the server logfunc_start () {    if [ $ALIVE -eq 0 ] ; then        echo "Meme-server is already running"    else        func_log        func_set_mpi        func_set_queue        echo "Starting meme-server ..."        touch $log        echo "" >> $log        date >> $log        nohup $MEME_BIN/meme-server $MEME_PORT "$MEME_BIN/$MEME_SH $mpiargs" "$qsub" >> $log 2>&1 &        echo "Meme-server started"      fi}########################################################            main#######################################################if [ $# -gt 1 ] ; then    func_usage 1>&2    exit 1else    func_ping    func_startfi

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?