go.sh scripts of several benchmarks modified to pick up $CC, $CFLAGS, $CXXFLAGS,...
[phoronix-static.git] / mrbayes / go.sh
blob91a6fc0351518f91f3bca06badc0900056a5fd80
1 #!/bin/bash -x
3 # Copyright (C) 2011 Sebastian Pop <sebpop@gmail.com>.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. A copy of this license
13 # can be downloaded from http://www.gnu.org/copyleft/gpl.html
15 p=`pwd`
16 rm -rf usr mpich2-1.0.8p1 mrbayes-3.1.2
17 mkdir -p usr
18 tar -zxf mpich2-1.0.8p1.tar.gz
19 tar -zxf mrbayes-3.1.2.tar.gz
20 cd $p/mpich2-1.0.8p1/
21 ./configure --prefix=$p/usr --enable-fast=all --with-pm=gforker --disable-option-checking
22 if ! make -j $procs; then
23 make
25 make install
26 cd $p/mrbayes-3.1.2/
27 sed -i -e "s/MPI ?= no/MPI ?= yes/g" Makefile
28 sed -i -e "s/USEREADLINE ?= yes/USEREADLINE ?= no/g" Makefile
29 sed -i -e "s/define WIN_VERSION/define UNIX_VERSION/g" mb.h
30 make -j $procs PATH=$p/usr/bin/:$PATH CFLAGS="$CFLAGS" ARCHITECTURE=unix
31 cat>job.nex<<EOT
32 begin mrbayes;
33 set autoclose=yes nowarn=yes;
34 execute primates.nex;
35 lset nst=6 rates=invgamma;
36 mcmc ngen=30000 samplefreq=10;
37 sump burnin=250;
38 sumt burnin=250;
39 end;
40 EOT
41 before=`date +%s.%N`
42 $p/usr/bin/mpiexec -np $procs ./mb job.nex 1>/dev/null 2>&1
43 after=`date +%s.%N`
44 echo "mrbayes run time: `echo "$after - $before" | bc`" > $p/log
45 cd $p; rm -rf usr mpich2-1.0.8p1 mrbayes-3.1.2