-
Notifications
You must be signed in to change notification settings - Fork 6
Installation
We maintain a list of clusters where MUSCLE is already deployed.
In order to install MUSCLE from source, you need
CMake is not needed for executing MUSCLE, only for installation.
Run
sudo apt-get install build-essential cmake ruby default-jdk
to install the minimal set of dependencies.
To resolve all features, also run
sudo apt-get install unzip subversion python-dev gfortran openmpi-bin libopenmpi-dev cmake-curses-gui
Most dependencies are installed when installing Xcode. The command-line tools are installed by typing xcode-select --install
in the command-line. Install the Java Development Kit (JDK) from Oracle. Install CMake with HomeBrew:
brew install cmake
To install all dependencies in a single command, run
sudo yum install ruby gcc-c++ cmake jdk curl
Note: you may need to add the reference to the repository with extra packages. To do this create the file 'epel.repo' in the /etc/yum.repos.d directory. The content of the file may look as follows:
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
When the dependencies are in place, you are ready to build and install MUSCLE. Download the muscle bundle from releases, or from the command-line. Then unzip the folder, go to the build directory inside and run the build.sh
command.
curl -# https://github.com/psnc-apps/muscle2/archive/2.1.zip -o muscle2-latest.zip
unzip muscle2-2.1.zip
cd muscle2-2.1/build
sudo ./build.sh
This installs MUSCLE in /opt/muscle. For another location, add this as the first argument to build.sh
. If the configuration or the libraries of the host have changed since you last built MUSCLE, run
rm CMakeCache.txt
before running the build script to forget all CMake settings.
The command
source /opt/muscle/etc/muscle.profile
should always be run before executing MUSCLE. It can help to put this command in ~/.bashrc
so that it runs at login.
Finally, see if MUSCLE is working correctly:
muscle2 --version
Although the build.sh
script is sufficient in most cases, sometimes it can not
detect where certain libraries are located, especially the libraries of the MPI example.
The build settings can be modified by setting the following environment variables:
Variable | Setting | Example |
---|---|---|
MPI_C_COMPILER |
Compiler used for the C MPI example | /usr/bin/mpicc |
MPI_C_FLAGS |
Flags to give the C MPI compiler | -O3 -Wall |
MPI_C_INCLUDE_PATH |
Location of include files for C MPI | /usr/include |
MPI_C_LIBRARIES |
All libraries needed to link with for C MPI (semicolon separated) | /usr/lib/libmpi.so;/usr/lib/libm.so |
Possible build options can be evaluated by going to the build directory and running:
cmake -L ..
Even more detailed build options are found with:
cmake -LA ..
These options can be passed to cmake by setting the environment variable MUSCLE_CMAKE_OPTIONS
:
export MUSCLE_CMAKE_OPTIONS="-DOPTION=VALUE -DOPTION2=VALUE2"
For example, to build the python extension:
export MUSCLE_CMAKE_OPTIONS="-DBUILD_PYTHON=ON"
sudo ./build.sh
And if the Python libraries or headers cannot be found:
export MUSCLE_CMAKE_OPTIONS="-DBUILD_PYTHON=ON -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so"
sudo ./build.sh