Changes between Initial Version and Version 1 of MUSCLE1 Installation

Show
Ignore:
Timestamp:
09/24/12 11:40:04 (12 years ago)
Author:
jorisborgdorff
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MUSCLE1 Installation

    v1 v1  
     1= MUSCLE v1 installation = 
     2 
     3The 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 
     5The offered version of MUSCLE in several places extends and improve 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* implemented Port Range traversing technique for cross-cluster execution. 
     9 
     10== Dependencies == 
     11 
     12The 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.  
     13 
     14In 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]]. Main Java third-party dependencies are already provided in the bundle and do not need to be independently installed.  
     15 
     16For the command-line interface [[http://www.ruby-lang.org/|Ruby]] is needed. 
     17 
     18To compile and install MUSCLE, the [[http://www.cmake.org/|CMake]] package. For the C++ library, [[http://www.boost.org/|Boost]] is needed. 
     19 
     20=== Installation of dependencies on a Debian flavored Linux === 
     21 
     22Run 
     23{{{ 
     24sudo apt-get install build-essentials cmake ruby ruby-dev libboost-dev libgemplugin-ruby 
     25}}} 
     26 
     27to install all dependencies at once. 
     28 
     29=== Installation of dependencies on Scientific Linux 5.6 === 
     30 
     31'''Note:''' Some part of the presented installation procedure requires to be invoked by root. 
     32 
     331. Check if a proper version of ruby is already installed in the system, otherwise install it: 
     34{{{ 
     35#!div style="font-size: 90%" 
     36{{{#!sh 
     37ruby --version 
     38-bash: ruby: command not found 
     39 
     40yum install ruby 
     41... 
     42ruby --version 
     43ruby 1.8.5 (2006-08-25) [x86_64-linux] 
     44}}} 
     45}}} 
     46 
     472. Ensure if you have a c++ compiler available on your system. If you have not, install this: 
     48{{{ 
     49#!div style="font-size: 90%" 
     50{{{#!sh 
     51yum install gcc-c++ 
     52}}} 
     53}}} 
     54 
     553. Check if cmake is available, otherwise install cmake: 
     56{{{ 
     57#!div style="font-size: 90%" 
     58{{{#!sh 
     59yum install cmake 
     60}}} 
     61}}} 
     62 '''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: 
     63 {{{ 
     64 #!div style="font-size: 90%" 
     65 {{{#!sh 
     66 [epel] 
     67 name=Extra Packages for Enterprise Linux 5 - $basearch  
     68  
     69 #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch 
     70 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch 
     71 failovermethod=priority 
     72 enabled=1 
     73 gpgcheck=0 
     74 }}} 
     75 }}} 
     76 
     774. Check if recent Java SE Runtime Environment (JRE) or Java SE Development Kit (JDK) are present in your system. As the precompiled MUSCLE package is already included at build/muscle.jar you may not need to compile the Java sources and JRE should be sufficient. Hovewer, if you want to recompile the Java part of the MUSCLE (recommended), a recent Java compiler is also required.   
     78{{{ 
     79#!div style="font-size: 90%" 
     80{{{#!sh 
     81yum install jdk 
     82}}} 
     83}}} 
     84 
     85=== Installation of dependencies on Mac OS X === 
     86 
     87Most dependencies are installed when installing Xcode. In [[http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12|Xcode 4.3]], 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]]. 
     88 
     89=== Remainder of the installation === 
     90 
     91If your ruby version is 1.8.x, then it is necessary to install json with the following command 
     92{{{ 
     93sudo gem install json 
     94}}} 
     95 
     96When 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. 
     97{{{ 
     98#!div style="font-size: 90%" 
     99{{{#!sh 
     100wget http://apps.man.poznan.pl/trac/muscle/downloads/muscle-1.1.1.zip 
     101}}} 
     102}}} 
     103 
     104Extract the download, e.g. 
     105{{{ 
     106#!div style="font-size: 90%" 
     107{{{#!sh 
     108$ unzip muscle-1.1.1.zip 
     109}}} 
     110}}} 
     111Change your working directory to the the MUSCLE directory: 
     112{{{ 
     113#!div style="font-size: 90%" 
     114{{{#!sh 
     115$ cd muscle-1.1.1 
     116}}} 
     117}}} 
     118Invoke MUSCLE build script with  installation (we are installing muscle to the /opt/muscle directory which is default, type ./build.rb for more options): 
     119{{{ 
     120#!div style="font-size: 90%" 
     121{{{#!sh 
     122$ ./build.rb install --prefix=/opt/muscle 
     123}}} 
     124}}} 
     125See if MUSCLE is working correctly: 
     126{{{ 
     127#!div style="font-size: 90%" 
     128{{{#!sh 
     129$ /opt/muscle/bin/muscle --version 
     130}}} 
     131}}} 
     132 
     133== Sample execution == 
     134There 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. 
     135 
     136=== Hello World === 
     137 
     138==== Sender ==== 
     139 At src/java/examples/simplejava/Sender we provide a minimalist kernel written in Java, which sends data (an array of double). 
     140 
     141==== Receiver ==== 
     142 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. 
     143 
     144==== CxA (coupling schema) ==== 
     145 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. 
     146 
     147==== Execution ==== 
     148To run the simulation defined in src/cxa/SimpleExample.cxa.rb use the following command: 
     149{{{ 
     150#!div style="font-size: 90%" 
     151{{{#!sh 
     152/opt/muscle/bin/muscle --cxa_file src/cxa/SimpleExample.cxa.rb --main plumber w r --autoquit 
     153}}} 
     154}}} 
     155 
     156== Further reading == 
     157For more information how to use MUSCLE see doc/muscle_developers_guide.pdf included in the MUSCLE bundle.