1 | | = Installation = |
| 1 | = MUSCLE 2 Installation = |
| 2 | |
| 3 | The recent bundle of MUSCLE can be downloaded from the [[http://apps.man.poznan.pl/trac/muscle/downloads|Downloads section]]. The bundled package contains the source code, documentation and precompiled Java archives (jar). We maintain a [[Clusters|list of clusters]] where MUSCLE is already deployed. |
| 4 | |
| 5 | The offered version of MUSCLE 2 in extends and improves the [[http://muscle.berlios.de/|package]] provided by Jan Hegewald. We can list here the following elements: |
| 6 | * improved installation procedure (some dependencies are already included in the bundle), |
| 7 | * added support for generation of OTF trace logs, |
| 8 | * updated API |
| 9 | * implemented Port Range traversing technique for cross-cluster execution. |
| 10 | |
| 11 | == Dependencies == |
| 12 | |
| 13 | The core functionality of the MUSCLE is written in Java. To be able to integrate native code with the MUSCLE, there is also a native part which is written in C++. Bootstrapping and platform independent configuration is done with a flexible setup mechanism written in Ruby. |
| 14 | |
| 15 | In order to use the MUSCLE, you need a recent Java runtime, either [[http://www.java.com/en/download/index.jsp|Oracle-Java] or [[http://openjdk.java.net/|Open-JDK]]. Java third-party dependencies are already provided in the bundle and do not need to be independently installed. |
| 16 | |
| 17 | For the command-line interface [[http://www.ruby-lang.org/|Ruby]] is needed. |
| 18 | |
| 19 | To compile and install MUSCLE, use the [[http://www.cmake.org/|CMake]] package. For the MUSCLE Transport Overlay, to communicate between different clusters,[[http://www.boost.org/|Boost]] is needed. |
| 20 | |
| 21 | === Installation of dependencies on a Debian flavored Linux === |
| 22 | |
| 23 | Run |
| 24 | {{{ |
| 25 | sudo apt-get install build-essentials cmake ruby libboost-dev |
| 26 | }}} |
| 27 | |
| 28 | to install all dependencies at once. |
| 29 | |
| 30 | === Installation of dependencies on Scientific Linux 5.6 === |
| 31 | |
| 32 | '''Note:''' Some part of the presented installation procedure requires to be invoked by root. |
| 33 | |
| 34 | {{{ |
| 35 | yum install ruby gcc-c++ cmake jdk curl |
| 36 | }}} |
| 37 | |
| 38 | '''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: |
| 39 | {{{ |
| 40 | [epel] |
| 41 | name=Extra Packages for Enterprise Linux 5 - $basearch |
| 42 | |
| 43 | #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch |
| 44 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch |
| 45 | failovermethod=priority |
| 46 | enabled=1 |
| 47 | gpgcheck=0 |
| 48 | }}} |
| 49 | |
| 50 | === Installation of dependencies on Mac OS X === |
| 51 | |
| 52 | Most dependencies are installed when installing Xcode. In [[http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12|Xcode 4.4]], the command-line tools are installed by opening Preferences -> Downloads and pressing Install at the item "Command-line tools". For Boost and CMake, download the packages on their website or use an installation manager like [[http://mxcl.github.com/homebrew/|HomeBrew]] or [[http://www.macports.org/|MacPorts]]. |
| 53 | |
| 54 | === Remainder of the installation === |
| 55 | |
| 56 | If your ruby version is 1.8.x: |
| 57 | {{{ |
| 58 | ruby --version |
| 59 | }}} |
| 60 | then it is necessary to install json with the following command |
| 61 | {{{ |
| 62 | sudo gem install json |
| 63 | }}} |
| 64 | |
| 65 | When the dependencies are in place, you are ready to build and install MUSCLE. Download the muscle bundle from [[http://apps.man.poznan.pl/trac/muscle/downloads|Downloads section]], e.g. |
| 66 | {{{ |
| 67 | curl -#O http://apps.man.poznan.pl/trac/muscle/downloads/muscle-2.0-RC1.zip |
| 68 | }}} |
| 69 | |
| 70 | Extract the download, e.g. |
| 71 | {{{ |
| 72 | $ unzip muscle-2.0-RC1.zip |
| 73 | }}} |
| 74 | Change your working directory to the the MUSCLE directory: |
| 75 | {{{ |
| 76 | $ cd muscle-2.0-RC1/build |
| 77 | }}} |
| 78 | }}} |
| 79 | Invoke MUSCLE build script with installation (we are installing muscle to the /opt/muscle directory which is default, type ./build.rb for more options): |
| 80 | {{{ |
| 81 | ./build.sh |
| 82 | }}} |
| 83 | See if MUSCLE is working correctly: |
| 84 | {{{ |
| 85 | source /opt/muscle/etc/muscle.profile |
| 86 | muscle2 --version |
| 87 | }}} |
| 88 | |
| 89 | == Sample execution == |
| 90 | There are some examples provided within the MUSCLE bundle. Example code for kernels can be found in the directories src/java/examples and src/cpp/examples. There are also prepared configurations for coupled examples CxA (MUSCLE simulations), which can be found in the src/cxa directory. |
| 91 | |
| 92 | === Hello World === |
| 93 | |
| 94 | ==== Sender ==== |
| 95 | At src/java/examples/simplejava/Sender we provide a minimalist kernel written in Java, which sends data (an array of double). |
| 96 | |
| 97 | ==== Receiver ==== |
| 98 | At src/java/examples/simplejava/ConsoleWriter we provide a simple kernel written in Java. It receives data (an array of double) and prints its content to the standard output. |
| 99 | |
| 100 | ==== CxA (coupling schema) ==== |
| 101 | The configuration src/cxa/SimpleExample.cxa.rb configures a minimal CxA which couples the src/java/examples/simplejava/Sender and src/java/examples/simplejava/ConsoleWriter kernels. |
| 102 | |
| 103 | ==== Execution ==== |
| 104 | To run the simulation defined in src/cxa/SimpleExample.cxa.rb use the following command: |
| 105 | {{{ |
| 106 | #!div style="font-size: 90%" |
| 107 | {{{#!sh |
| 108 | /opt/muscle/bin/muscle --cxa_file src/cxa/SimpleExample.cxa.rb --main plumber w r --autoquit |
| 109 | }}} |
| 110 | }}} |
| 111 | |
| 112 | == Further reading == |
| 113 | For more information how to use MUSCLE see doc/muscle_developers_guide.pdf included in the MUSCLE bundle. |
| 114 | |
| 115 | = MUSCLE Installation = |