[med-svn] [phyml] 03/03: Enable to switch of MPI version via environment variable since there are circumstances when it leads to wrong results
Andreas Tille
tille at debian.org
Tue Jan 31 13:38:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository phyml.
commit 81d88d0953aa05f4301426eb6a72e21a7dd2ef04
Author: Andreas Tille <tille at debian.org>
Date: Tue Jan 31 11:08:15 2017 +0100
Enable to switch of MPI version via environment variable since there are circumstances when it leads to wrong results
---
debian/README.Debian | 16 +++++++++++++++-
debian/changelog | 3 +++
debian/wrapper/phyml | 10 +++++++++-
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 504e62e..e99effd 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,7 +1,21 @@
phyml for Debian
----------------
-You can use the parallelised version as /usr/bin/phyml-mpi.
+The wrapper /usr/bin/phyml is detecting whether the machine is able
+to use MPI and if so it uses the parallelised version which is installed
+to /usr/lib/phyml/bin/phyml-mpi.
+
+In case you might experience problems with the MPI version you can
+switch this of by using the PHYMLCPUS variable. If it is set to an
+integer number > 1 this number of processors will be used. If it is set
+to something else (either 1 or any other string) the single processor
+version is used. Example:
+
+ If you set
+
+ export PHYMLCPUS=16
+
+ set in your environment 16 processors are used for phyml.
Regarding the packaged version upstream provided the following information
diff --git a/debian/changelog b/debian/changelog
index da4abaf..933f0f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ phyml (3:3.2.0+dfsg-6) UNRELEASED; urgency=medium
on machines without according graphics hardware
Closes:
* Provide link /usr/bin/phyml-beagle
+ * Enable to switch of MPI version via environment variable since there
+ are circumstances when it leads to wrong results
+ Closes:
-- Andreas Tille <tille at debian.org> Tue, 31 Jan 2017 11:00:10 +0100
diff --git a/debian/wrapper/phyml b/debian/wrapper/phyml
index d002a74..e5fd955 100755
--- a/debian/wrapper/phyml
+++ b/debian/wrapper/phyml
@@ -4,10 +4,18 @@
NPROCESSOR=`grep -c 'processor[[:space:]:]\+[0-9]\+' /proc/cpuinfo`
NCPUS=`grep '^cpu cores' /proc/cpuinfo | head -n 1 | sed 's/cpu cores[[:space:]:]\+//'`
+if [ $PHYMLCPUS -eq $PHYMLCPUS 2> /dev/null ] ; then
+ if [ "$PHYMLCPUS" -gt 1 ] ; then
+ NCPUS=$PHYMLCPUS
+ else
+ NCPUS=1
+ fi
+fi
+
#echo NPROCESSOR=$NPROCESSOR
#echo NCPUS=$NCPUS
-if [ $NCPUS -gt 1 ] ; then
+if [ $NCPUS -gt 1 -a "$PHYMLMPI" != "no" ] ; then
EXE="mpirun -n $NCPUS /usr/lib/phyml/bin/phyml-mpi"
else
EXE=/usr/lib/phyml/bin/phyml
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/phyml.git
More information about the debian-med-commit
mailing list