[med-svn] [examl] 02/02: Wrapper differentiates between examl and examl-OMP
Andreas Tille
tille at debian.org
Fri Feb 17 13:37:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository examl.
commit 79c6c58baac0323eacabd9efb7ca273b27077f14
Author: Andreas Tille <tille at debian.org>
Date: Fri Feb 17 14:37:21 2017 +0100
Wrapper differentiates between examl and examl-OMP
---
debian/bin/examl | 37 +++++++++++++++++++++++--------------
debian/control | 3 ++-
debian/examl.1 | 6 +++++-
debian/links | 2 +-
debian/tests/run-unit-test | 4 +++-
5 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/debian/bin/examl b/debian/bin/examl
index ce6b820..947d219 100755
--- a/debian/bin/examl
+++ b/debian/bin/examl
@@ -1,22 +1,31 @@
#!/bin/sh
EXAMLDIR=/usr/lib/examl/bin
+if echo $0 | grep -qi omp ; then
+ EXE=examl-OMP
+else
+ EXE=examl
+fi
+
NPROC=`nproc`
+if echo "$@" | grep -q -- -np ; then
+ NP=`echo "$@" | sed 's/^.* *-np *\([0-9]\+\) *.*/\1/'`
+ echo "Run MPI on $NP processors as requested"
+ CMDARGS=`echo "$@" | sed 's/\(^.* \)-np *[0-9]\+\( .*\)/\1\2/'`
+else
+ NP=$((NPROC/2)) # leave 50% processors for other jobs - if you want to force more just use -np option
+ if [ $NP -eq 1 ] ; then
+ NP=$NPROC
+ fi
+ echo "Run MPI on $NP of $NPROC available processors"
+ CMDARGS="$@"
+fi
+
if grep -q avx /proc/cpuinfo; then
- if [ $NPROC -gt 1 ] ; then
- echo "Use examl with OMP and AVX support"
- ${EXAMLDIR}/examl-OMP-AVX "$@"
- else
- echo "Use examl with AVX support without OMP"
- ${EXAMLDIR}/examl-AVX "$@"
- fi
+ echo "Use $EXE with AVX support and $NP processors"
+ mpirun -np $NP ${EXAMLDIR}/${EXE}-AVX "CMDARGS"
else
- if [ $NPROC -gt 1 ] ; then
- echo "Use examl with AVX support with overriden number of threads"
- ${EXAMLDIR}/examl-OMP "$@"
- else
- echo "Use plain examl without AVX and OMP"
- ${EXAMLDIR}/examl "$@"
- fi
+ echo "Use $EXE without AVX support and $NP processors"
+ mpirun -np $NP ${EXAMLDIR}/${EXE} "CMDARGS"
fi
diff --git a/debian/control b/debian/control
index aba9955..37b5003 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,8 @@ Homepage: https://github.com/stamatak/ExaML
Package: examl
Architecture: any
Depends: ${shlibs:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ openmpi-bin
Description: Exascale Maximum Likelihood (ExaML) code for phylogenetic inference
Exascale Maximum Likelihood (ExaML) is a code for phylogenetic inference
using MPI. This code implements the popular RAxML search algorithm for
diff --git a/debian/examl.1 b/debian/examl.1
index e6b33da..c4c212d 100644
--- a/debian/examl.1
+++ b/debian/examl.1
@@ -1,4 +1,3 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
.TH EXAML "1" "February 2017" "examl 3.0.18" "User Commands"
.SH NAME
examl \- Exascale Maximum Likelihood (ExaML) code for phylogenetic inference
@@ -11,6 +10,7 @@ examl-OMP-AVX \- Exascale Maximum Likelihood (ExaML) code for phylogenetic infer
\fB\-n\fR outputFileNames
\fB\-m\fR rateHeterogeneityModel
\fB\-t\fR userStartingTree|\-R binaryCheckpointFile|\-g constraintTree \fB\-p\fR randomNumberSeed
+[\-np NP]
[\-a]
[\-B numberOfMLtreesToSave]
[\-c numberOfCategories]
@@ -29,6 +29,10 @@ examl-OMP-AVX \- Exascale Maximum Likelihood (ExaML) code for phylogenetic infer
[\-\-auto\-prot=ml|bic|aic|aicc]
.SH OPTIONS
.TP
+\fB\-np NP\fR
+NP is the number of processors to use for MPI. If not specified some hopefully sensible
+guess is made. \fBThis is a specific option of the Debian wrapper in /usr/bin.\fR
+.TP
\fB\-a\fR
use the median for the discrete approximation of the GAMMA model of rate heterogeneity
.IP
diff --git a/debian/links b/debian/links
index 479a682..545a0b4 100644
--- a/debian/links
+++ b/debian/links
@@ -1,5 +1,5 @@
usr/lib/examl/bin/examl-AVX usr/bin/examl-AVX
-usr/lib/examl/bin/examl-OMP usr/bin/examl-OMP
+usr/bin/examl usr/bin/examl-OMP
usr/lib/examl/bin/examl-OMP-AVX usr/bin/examl-OMP-AVX
usr/share/man/man1/examl.1.gz usr/share/man/man1/examl-AVX.1.gz
usr/share/man/man1/examl.1.gz usr/share/man/man1/examl-OMP.1.gz
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
index c1438f5..194a3f4 100644
--- a/debian/tests/run-unit-test
+++ b/debian/tests/run-unit-test
@@ -5,12 +5,14 @@ pkg="examl"
if [ "$ADTTMP" = "" ] ; then
ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+# trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
fi
cp -a /usr/share/doc/${pkg}/testData $ADTTMP
cd $ADTTMP
-gunzip -r *.gz
+gunzip -r *
parse-examl -s testData/49 -m DNA -n 49.unpartitioned
+parse-examl -s testData/49 -q testData/49.model -m DNA -n 49.partitioned
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/examl.git
More information about the debian-med-commit
mailing list