906 lines
85 KiB
HTML
906 lines
85 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
|
|
|
|
<!-- Mirrored from intranet.psi.ch/MUSR/MusrFitSetup?cover=print by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 18 Dec 2014 13:46:09 GMT -->
|
|
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
|
|
<head>
|
|
<link rel="stylesheet" href="../pub/System/HeadlinesPlugin/style.css" type="text/css" media="all" />
|
|
<title> MUSR :: MusrFitSetup</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
<link rel="icon" href="../pub/Main/WebPreferences/favicon.ico" type="image/x-icon" />
|
|
<link rel="shortcut icon" href="../pub/Main/WebPreferences/favicon.ico" type="image/x-icon" />
|
|
<link rel="alternate" href="https://intranet.psi.ch/wiki/bin/edit/MUSR/MusrFitSetup?t=1418910329" type="application/x-wiki" title="edit MusrFitSetup" />
|
|
<meta name="TEXT_NUM_TOPICS" content="Number of topics:" />
|
|
<meta name="TEXT_MODIFY_SEARCH" content="Modify search" />
|
|
<meta name="robots" content="noindex" /><link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRsshtml.html" />
|
|
<base /><!--[if IE]></base><![endif]-->
|
|
<link rel='stylesheet' href='../pub/System/ImagePlugin/style.css' media='all' />
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/SkinTemplates/base.css');
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/PatternSkinTheme2009/layout.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/style.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/colors.css');
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/PatternSkinTheme2009/column_left.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/variant_twiki.css');
|
|
</style><style type="text/css" media="all">
|
|
/* Styles that are set using variables */
|
|
.patternBookView .foswikiTopRow,
|
|
.patternWebIndicator a img,
|
|
.patternWebIndicator a:hover img {
|
|
background-color:#D0D0D0;
|
|
}
|
|
#patternTopBarContents { background-image:url(../pub/System/PatternSkin/header5.gif); background-repeat:repeat-x;}
|
|
#patternTopBarContents { background-color:#ffffff;}
|
|
.patternBookView {
|
|
border-color:#D0D0D0;
|
|
}
|
|
.patternPreviewPage #patternMain {
|
|
/* uncomment to set the preview image */
|
|
/*background-image:url("/pub/System/PreviewBackground/preview2bg.gif");*/
|
|
}
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url("../pub/System/PsiSkin/psicolors.css");
|
|
@import url("../pub/System/PsiSkin/psistyle.css");
|
|
.foswikiTopic {overflow: hidden;}
|
|
</style>
|
|
|
|
|
|
|
|
<style type="text/css" media="all">
|
|
@import url("../pub/System/PatternSkin/print.css");
|
|
</style>
|
|
<!--[if IE]><style type="text/css" media="screen">
|
|
pre {
|
|
height:1%;
|
|
overflow-x:auto;
|
|
}
|
|
.foswikiAttachments,
|
|
.foswikiForm,
|
|
.foswikiHelp,
|
|
.foswikiPreviewArea,
|
|
.patternPreviewPage .foswikiForm,
|
|
.patternSigLine,
|
|
.patternToolBar,
|
|
.patternTop,
|
|
.patternTopicAction,
|
|
#patternSideBarContents .patternLeftBarPersonal,
|
|
#patternSideBarContents h2,
|
|
#patternSideBarContents li,
|
|
#patternTopBarButtons ul {
|
|
height:1%;
|
|
}
|
|
#patternSideBarContents .patternLeftBarPersonal {
|
|
width:100%;
|
|
}
|
|
.foswikiFormStep {
|
|
height:100%;
|
|
}
|
|
#foswikiLogin,
|
|
.patternShadow {
|
|
border:10px solid #fff;
|
|
margin-top:10px;
|
|
margin-bottom:10px;
|
|
border:2px solid #ccc;
|
|
}
|
|
</style><![endif]-->
|
|
<!--[if gt IE 8 ]><style type="text/css" media="screen">
|
|
#foswikiLogin,
|
|
.patternShadow {
|
|
border:10px solid #fff;
|
|
margin-top:10px;
|
|
margin-bottom:10px;
|
|
box-shadow: 0 0 10px #ccc;
|
|
}
|
|
</style><![endif]-->
|
|
<link rel="stylesheet" href="../pub/System/FootNotePlugin/styles.css" type="text/css" media="all" /><!--FOOTNOTEPLUGIN_LINKCSS-->
|
|
</head>
|
|
<body class="foswikiNoJs patternViewPage">
|
|
<a name="PageTop"></a><div class="foswikiPage"><div id="patternScreen">
|
|
<div id="patternPageShadow">
|
|
<div id="patternPage">
|
|
<div id="patternWrapper"><div id="patternOuter">
|
|
<div id="patternFloatWrap">
|
|
<div id="patternMain"><div id="patternClearHeaderCenter"></div>
|
|
<div id="patternMainContents"><div class="patternTop"><span class="patternHomePath foswikiLeft"></span><span class="patternToolBar foswikiRight"><span><a href='MusrFitSetupc99a.html?cover=print;cover=print' rel='nofollow' title='Printable version of this topic' accesskey='p'><span class='foswikiAccessKey'>P</span>rint version</a></span><a href="https://intranet.psi.ch/MUSR/MusrFitSetup?restrictions=on" id="restriction_link"><img src='../pub/System/PsiSkin/lock_open.png' class='lock' height='16' width='23' title='open in PSI - click for more information'/></a></span><div class="foswikiClear"></div></div><div class="foswikiContentHeader">
|
|
<p></p>
|
|
<p></p>
|
|
|
|
|
|
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
</div><div class="patternContent"><div class="foswikiTopic"><h1><a name="Setting_up_61_61musrfit_61_61_on_Different_Platforms"></a> Setting up <code><b>musrfit</b></code> on Different Platforms </h1>
|
|
<p></p>
|
|
<a name="foswikiTOC"></a><div class="foswikiToc"> <ul>
|
|
<li> <a href="MusrFitSetup.html#Setting_up_61_61musrfit_61_61_on_Different_Platforms"> Setting up musrfit on Different Platforms </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_1_Supported_Operating_Systems_and_Software_Requirements"> 1 Supported Operating Systems and Software Requirements </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_2_OS_Restrictions"> 2 OS Restrictions </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3_GNU_47Linux"> 3 GNU/Linux </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_3.1_Requirements"> 3.1 Requirements </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_3.1.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"> 3.1.1 Everything but ROOT and NeXus </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"> 3.1.2 Installation of NeXus requirements (optional) </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.1.3_61_61ROOT_61_61"> 3.1.3 ROOT </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.2_61_61musrfit_61_61"> 3.2 musrfit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.3_61_61musredit_61_61"> 3.3 musredit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.4_61_61musrgui_61_61"> 3.4 musrgui </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_3.5_Check_of_the_installation"> 3.5 Check of the installation </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4_MS_Windows"> 4 MS Windows </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_4.1_Requirements"> 4.1 Requirements </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_4.1.1_Setting_up_Cygwin"> 4.1.1 Setting up Cygwin </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"> 4.1.2 Installation of NeXus requirements (optional) </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.1.3_61_61ROOT_61_61"> 4.1.3 ROOT </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.2_61_61musrfit_61_61"> 4.2 musrfit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.3_61_61musredit_61_61"> 4.3 musredit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.4_61_61musrgui_61_61"> 4.4 musrgui </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.5_Check_of_the_installation"> 4.5 Check of the installation </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_4.6_Possible_problems"> 4.6 Possible problems </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5_Mac_OS_X"> 5 Mac OS X </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_5.1_Requirements_40_61_61MacPorts_61_61_41"> 5.1 Requirements (MacPorts) </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_5.1.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"> 5.1.1 Everything but ROOT and NeXus </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"> 5.1.2 Installation of NeXus requirements (optional) </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.1.3_61_61ROOT_61_61"> 5.1.3 ROOT </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.2_Requirements_40_61_61Fink_61_61_41"> 5.2 Requirements (Fink) </a> <ul>
|
|
<li> <a href="MusrFitSetup.html#A_5.2.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"> 5.2.1 Everything but ROOT and NeXus </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.2.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"> 5.2.2 Installation of NeXus requirements (optional) </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.2.3_61_61ROOT_61_61"> 5.2.3 ROOT </a>
|
|
</li></ul>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.3_61_61musrfit_61_61"> 5.3 musrfit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.4_61_61musredit_61_61"> 5.4 musredit </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.5_61_61musrgui_61_61"> 5.5 musrgui </a>
|
|
</li> <li> <a href="MusrFitSetup.html#A_5.6_Check_of_the_installation"> 5.6 Check of the installation </a>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<p></p>
|
|
<h1><a name="A_1_Supported_Operating_Systems_and_Software_Requirements"></a> 1 Supported Operating Systems and Software Requirements </h1>
|
|
<p></p>
|
|
This page is intended to demonstrate for the interested user which steps are necessary to set up the <a href="http://www.gnu.org/philosophy/free-sw.html" target="_top">free software</a> μSR data analysis framework <code><a href="MusrFit.html">musrfit</a></code>. While the preferred way is to run the software on <strong>GNU/Linux</strong>, with some restrictions it can also be set up under <strong>MS Windows</strong> and <strong>MacOS X</strong>. <span class='foswikiRedFG'>In case <code>musrfit</code> should be installed according to the description found on this page, the user is strongly encouraged to <em>read completely</em> each section dealing with the present installation step <em>before</em> starting the installation process!</span>
|
|
<p></p>
|
|
<a name="ReqSw"></a>
|
|
Apart from <a href="http://gcc.gnu.org/" target="_top">GCC, the GNU Compiler Collection</a>, the GNU build tools <a href="http://www.gnu.org/software/autoconf/" target="_top">autoconf</a>, <a href="http://www.gnu.org/software/automake/" target="_top">automake</a> and <a href="http://www.gnu.org/software/libtool/" target="_top">libtool</a> as well as the helper tool <a href="http://pkg-config.freedesktop.org/wiki/" target="_top">pkg-config</a> <code>musrfit</code> requires the installation of a few open-source libraries and programs: <dl>
|
|
<dt> <a href="http://www.boost.org/" target="_top">boost C++ libraries</a> </dt><dd> The powerful <code>Spirit</code> parser framework used by <code>musrfit</code> is included in that collection of libraries. <em>Required version ≥ 1.33</em>
|
|
</dd> <dt> <a href="http://www.gnu.org/software/gsl/" target="_top">GNU Scientific Library</a> </dt><dd> A numerical <code>C</code> and <code>C++</code> library which provides efficient implementations of various mathematical routines. <em>Required version ≥ 1.9</em>
|
|
</dd> <dt> <a href="http://www.fftw.org/" target="_top">FFTW</a> </dt><dd> A <code>C</code> implementation for the fast computation of discrete Fourier transforms. <em>Required version ≥ 3.1</em>
|
|
</dd> <dt> <a href="http://root.cern.ch/" target="_top">ROOT</a> </dt><dd> A <code>C++</code> data analysis framework developed at <a href="http://www.cern.ch/" target="_top">CERN</a>. <em>Required version ≥ 5.22</em>
|
|
</dd> <dt> <a href="http://xmlsoft.org/" target="_top">libxml2</a> </dt><dd> The <code>XML</code> <code>C</code> parser and toolkit of <a href="http://www.gnome.org/" target="_top">Gnome</a>. <em>Required version ≥ 2.0</em>
|
|
</dd></dl>
|
|
<p></p>
|
|
<a name="ReqSwNeXus"></a>
|
|
Additionally, <span class='foswikiRedFG'>only if</span> <code>musrfit</code> should support reading of data files in the <code>NeXus</code> format the following libraries are needed: <dl>
|
|
<dt> <a href="http://www.hdfgroup.org/products/hdf4/" target="_top">HDF4</a> </dt><dd> A library and multi-object file format for storing and managing data.
|
|
</dd> <dt> <a href="http://www.hdfgroup.org/HDF5/" target="_top">HDF5</a> </dt><dd> A data model, library, and file format for storing and managing data.
|
|
</dd> <dt> <a href="http://www.minixml.org/" target="_top">minixml</a> </dt><dd> A small <code>XML</code> library that can be used to read and write <code>XML</code> and <code>XML</code> -like data files. <em>Required version ≥ 2.2</em>
|
|
</dd> <dt> <a href="http://www.nexusformat.org/" target="_top">NeXus</a> </dt><dd> A common data format for neutron, x-ray, and muon science.
|
|
</dd></dl>
|
|
<p></p>
|
|
If optionally the editor and graphical user interface <code><a href="MusrGui.html">musrgui</a></code> / <code><a href="MusrGui.html">musredit</a></code> is going to be installed there is one further requirement: <dl>
|
|
<dt> <a href="http://qt.nokia.com/" target="_top">Qt</a> </dt><dd> A cross-platform application and user interface framework. <em>Required version ≥ 3.3 & ≪ 4.0 (<code>musrgui</code>) <strong>OR</strong> ≥ 4.6 (<code>musredit</code>)</em>
|
|
</dd></dl>
|
|
<p></p>
|
|
Each of the following sections focusing on the installation of <code>musrfit</code> on the different operating systems will also give a brief introduction on the installation of the requirements before the actual <code>musrfit</code> installation is described.
|
|
<p></p>
|
|
<h1><a name="A_2_OS_Restrictions"></a> 2 OS Restrictions </h1>
|
|
Before the further installation will be described, please note the following restrictions: <dl>
|
|
<dt> GNU/Linux </dt><dd> No serious problems are known at the moment.
|
|
</dd> <dt> MS Windows </dt><dd> The setup of <code>musrfit</code> (including the requirements) using <code>Visual C++</code> has not been tested. If anybody likes to do this: Just go ahead and have fun! However, not very much assistance can be expected, although it would be an interesting experiment.
|
|
</dd> <dt> Mac OS X </dt><dd> On <code>10.6 Snow Leopard</code> <code>Qt3</code> for Mac is not supported any more since this was based on a 32-bit only API. <code>Snow Leopard</code> -users are advised to use the <code>Qt4</code> based <code>musredit</code> or to rely on the standard <code>Qt3</code> version for <code>X11</code> in order to run <code>musrgui</code>.
|
|
</dd></dl>
|
|
<p></p>
|
|
<h1><a name="A_3_GNU_47Linux"></a> 3 GNU/Linux </h1>
|
|
<h2><a name="A_3.1_Requirements"></a> 3.1 Requirements </h2>
|
|
<h3><a name="A_3.1.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"></a> 3.1.1 Everything but <code><b>ROOT</b></code> and <code><b>NeXus</b></code> </h3>
|
|
Depending on the GNU/Linux distribution chosen, the above mentioned software—except the <code>ROOT</code> system and the <code>NeXus</code> library—should be available from the distributor and could be easily installed in the form of binary packages. If done in this way there should be taken care of installing <strong>both</strong>, the libraries and the header (dev, devel) files.<br>
|
|
On a <a href="https://www.scientificlinux.org/" target="_top">Scientific Linux</a> (<a href="http://www.redhat.com/" target="_top">Red Hat</a>) system the following command executed as superuser from the shell will do the trick:
|
|
<pre class="bash">
|
|
yum install git boost-devel gsl-devel fftw-devel libxml2-devel qt-devel qtwebkit-devel
|
|
</pre>
|
|
When dealing with a distribution that uses the dpkg/apt package manager like <a href="http://www.debian.org/" target="_top">Debian</a> or <a href="http://www.ubuntu.com/" target="_top">Ubuntu</a> the installation would look like:
|
|
<pre class="bash">
|
|
apt-get install git libboost-dev libgsl0-dev libfftw3-dev libxml2-dev libqt4-dev libqtwebkit-dev
|
|
</pre>
|
|
Everyone should know best himself which is the way to install distribution software on the chosen distribution <img src="../pub/Main/SmiliesPluginPSI/wink.gif" alt="wink" title="wink" border="0" />
|
|
<p></p>
|
|
In case the distribution does not include the required software it has to be compiled from the source files which normally means to download the source code from the corresponding website, to unpack the source tree and call the following from the shell:
|
|
<pre class="bash">
|
|
./configure
|
|
make
|
|
make install
|
|
</pre>
|
|
In order to obtain some information about the possible options for the installation, calling <code>./configure --help</code> might give some useful hints. <br>
|
|
For any further information on the standard installation of software, please refer to the web search engine of choice and ask for "install software on linux"...
|
|
<p></p>
|
|
<h3><a name="A_3.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"></a> 3.1.2 Installation of <code><b>NeXus</b></code> requirements (optional) </h3>
|
|
<span class='foswikiRedFG'>Only if</span> <code>musrfit</code> should support reading data files in the <code>NeXus</code> format the further <a href="#ReqSwNeXus" class="foswikiCurrentTopicLink">required</a> software has to be set up. The required libraries and header files could either be available through the user's GNU/Linux distribution or if this is not the case, the packages can be installed from the source code. E.g. on Red Hat-like systems binary packages for <code>MXML</code>, <code>HDF4</code>, and <code>HDF5</code> might be called <code><b>mxml, mxml-devel, hdf, hdf-devel, hdf5, hdf5-devel</b></code>, on Debian-like systems <code><b>libmxml1, libmxml-dev, libhdf4-dev, libhdf5-dev</b></code>.
|
|
<p></p>
|
|
Even though there might exist binary packages for the <code>NeXus</code> library, it is best to build and install it directly from the source code which can be found <a href="http://download.nexusformat.org/kits/" target="_top">here</a>.
|
|
<p></p>
|
|
<h3><a name="A_3.1.3_61_61ROOT_61_61"></a> 3.1.3 <code><b>ROOT</b></code> </h3>
|
|
<strong>Currently only ROOT 5.34/xx is support! Do NOT try to use ROOT 6.xx/yy!</strong>
|
|
<p></p>
|
|
The <code>ROOT</code> system may or may not be part of the GNU/Linux distribution. If it is, it should be checked that the provided binaries are of a recent version and then these in principle can be installed using a package manager as described above. <br>
|
|
In case the distribution provides no or only outdated binary packages there are the following possibilities: <ul>
|
|
<li> Visit the <code>ROOT</code> <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the packed precompiled binary version matching best the GNU/Linux distribution. Then unpack the bundle to its final destination.
|
|
</li> <li> If there is no precompiled binary version of <code>ROOT</code> available for your system or e.g. <code>ROOT</code> should be compiled with another version of <code>GCC</code> visit the <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the 'complete source tree for all systems'. Then unpack this source tree to its destination (e.g. /opt/root-system)<a name="FootNote1text"></a><span class='FootNoteTextLink' title='In case only a single user is working at the machine it might be considerable to change the ownership of the <code>ROOT</code> folder so that the user has easy write access to this directory: <pre class="bash">chown username:username /opt/root-system/ -R</pre>'><a href="#FootNote1note" class="foswikiCurrentTopicLink">(1)</a></span>, configure<a name="FootNote2text"></a><span class='FootNoteTextLink' title=' When using <code>GCC</code> ≥ 4.2 please make sure that the environment variables <strong>USE_PARALLEL_MINUIT2</strong> and <strong>USE_OPENMP</strong> are <em>not</em> set! Otherwise <code>MINUIT2</code> will be compiled with parallelization support and cannot be used together with <code>musrfit</code> afterwards since the <code>musrfit</code> code is <em>not</em> fully thread-safe! When compiled with <code>GCC</code> ≥ 4.2 <code>musrfit</code> itself will parallelize the χ<sup>2</sup> calculation.'><a href="#FootNote2note" class="foswikiCurrentTopicLink">(2)</a></span> it (here using the minimal set of options) and compile it as follows right below: <pre class="bash">
|
|
cd /opt/root-system
|
|
./configure linux --gminimal --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
(or in case of a 64 bit installation: ./configure linuxx8664gcc --gminimal --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml)
|
|
make
|
|
(or in case there are multiple processors available, e.g.: make -j4)
|
|
</pre>
|
|
</li></ul>
|
|
After one of the two setup variants has been executed the system should be told where to find the <code>ROOT</code> installation, therefore the following is suggested: <ul>
|
|
<li> As superuser create a file <strong>/etc/ld.so.conf.d/root-system.conf</strong> where the path to the <code>lib</code> directory of <code>ROOT</code> is added and call <strong>/sbin/ldconfig</strong> afterwards. In the example mentioned above one way of doing this is: <pre class="bash">
|
|
echo "/opt/root-system/lib" >> /etc/ld.so.conf.d/root-system.conf
|
|
/sbin/ldconfig
|
|
</pre>
|
|
</li> <li> <span class='foswikiRedFG'>Additionally</span>, as normal user one should append the following lines to the <strong>~/.bashrc</strong> and/or <strong>~/.bash_profile</strong> (and then either restart the shell or call the same commands once more from the shell) in order to change some path-setting environment variables: <pre class="bash">
|
|
export ROOTSYS=/opt/root-system/
|
|
export PATH=$ROOTSYS/bin:$PATH
|
|
</pre>
|
|
</li></ul>
|
|
<p></p>
|
|
<a name="MusrFitInstallation"></a>
|
|
<h2><a name="A_3.2_61_61musrfit_61_61"></a> 3.2 <code><b>musrfit</b></code> </h2>
|
|
When all required software has been set up it can be proceeded with the <code>musrfit</code> installation. First, the most recent source code should be downloaded. The preferred way of doing so is to <strong>clone</strong> the musrfit repository via git. Assuming the code should be located in ~/musrfit this is achieved most easily calling from the terminal
|
|
<pre class="bash">
|
|
cd
|
|
git clone https://bitbucket.org/muonspin/musrfit.git
|
|
</pre>
|
|
or
|
|
<pre class="bash">
|
|
cd
|
|
git clone git://gitorious.psi.ch/nemu/musrfit.git
|
|
</pre>
|
|
<p></p>
|
|
<strong>Note:</strong> musrfit has moved from svn to git. In case you still have an <em>old</em> svn version of musrfit, it is advised to remove it first. For svn users: for a smooth transition from svn to git, please check the following link:
|
|
<a href="http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet/" target="_top">Git for Subversion Users - A Cheat Sheet</a>.
|
|
<p></p>
|
|
If a local repository clone is already present, one can update it using:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
git pull
|
|
</pre>
|
|
<p></p>
|
|
<span class='foswikiRedFG'>As an alternative (if git is not available)</span>, the source code can also be downloaded from the following web-page: <a href="https://bitbucket.org/muonspin/musrfit/downloads" target="_top">musrfit at bitbucket</a>.
|
|
<p></p>
|
|
After the source-code extraction the <strong>autogen.sh</strong> script is called to prepare the build environment. If it has been executed successfully the <strong>configure</strong> script should be ready to collect all the information needed to create the Makefiles. <span class='foswikiRedFG'>If <code>musrfit</code> should support <code>NeXus</code> data files this has to be enabled by specifying the <strong>--enable-NeXus</strong> switch when calling <strong>configure</strong>.</span> For an overview of all available options just call <code>./configure --help</code>. Besides the standard options there are a few special options which should be mentioned here:
|
|
<p></p> <dl>
|
|
<dt> --prefix </dt><dd> Specify the installation prefix, e.g. /opt/root-system (<em>by default: /usr/local</em>)
|
|
</dd> <dt> --with-rootsys </dt><dd> Specify the top of the <code>ROOT</code> installation directory, e.g. /opt/root-system
|
|
</dd> <dt> --with-fftw3 </dt><dd> Specify the prefix of the <code>FFTW3</code> installation. e.g. /usr/local or /usr
|
|
</dd> <dt> --with-gsl </dt><dd> Set the prefix of the <code>GSL</code> installation, e.g. /usr/local or /usr
|
|
</dd> <dt> --with-boostinc </dt><dd> Set the path to the header files of the <code>Boost</code> installation, e.g. /usr/local/include or /usr/include
|
|
</dd> <dt> --with-hdf4 </dt><dd> Set the prefix of the <code>HDF4</code> installation, e.g. /usr/local (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-hdf5 </dt><dd> Set the prefix of the <code>HDF5</code> installation, e.g. /usr (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-nexus </dt><dd> Set the prefix of the <code>NeXus</code> installation, e.g. /usr/local (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-qt3 </dt><dd> Set the prefix of the <code>Qt3</code> installation, e.g. /usr/lib/qt-3.3 (<em>only useful in conjunction with building <code>musrgui</code></em>)
|
|
</dd> <dt> --with-qt4 </dt><dd> Set the prefix of the <code>Qt4</code> installation, e.g. /usr/lib/qt47 (<em>only useful in conjunction with building <code>musredit</code></em>)
|
|
</dd> <dt> --enable-NeXus </dt><dd> Enable the support of <code>NeXus</code> data files (<em>requires the <code>HDF4</code>, <code>HDF5</code> and <code>NeXus</code> libraries to be installed</em>).
|
|
</dd> <dt> --disable-editor </dt><dd> Disable the integrated building of <code>musredit</code>/<code>musrgui</code>.
|
|
</dd> <dt> --disable-omp </dt><dd> Switches off the <a href="http://en.wikipedia.org/wiki/OpenMP" target="_top">OpenMP</a> features of <code>musrfit</code> (parallelization of the χ<sup>2</sup> calculation when compiled with GCC ≥ 4.2)
|
|
</dd></dl>
|
|
<p></p>
|
|
Normally it should not be necessary to make use of any of the options except for specifying the installation path with <strong>--prefix</strong>. The other paths should be detected automatically. If this does not work for some reason the <strong>configure</strong> script will terminate and ask for the information.
|
|
When the <strong>configure</strong> script has been called successfully everything is ready for building the <code>musrfit</code> libraries and executables. A standard installation sequence (without <code>NeXus</code> support) might then look like<a name="FootNote3text"></a><span class='FootNoteTextLink' title='In case the normal user has no write permissions to the $ROOTSYS and the installation path the "make install" commands have to be executed as superuser.'><a href="#FootNote3note" class="foswikiCurrentTopicLink">(3)</a></span>:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
sh autogen.sh
|
|
./configure --prefix=$ROOTSYS
|
|
make
|
|
make install
|
|
/sbin/ldconfig (as superuser)
|
|
</pre>
|
|
In order to finish the installation of <code>musrfit</code> two more things should be done: <ul>
|
|
<li> Define the <strong>MUSRFITPATH</strong> environment variable containing the path to the <code>musrfit</code> executables and XML files. E.g. if the location of the example above is used append the following line to the <strong>~/.bashrc</strong> and <strong>~/.bash_profile</strong> (and then either restart the shell or call the same commands once more from the shell): <pre class="bash">
|
|
export MUSRFITPATH=/opt/root-system/bin
|
|
</pre>
|
|
</li> <li> Adjust the paths where <code>musrfit</code> will search for data files in the installed <strong>musrfit_startup.xml</strong>. For detailed information on this XML file refer to the <a href="MusrFit.html#MusrfitStartupXml">manual</a>.
|
|
</li></ul>
|
|
<p></p>
|
|
<a name="MusrGuiInstallLinux"></a>
|
|
<h2><a name="A_3.3_61_61musredit_61_61"></a> 3.3 <code><b>musredit</b></code> </h2>
|
|
<span class='foswikiBlueFG'>In the latest version of <code>musrfit</code> the configure script tries to determine automatically if <code>Qt4.6</code> or higher is set up on the machine. In case this is found, the editor <code>musredit</code> is built already together with <code>musrfit</code>. <em>If not</em>, one can either try to call the configure script with the "--with-qt4" option or install this editor separately:</span>
|
|
<pre class="bash">
|
|
cd src/musredit
|
|
qmake musredit.pro
|
|
</pre>
|
|
If everything went fine <code>musredit</code> can be compiled and installed:
|
|
<pre class="bash">
|
|
make
|
|
make install
|
|
</pre>
|
|
In case one does not like the executable <strong>musredit</strong> to be copied to the default installation directory $ROOTSYS/bin the last "make install" can be skipped and the executable can be copied somewhere else instead. However, the <strong>musredit_startup.xml</strong> should go to the installation directory <strong>MUSRFITPATH</strong> of the <code>musrfit</code> executables.
|
|
Eventually, in the installed <strong>musredit_startup.xml</strong> the path specifications should be adjusted to match the local <code>musrfit</code> installation. For detailed information on this XML file refer to the <a href="MusrGui.html#MusrguiStartupXml">manual</a>.
|
|
<p></p>
|
|
<h2><a name="A_3.4_61_61musrgui_61_61"></a> 3.4 <code><b>musrgui</b></code> </h2>
|
|
If <code>Qt4.6</code> or higher is not available but <code>Qt3</code> is set up <code>musrgui</code> can be installed. For this please follow the instructions for the <a href="#MusrGuiInstallLinux" class="foswikiCurrentTopicLink">musredit installation</a> where simply every <code>musredit</code> occurrence has to be replaced by <code>musrgui</code>.<br>
|
|
If there are problems during the <code>qmake</code> step, e.g. "uic: File generated with too old version of Qt Designer", this most probably means the <code>Qt4</code> version of qmake is being used. In order to use the <code>Qt3</code> version it should be enough to specify the full path to its location when calling it. Within the most GNU/Linux distributions this location will be something like /usr/lib/qt-3.3/bin/qmake.
|
|
<p></p>
|
|
<h2><a name="A_3.5_Check_of_the_installation"></a> 3.5 Check of the installation </h2>
|
|
In order to perform a quick test for finding out if the installation has been completed successfully, a few msr files together with the corresponding data files can be found in the <code>musrfit</code> source tree at <strong>doc/examples/</strong>.<br>
|
|
If <code>musrgui</code> has been installed, just open one of the <strong>test-*.msr</strong> files in the editor and test the <code>musrfit</code> functionalities. Otherwise, if only the terminal should be used, as an initial test for instance the following could be done:
|
|
<pre class="bash">
|
|
cd doc/examples
|
|
musrview test-histo-ROOT-NPP.msr
|
|
</pre>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
Notes
|
|
<p></p>
|
|
<a name="FootNote1note"></a><span class="FootNoteLabel"><a href="#FootNote1text" class="foswikiCurrentTopicLink"> <strong>1</strong> </a></span>: <span class="FootNote">In case only a single user is working at the machine it might be considerable to change the ownership of the <code>ROOT</code> folder so that the user has easy write access to this directory: <!-- verbatim3 --></span>
|
|
<p></p>
|
|
<a name="FootNote2note"></a><span class="FootNoteLabel"><a href="#FootNote2text" class="foswikiCurrentTopicLink"> <strong>2</strong> </a></span>: <span class="FootNote"> When using <code>GCC</code> ≥ 4.2 please make sure that the environment variables <strong>USE_PARALLEL_MINUIT2</strong> and <strong>USE_OPENMP</strong> are <em>not</em> set! Otherwise <code>MINUIT2</code> will be compiled with parallelization support and cannot be used together with <code>musrfit</code> afterwards since the <code>musrfit</code> code is <em>not</em> fully thread-safe! When compiled with <code>GCC</code> ≥ 4.2 <code>musrfit</code> itself will parallelize the χ<sup>2</sup> calculation.</span>
|
|
<p></p>
|
|
<a name="FootNote3note"></a><span class="FootNoteLabel"><a href="#FootNote3text" class="foswikiCurrentTopicLink"> <strong>3</strong> </a></span>: <span class="FootNote">In case the normal user has no write permissions to the $ROOTSYS and the installation path the "make install" commands have to be executed as superuser.</span>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<hr />
|
|
<p></p>
|
|
<h1><a name="A_4_MS_Windows"></a> 4 MS Windows </h1>
|
|
Under Windows a native installation is not supported but there is the possibility to run <code>musrfit</code> through <a href="http://www.cygwin.com/" target="_top">Cygwin</a> which has the great advantage that one gains additionally various nice <code>UNIX</code> tools also for other purposes <img src="../pub/Main/SmiliesPluginPSI/wink.gif" alt="wink" title="wink" border="0" /> <br>
|
|
<span class='foswikiRedFG'>Please also be aware of the fact that the X server which is going to be installed with Cygwin has to be started (e.g. by selecting it from the "Programs" folder) before any graphical application (<code>musrview</code>, <code>musrgui</code>, etc.) is run</span>.
|
|
<p></p>
|
|
<span class='foswikiPinkFG'>One more advice: Please never try to install either <code>ROOT</code> or <code>musrfit</code> from or to a directory containing spaces in the absolute path or in case you do, do not wonder if some errors occur!<br>
|
|
msr files, however, might be saved in such directories like ...\My Documents\...</span>
|
|
<p></p>
|
|
<h2><a name="A_4.1_Requirements"></a> 4.1 Requirements </h2>
|
|
<h3><a name="A_4.1.1_Setting_up_Cygwin"></a> 4.1.1 Setting up Cygwin </h3>
|
|
For the start go to the Cygwin website, download the <a href="http://cygwin.com/setup.exe" target="_top">setup file</a> and use it to install <strong>Cygwin 1.7</strong>. During the installation process you will be asked where you want to install Cygwin and normally the default choice should just be fine.
|
|
At some point you will be asked which packages should be installed—make sure that you choose at least the following (or packages with revisions close to the following) in order to fulfill the <code>musrfit</code> requirements and be able to work with this base system:
|
|
<p></p>
|
|
<code><b>a2ps, alternatives, autoconf, automake, base-cygwin, base-files, base-passwd bash, bash-completion, bc, binutils, bison, boost, boost-devel, bzip2, cmake, colorgcc, coreutils, curl, cygutils, cygwin, editrights, fftw3, findutils, flex, font-adobe-dpi100, font-adobe-dpi75, font-alias, font-bitstream-dpi100, font-bitstream-dpi75, font-encodings, font-ibm-type1, font-sun-misc, font-util, font-xfree86-type1, fontconfig, freeglut, gawk, gcc-tools-autoconf, gcc-tools-automake, gcc4, gcc4-core, gcc4-fortran, gcc4-g++, gccmakedep, gd, gettext, ghostscript, ghostscript-fonts-std, giflib, gmp, grep, groff, gsl, gsl-apps, gsl-devel, gv, gzip, inputproto, jasper, jpeg, lapack, less, libboost, libbz2_1, libcharset1, libcurl4, libfftw3-devel, libfftw3_3, libgcc1, libgd-devel, libgif-devel, libGL-devel, libGL1, libGLU-devel, libGLU1, libglut-devel, libglut3, libgmp-devel libgmp3, libgomp1, libICE-devel, libICE6, libjpeg-devel, libjpeg62, liblapack-devel, libmpfr-devel, libmpfr1, libncurses-devel, libncurses9, libOSMesa-devel, libOSMesa7, libpng, libpng14, libpng14-devel, libreadline6, libSM-devel, libSM6, libssh2_1, libstdc++6, libstdc++6-devel, libtiff-devel, libtiff5, libtool, libX11-devel, libX11_6, libXau-devel, libXau6, libXaw7, libxcb-devel, libxcb-xlib-devel libXcursor-devel, libXcursor1, libXdmcp-devel, libXdmcp6, libXext-devel, libXext6, libXfixes-devel, libXfixes3, libXfont-devel, libXfont1, libXft-devel, libXft2, libXi-devel, libXi6, libxkbfile1, libxml2, libxml2-devel, libXmu-devel, libXmu6, libXpm-devel, libXpm4, libXrender-devel, libXrender1, libXt-devel, libXt6, login, m4, make, makedepend, man, mpfr, nano, opengl, openssh, openssl, pdftk, perl, ping, pkg-config, psutils, python, qt3, qt3-bin, qt3-devel, readline, rebase, rgb, rsync, run, screen, sed, subversion, tar, tcltk, terminfo, unzip, util-linux, vim, w32api, which, X-start-menu-icons, xauth, xextproto, xfontsel, xinit, xkbcomp, xkeyboard-config, xkill, xlogo, xlsfonts, xorg-cf-files, xorg-scripts, xorg-server, xproto, xrdb, xrefresh, xset, xterm, zip, zlib, zlib-devel, zlib0, libQt3Support4-devel, libQtAssistantClient4-devel, libQtCore4-devel, libQtDBus4-devel, libQtDesigner4-devel, libQtGui4-devel, libQtHelp4-devel, libQtNetwork4-devel, libQtOpenGL4-devel, libQtScript4-devel, libQtScriptTools4-devel, libQtSql4-devel, libQtSvg4-devel, libQtTest4-devel, libQtWebKit4-devel, libQtXml4-devel, libQtXmlPatterns4-devel</b></code>
|
|
<p></p>
|
|
After these installations already most of the required software is present and the Cygwin shell can be started now for the further steps! Inside the shell the <code>POSIX</code> naming convention applies, therefore, paths will be given with separating <strong>/</strong> instead of <strong>\</strong> in <code>DOS</code>. The file structure accessible through this shell can also be accessed through the Windows Explorer—just go to the directory which you specified as "cygwin root" during the installation: this is the equivalent to <strong>/</strong> in the shell. By default, the different hard drives or network shares like <strong>C:\</strong> can be found at <strong>/cygdrive/c/</strong> in the shell—the cygdrive prefix can in principle also be changed but for now we stick to the default.
|
|
<p></p>
|
|
Since later on the <code>boost</code> header files should be used and in the standard Cygwin installation these are found at a version specific location, the later handling will be easier if a symbolic link to these files is created now in the terminal (in case it had not been present before):
|
|
<pre class="bash">
|
|
ln -sf /usr/include/boost-x_yy_z/boost /usr/include/boost
|
|
</pre>
|
|
where <strong>x_yy_z</strong> has to be substituted by the correct version number, e.g. <strong>1_33_1</strong>.
|
|
<p></p>
|
|
<h3><a name="A_4.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"></a> 4.1.2 Installation of <code><b>NeXus</b></code> requirements (optional) </h3>
|
|
<span class='foswikiRedFG'>Only if</span> <code>musrfit</code> should support reading data files in the <code>NeXus</code> format the further <a href="#ReqSwNeXus" class="foswikiCurrentTopicLink">required</a> software has to be set up. Under Cygwin of all the required libraries only <code>HDF5</code> is available. The packages <code><b>hdf5</b></code> and <code><b>libhdf5-devel</b></code> can be installed through the Cygwin setup. One should also make sure that <code><b>bison</b></code>, <code><b>flex</b></code> and a package containing <nobr><b>/usr/lib/librpc.a</b></nobr> (e.g. <code><b>sunrpc</b></code> = <strong>4.0-3</strong>, <span class='foswikiRedFG'>but not</span> <code><b>sunrpc</b></code> = <strong>4.0-4</strong>) are installed.
|
|
<p></p>
|
|
All other libraries have to be built from the sources. The following lines will track the installation of <code>JPEG</code> <strong>6b</strong>, <code>MXML</code> <strong>2.9</strong>, <code>HDF</code> <strong>4.2.7-patch1</strong>, and <code>NeXus</code> <strong>4.3.2</strong>. The version numbers and source-code locations might of course change with time but should be easily adjustable.
|
|
<pre class="bash">
|
|
cd
|
|
mkdir nexus
|
|
cd nexus
|
|
curl http://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v6b.tar.gz -G | tar xz
|
|
cd jpeg-6b
|
|
./configure --prefix=/usr/local --enable-static
|
|
make
|
|
make install
|
|
cd ..
|
|
curl www.msweet.org/files/project3/mxml-2.9.tar.gz -G | tar xz
|
|
cd mxml-2.9
|
|
./configure --prefix=/usr/local --enable-static
|
|
make
|
|
make install
|
|
cd ..
|
|
curl http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.7-patch1.tar.gz -G | tar xz
|
|
cd hdf-4.2.7-patch1
|
|
./configure --prefix=/usr/local --enable-static --disable-fortran --with-jpeg=/usr/local
|
|
make
|
|
make install
|
|
cd ..
|
|
curl http://download.nexusformat.org/kits/nexus-4.3.2-20140413svn1919.tar.gz -G | tar xz
|
|
cd nexus-4.3.2-20140413svn1919
|
|
./configure --prefix=/usr/local --with-hdf4=/usr/local --with-hdf5=/usr --with-xml=/usr/local
|
|
make
|
|
make install
|
|
</pre>
|
|
<p></p>
|
|
<h3><a name="A_4.1.3_61_61ROOT_61_61"></a> 4.1.3 <code><b>ROOT</b></code> </h3>
|
|
In order to install the <code>ROOT</code> system, there are two possibilities: <ul>
|
|
<li> Download the precompiled <strong>Cygwin GCC 4.3</strong> package of the most recent <code>ROOT</code> version from the <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and unpack it <span class='foswikiRedFG'>in a Cygwin shell</span> (in order to get the line endings correctly) at the final location. Suppose the package has been downloaded to <strong>C:\</strong> and the <code>ROOT</code> tree should be in <strong>C:\root</strong>, this is achieved by:<pre class="bash">
|
|
cd /cygdrive/c
|
|
tar xzf root_v5.xx.yy.win32gcc-gcc-4.3.tar.gz
|
|
</pre>
|
|
</li> <li> If due to some reason there was no precompiled <strong>Cygwin GCC 4.3</strong> package available or <code>ROOT</code> should be built from source, one has to visit the <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a>, download the 'complete source tree for all systems' and save it for instance in <strong>C:\</strong>.<br>Then go to the Cygwin shell and unpack this source tree, configure<a name="FootNote4text"></a><span class='FootNoteTextLink' title=' When using <code>GCC</code> ≥ 4.2 please make sure that the environment variables <strong>USE_PARALLEL_MINUIT2</strong> and <strong>USE_OPENMP</strong> are <em>not</em> set! Otherwise <code>MINUIT2</code> will be compiled with parallelization support and cannot be used together with <code>musrfit</code> afterwards since the <code>musrfit</code> code is <em>not</em> fully thread-safe! When compiled with <code>GCC</code> ≥ 4.2 <code>musrfit</code> itself will parallelize the χ<sup>2</sup> calculation.'><a href="#FootNote4note" class="foswikiCurrentTopicLink">(2)</a></span> it (here using the minimal set of options) and compile it as follows right below:<pre class="bash">
|
|
cd /cygdrive/c
|
|
tar xzf root_v5.xx.yy.source.tar.gz
|
|
cd root
|
|
./configure win32gcc --gminimal --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
make
|
|
</pre>
|
|
</li></ul>
|
|
<p></p>
|
|
In order to finalize the <code>ROOT</code> installation and to prepare already the installation of <code>musrfit</code> and <code>musredit</code> this is a good time for setting necessary environment variables for the use in Cygwin. For accomplishing that put the following lines at the end of the <strong>/home/Username/.bashrc</strong> (<strong>C:\cygwin\home\Username\.bashrc</strong> for the user "Username" and the "cygwin root" at "C:\cygwin"):
|
|
<pre class="bash">
|
|
export DISPLAY=:0.0
|
|
export QTDIR=/usr/lib/qt4
|
|
export ROOTSYS=/cygdrive/c/root
|
|
export PATH=$ROOTSYS/bin:$QTDIR/bin:/usr/i686-pc-cygwin/bin:$PATH
|
|
export MUSRFITPATH=$ROOTSYS/bin
|
|
</pre>
|
|
<p></p>
|
|
Afterwards close the Cygwin shell and reopen it again for the installation of <code>musrfit</code>.
|
|
<p></p>
|
|
<h2><a name="A_4.2_61_61musrfit_61_61"></a> 4.2 <code><b>musrfit</b></code> </h2>
|
|
First, the most recent source code should be downloaded. First, the most recent source code should be downloaded. The preferred way of doing so is to clone the musrfit repository via git. Assuming the code should be located in ~/musrfit this is achieved most easily calling from the terminal
|
|
<pre class="bash">
|
|
cd
|
|
git clone https://bitbucket.org/muonspin/musrfit.git
|
|
</pre>
|
|
or
|
|
<pre class="bash">
|
|
cd
|
|
git clone git://gitorious.psi.ch/nemu/musrfit.git
|
|
</pre>
|
|
<p></p>
|
|
<strong>Note:</strong> musrfit has moved from svn to git. In case you still have an <em>old</em> svn version of musrfit, it is advised to remove it first. For svn users: for a smooth transition from svn to git, please check the following link:
|
|
<a href="http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet/" target="_top">Git for Subversion Users - A Cheat Sheet</a>.
|
|
<p></p>
|
|
If the repository had been checked out already before, one can update the local copy using:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
git pull
|
|
</pre>
|
|
<p></p>
|
|
<span class='foswikiRedFG'>As an alternative (if git is not available)</span>, the source code can also be downloaded from the following web-page: <a href="https://bitbucket.org/muonspin/musrfit/downloads" target="_top">musrfit at bitbucket</a>.
|
|
<p></p>
|
|
After the source-code extraction the <strong>autogen.sh</strong> script is called to prepare the build environment. If it has been executed successfully the <strong>configure</strong> script should be ready to collect all the information needed to create the Makefiles. <span class='foswikiRedFG'>If <code>musrfit</code> should support <code>NeXus</code> data files this has to be enabled by specifying the <nobr><b>--enable-static</b></nobr> <nobr><b>--enable-NeXus</b></nobr> switches when calling <strong>configure</strong>.</span> For an overview of all available options just call <code>./configure --help</code>. Besides the standard options there are a few special options which should be mentioned here:
|
|
<p></p> <dl>
|
|
<dt> --prefix </dt><dd> Specify the installation prefix, e.g. /opt/root-system (<em>by default: /usr/local</em>)
|
|
</dd> <dt> --with-rootsys </dt><dd> Specify the top of the <code>ROOT</code> installation directory, e.g. /opt/root-system
|
|
</dd> <dt> --with-fftw3 </dt><dd> Specify the prefix of the <code>FFTW3</code> installation. e.g. /usr/local or /usr
|
|
</dd> <dt> --with-gsl </dt><dd> Set the prefix of the <code>GSL</code> installation, e.g. /usr/local or /usr
|
|
</dd> <dt> --with-boostinc </dt><dd> Set the path to the header files of the <code>Boost</code> installation, e.g. /usr/local/include or /usr/include
|
|
</dd> <dt> --with-hdf4 </dt><dd> Set the prefix of the <code>HDF4</code> installation, e.g. /usr/local (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-hdf5 </dt><dd> Set the prefix of the <code>HDF5</code> installation, e.g. /usr (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-nexus </dt><dd> Set the prefix of the <code>NeXus</code> installation, e.g. /usr/local (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-qt3 </dt><dd> Set the prefix of the <code>Qt3</code> installation, e.g. /usr/lib/qt-3.3 (<em>only useful in conjunction with building <code>musrgui</code></em>)
|
|
</dd> <dt> --with-qt4 </dt><dd> Set the prefix of the <code>Qt4</code> installation, e.g. /usr/lib/qt47 (<em>only useful in conjunction with building <code>musredit</code></em>)
|
|
</dd> <dt> --enable-NeXus </dt><dd> Enable the support of <code>NeXus</code> data files (<em>requires the <code>HDF4</code>, <code>HDF5</code> and <code>NeXus</code> libraries to be installed</em>).
|
|
</dd> <dt> --disable-editor </dt><dd> Disable the integrated building of <code>musredit</code>/<code>musrgui</code>.
|
|
</dd> <dt> --disable-omp </dt><dd> Switches off the <a href="http://en.wikipedia.org/wiki/OpenMP" target="_top">OpenMP</a> features of <code>musrfit</code> (parallelization of the χ<sup>2</sup> calculation when compiled with GCC ≥ 4.2)
|
|
</dd></dl>
|
|
<p></p>
|
|
Normally it should not be necessary to make use of any of the options except for specifying the installation path with <strong>--prefix</strong>. The other paths should be detected automatically. If this does not work for some reason the <strong>configure</strong> script will terminate and ask for the information.
|
|
When the <strong>configure</strong> script has been called successfully everything is ready for building the <code>musrfit</code> libraries and executables. A standard installation sequence (without <code>NeXus</code> support) might then look like:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
sh autogen.sh
|
|
./configure --prefix=$ROOTSYS
|
|
make
|
|
make install
|
|
</pre>
|
|
In order to finish the installation of <code>musrfit</code> the paths where <code>musrfit</code> searches for data files should be adjusted in the installed <strong>musrfit_startup.xml</strong> (/cygdrive/c/root/bin/musrfit_startup.xml or C:\root\bin\musrfit_startup.xml). The paths have to obey the <code>POSIX</code> naming convention. For detailed information on this XML file refer to the <a href="MusrFit.html#MusrfitStartupXml">manual</a>.
|
|
<p></p>
|
|
<a name="MusrEditInstallCygwin"></a>
|
|
<h2><a name="A_4.3_61_61musredit_61_61"></a> 4.3 <code><b>musredit</b></code> </h2>
|
|
<span class='foswikiBlueFG'>In the latest version of <code>musrfit</code> the configure script tries to determine automatically if <code>Qt4.5</code> or higher is set up on the machine. In case this is found, the editor <code>musredit</code> is built already together with <code>musrfit</code>. <em>If not</em>, one can either try to call the configure script with the "--with-qt4" option or install this editor separately:</span>
|
|
<pre class="bash">
|
|
cd src/musredit
|
|
qmake-qt4 musredit.pro
|
|
</pre>
|
|
If everything went fine <code>musredit</code> can be compiled and installed:
|
|
<pre class="bash">
|
|
make
|
|
make install
|
|
</pre>
|
|
Eventually, in the installed <strong>musredit_startup.xml</strong> (<strong>/cygdrive/c/root/bin/musredit_startup.xml</strong> or <strong>C:\root\bin\musredit_startup.xml</strong>) the path specifications should be adjusted to match the local <code>musrfit</code> installation. For detailed information on this XML file refer to the <a href="MusrGui.html#MusrguiStartupXml">manual</a>.
|
|
<p></p>
|
|
<hr />
|
|
In case one likes to get the editor started just with starting the X server from the Windows start menu the file <strong>~/.startxwinrc</strong> with the following contents can be created:<pre class="bash">
|
|
#!/bin/sh
|
|
|
|
export DISPLAY=:0.0
|
|
export QTDIR=/usr/lib/qt4
|
|
export ROOTSYS=/cygdrive/c/root
|
|
export PATH=$ROOTSYS/bin:$QTDIR/bin:/usr/i686-pc-cygwin/bin:$PATH
|
|
export MUSRFITPATH=$ROOTSYS/bin
|
|
|
|
musredit &
|
|
</pre>
|
|
<hr />
|
|
<p></p>
|
|
<h2><a name="A_4.4_61_61musrgui_61_61"></a> 4.4 <code><b>musrgui</b></code> </h2>
|
|
If <code>Qt4.5</code> is not available but <code>Qt3</code> is set up <code>musrgui</code> can be installed. For this please follow the instructions for the <a href="#MusrGuiInstallLinux" class="foswikiCurrentTopicLink">musredit installation</a> where simply every <code>musredit</code> occurrence has to be replaced by <code>musrgui</code>, and <code>qt4</code> is replaced by <code>qt3</code>.
|
|
<p></p>
|
|
<h2><a name="A_4.5_Check_of_the_installation"></a> 4.5 Check of the installation </h2>
|
|
In order to perform a quick test for finding out if the installation has been completed successfully, a few msr files together with the corresponding data files can be found in the <code>musrfit</code> source tree at <strong>doc/examples/</strong>.<br>
|
|
If <code>musrgui</code> has been installed, just open one of the <strong>test-*.msr</strong> files in the editor and test the <code>musrfit</code> functionalities. Otherwise, if only the terminal should be used, as an initial test for instance the following could be done:
|
|
<pre class="bash">
|
|
cd doc/examples
|
|
musrview test-histo-ROOT-NPP.msr
|
|
</pre>
|
|
<p></p>
|
|
<h2><a name="A_4.6_Possible_problems"></a> 4.6 Possible problems </h2>
|
|
It might be that especially when running on Windows 7 <code>musredit</code> and <code>musrgui</code> produce errors like a "STATUS_ACCESS_VIOLATION".
|
|
In this case, try to do the following: Close all Cygwin programs (including the terminals and X server) and run from a Windows command prompt (cmd)<pre class="bash">
|
|
C:\cygwin\bin\ash.exe /bin/rebaseall
|
|
</pre>
|
|
If this does not resolve the problem, try to change the compatibility settings of <strong>C:\cygwin\bin\sh.exe</strong> and <strong>C:\cygwin\bin\bash.exe</strong> so that they are executed with administrator privileges.
|
|
<p></p>
|
|
<h1><a name="A_5_Mac_OS_X"></a> 5 Mac OS X </h1>
|
|
<p></p>
|
|
With Mac OS X the situation is up to some extent similar like on MS Windows but still different since Mac OS X is a UNIX system. The similarity is that also on OS X a helping framework—<i>either</i> <code><a href="http://www.macports.org/" target="_top">MacPorts</a></code> <em>or</em> <code><a href="http://www.finkproject.org/" target="_top">Fink</a></code>—which provides open-source software is employed to fulfill the basic software requirements of <code>musrfit</code>. <span class='foswikiRedFG'>In the following, both possibilities (using <code>MacPorts</code> or <code>Fink</code>) are described but it is emphasized here that it should be followed <em>only one of the possible routes</em>.</span>
|
|
<p></p>
|
|
<h2><a name="A_5.1_Requirements_40_61_61MacPorts_61_61_41"></a> 5.1 Requirements (<code><b>MacPorts</b></code>) </h2>
|
|
<h3><a name="A_5.1.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"></a> 5.1.1 Everything but <code><b>ROOT</b></code> and <code><b>NeXus</b></code> </h3>
|
|
Before proceeding with the usage of the <code><a href="http://www.macports.org/" target="_top">MacPorts</a></code> system first a few useful tools provided by Apple together with OS X (on the installation DVD/CDs) should be installed: <dl>
|
|
<dt> <a href="http://developer.apple.com/technology/tools.html" target="_top">Xcode tools</a> </dt><dd> Useful developer tools including for instance the GNU compiler collection. Starting from XCode >= 4.3 the command line tools need to be installed manually.
|
|
</dd> <dt> X11 </dt><dd> The X-window system (automatically installed on 10.5 Leopard and 10.6 Snow Leopard). For 10.7 and higher you also will need to install <code><a href="http://xquartz.macosforge.org/trac" target="_top">XQuartz</a></code>
|
|
</dd></dl>
|
|
<p></p>
|
|
After installing the Xcode tools go to the <a href="http://www.macports.org/install.php" target="_top">MacPorts install page</a>, download the installer for your system and follow the installation instructions on the page. By default the <code>MacPorts</code> system will be installed in <strong>/opt/local</strong>.<br>
|
|
To be sure that the newest version of the software is used a <code>MacPorts</code> upgrade should be performed by typing in a terminal:
|
|
<pre class="bash">
|
|
sudo port -v selfupdate
|
|
</pre>
|
|
<hr />
|
|
<strong>Remark</strong>: <code>MacPorts</code> uses <a href="http://rsync.samba.org/" target="_top">rsync</a> in order to synchronize the list of available packages. It frequently happens that this service is blocked by firewalls. In this case it should be possible to download a local version of the package repository and do the synchronization.
|
|
If this step becomes necessary (<strong>and only then</strong>) it can be done in the following way: <ol>
|
|
<li> Get a local version of the repository:<pre class="bash">
|
|
svn co http://svn.macports.org/repository/macports/trunk/dports ~/dports
|
|
</pre>
|
|
</li> <li> Edit the file <strong>/opt/local/etc/macports/sources.conf</strong>: At the end of the file, comment the line beginning with "rsync://" and add a new line pointing to your local copy, e.g.<pre class="bash">
|
|
file:///Users/username/dports
|
|
</pre>
|
|
</li> <li> Synchronize the packages:<pre class="bash">
|
|
sudo port -v -d sync
|
|
</pre>
|
|
</li></ol>
|
|
<hr />
|
|
Then the <code>MacPorts</code> system should be set up and can be used to install additional software.<br>
|
|
The installation of the software mentioned <a href="#ReqSw" class="foswikiCurrentTopicLink">above</a> is then done in the terminal:
|
|
<pre class="bash">
|
|
sudo port -v install pkgconfig autoconf automake libtool fftw-3 fftw-3-single gsl boost libxml2 qt4-mac
|
|
</pre>
|
|
With <code><b>qt4-mac</b></code>, <code>musredit</code> will be installed. If it happens that you used <code>musrgui</code> in the past, please change over to <code>musredit</code> since there will be <strong>no</strong> further development for <code>musrgui</code> anymore!
|
|
<p></p>
|
|
<h3><a name="A_5.1.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"></a> 5.1.2 Installation of <code><b>NeXus</b></code> requirements (optional) </h3>
|
|
<p></p>
|
|
<span class='foswikiRedFG'>Only if</span> <code>musrfit</code> should support reading data files in the <code>NeXus</code> format the further <a href="#ReqSwNeXus" class="foswikiCurrentTopicLink">required</a> packages are set up:
|
|
<pre class="bash">
|
|
sudo port -v install jpeg6b hdf4 hdf5
|
|
</pre>
|
|
Unfortunately, the <code>minixml</code> and <code>NeXus</code> libraries have to be compiled and installed directly from the source code. Given the respective version numbers of <strong>2.9</strong> and <strong>4.3.2</strong> (which are subject to change with time) this can be achieved for example by:
|
|
<pre class="bash">
|
|
cd
|
|
curl www.msweet.org/files/project3/mxml-2.9.tar.gz -G | tar xz
|
|
cd mxml-2.9
|
|
./configure --prefix=/usr/local
|
|
make
|
|
sudo make install
|
|
cd ..
|
|
curl http://download.nexusformat.org/kits/nexus-4.3.2-20140413svn1919.tar.gz -G | tar xz
|
|
cd nexus-4.3.2-20140413svn1919
|
|
./configure --prefix=/usr/local
|
|
make
|
|
sudo make install
|
|
</pre>
|
|
<p></p>
|
|
<h3><a name="A_5.1.3_61_61ROOT_61_61"></a> 5.1.3 <code><b>ROOT</b></code> </h3>
|
|
For installing the <code>ROOT</code> system there are two <strong>independent</strong> possibilities: <ul>
|
|
<li> Visit the <code>ROOT</code> <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the packed precompiled binary version matching the OS X version. Then unpack the bundle to its final destination (e.g. /opt/root-system).
|
|
</li> <li> If there is no precompiled binary version of <code>ROOT</code> available for your system or e.g. <code>ROOT</code> should be compiled with another version of <code>GCC</code> visit the <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the 'complete source tree for all systems'. Then unpack this source tree to its destination (e.g. /opt/root-system). In case only a single user is working at the machine it might be considerable to change the ownership of the <code>ROOT</code> folder so that the user ("username" in the example) has easy write access to this directory: <pre class="bash">sudo chown -R username:staff /opt/root-system/ </pre> Finally, <code>ROOT</code> can be configured (here using the minimal set of options) and compiled as stated right below: <pre class="bash">
|
|
cd /opt/root-system
|
|
./configure --gminimal --enable-fink --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
make
|
|
</pre> and for Mac OS X 10.9 (Mavericks) for now (beginning 2014, subject to be changed <strong>hopefully</strong> soon): <pre class="bash">
|
|
cd /opt/root-system
|
|
./configure --gminimal --enable-builtin-freetype --enable-fink --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
make
|
|
</pre>
|
|
</li> <li> In case you are just migrating to the latest Mac OS X version (<em>e.g.</em> from 10.7 to 10.8.1) often for a period of a few weeks it is necessary to work with the GIT trunk version of <code>ROOT</code>, <em>i.e.</em> that you have to checkout <code>ROOT</code> via <code>git</code>: <pre class="bash">
|
|
git clone http://root.cern.ch/git/root.git
|
|
</pre> For details see <a href="http://root.cern.ch/drupal/content/installing-root-source" target="_top">Installing ROOT from Source</a>.
|
|
</li></ul>
|
|
<p></p>
|
|
In order to finalize the <code>ROOT</code> installation and to prepare already the installation of <code>musrfit</code> and <code>musrgui</code> / <code>musredit</code> this is a good time for setting necessary environment variables for the use in Mac OS X. Put the following lines (without the comments in parentheses and with the paths adjusted to your local installation) into the file <strong>~/.MacOSX/environment.plist</strong> and <span class='foswikiRedFG'>re-login</span>:<br>
|
|
<pre class="html">
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>MUSRFITPATH</key>
|
|
<string>/opt/root-system/bin</string> (where to find the musrfit executables)
|
|
<key>QTDIR</key>
|
|
<string>/opt/local/lib/qt3mac</string> (where to find Qt3 (for musrgui) or Qt4 (for musredit))
|
|
<key>ROOTSYS</key>
|
|
<string>/opt/root-system</string> (where to find the ROOT system)
|
|
</dict>
|
|
</plist>
|
|
</pre>
|
|
<p></p>
|
|
Additionally, one might want to put a line in <strong>~/.profile</strong> (or <strong>~/.bash_profile</strong>) to look for executables also in the <code>ROOT</code> and <code>Qt</code> binary directories:
|
|
<pre class="bash">
|
|
export PATH=$ROOTSYS/bin:$QTDIR/bin:$PATH
|
|
</pre>
|
|
<p></p>
|
|
<h2><a name="A_5.2_Requirements_40_61_61Fink_61_61_41"></a> 5.2 Requirements (<code><b>Fink</b></code>) </h2>
|
|
<h3><a name="A_5.2.1_Everything_but_61_61ROOT_61_61_and_61_61NeXus_61_61"></a> 5.2.1 Everything but <code><b>ROOT</b></code> and <code><b>NeXus</b></code> </h3>
|
|
Before proceeding with the usage of the <code><a href="http://www.finkproject.org/" target="_top">Fink</a></code> system first a few useful tools provided by Apple together with OS X (on the installation DVD/CDs) should be installed: <dl>
|
|
<dt> <a href="http://developer.apple.com/technology/tools.html" target="_top">Xcode tools</a> </dt><dd> Useful developer tools including for instance the GNU compiler collection
|
|
</dd> <dt> X11 </dt><dd> The X-window-system (automatically installed on 10.5 Leopard and 10.6 Snow Leopard)
|
|
</dd></dl>
|
|
<p></p>
|
|
After installing the Xcode tools go to the <a href="http://www.finkproject.org/download/index.php?phpLang=en" target="_top">Fink download page</a>, download the installer for your system and follow the installation instructions on the page.
|
|
By default the <code>Fink</code> system is installed in <strong>/sw</strong>. After the basic setup make sure that in <strong>/sw/etc/fink.conf</strong> the line starting with <strong>Trees:</strong> reads like:
|
|
<pre>
|
|
Trees: local/main stable/main stable/crypto unstable/main
|
|
</pre>
|
|
After applying the changes above to the configuration file, the <code>Fink</code> core system should be upgraded to its newest version by typing in a terminal:
|
|
<pre class="bash">
|
|
sudo fink selfupdate
|
|
</pre>
|
|
Then the <code>Fink</code> system should be set up and can be used to install additional software.<br>
|
|
The <code>Fink</code> installer package also contains a graphical user interface called <code>FinkCommander</code> and it is suggested to use that for installing the following packages (or packages with revisions close to the following)—it is necessary to compile a few packages from source since no binary packages are available, however, this is done automatically by the <code>FinkCommander</code> after you have chosen the software packages for installation:
|
|
<p></p>
|
|
<code><b>autoconf automake boost1.41.nopython boost1.41.nopython-shlibs fftw3 fftw3-shlibs gsl gsl-shlibs libtool2 libtool2-shlibs libxml2 libxml2-bin libxml2-shlibs pkgconfig qt3mac qt3mac-shlibs</b></code>
|
|
<p></p>
|
|
Under OS X 10.6 Snow Leopard it will not be possible to install <code><b>qt3mac</b></code> since the system is by default a 64-bit system and the old <code><b>qt3-mac</b></code> depends on software which is only available for 32-bit systems. It is suggested to install <code><b>qt4mac</b></code> instead and use <code>musredit</code>.
|
|
<p></p>
|
|
Also, due to some not fulfilled dependencies, it might not be possible to install FFTW3 through Fink. In this case (<span class='foswikiRedFG'>and ONLY in THIS case</span>) simply download the FFTW3 source code from <a href="http://www.fftw.org/download.html" target="_top">its download page</a> and install it from a terminal using the following commands (for the FFTW version 3.x.y):
|
|
<pre class="bash">
|
|
tar xz fftw-3.x.y
|
|
cd fftw-3.x.y
|
|
./configure --enable-single --enable-shared --enable-threads --prefix=/usr/local
|
|
make
|
|
sudo make install
|
|
</pre>
|
|
<p></p>
|
|
Since later on the <code>boost</code> header files should be used and in the standard <code>Fink</code> installation these are found at a version specific location, the later handling will be easier if a symbolic link to this files is created now in the terminal (if it did not exist earlier), e.g.:
|
|
<pre class="bash">
|
|
ln -sf /sw/include/boost-x_yy_z/boost /sw/include/boost
|
|
</pre>
|
|
where <strong>x_yy_z</strong> has to be substituted by the correct version number, e.g. <strong>1_41_0</strong>.
|
|
<p></p>
|
|
<h3><a name="A_5.2.2_Installation_of_61_61NeXus_61_61_requirements_40optional_41"></a> 5.2.2 Installation of <code><b>NeXus</b></code> requirements (optional) </h3>
|
|
<p></p>
|
|
<span class='foswikiRedFG'>Only if</span> <code>musrfit</code> should support reading data files in the <code>NeXus</code> format the further <a href="#ReqSwNeXus" class="foswikiCurrentTopicLink">required</a> packages can be installed through <code>Fink</code>:
|
|
<p></p>
|
|
<code><b>libjpeg hdf hdf5-18 hdf5-18-shlibs</b></code>
|
|
<p></p>
|
|
Unfortunately, the <code>minixml</code> and <code>NeXus</code> libraries have to be compiled and installed directly from the source code. Given the respective version numbers of <strong>2.9</strong> and <strong>4.3.2</strong> (which are subject to change with time) this can be achieved for example by:
|
|
<pre class="bash">
|
|
cd
|
|
curl www.msweet.org/files/project3/mxml-2.9.tar.gz -G | tar xz
|
|
cd mxml-2.9
|
|
./configure --prefix=/usr/local
|
|
make
|
|
sudo make install
|
|
cd ..
|
|
curl http://download.nexusformat.org/kits/nexus-4.3.2-20140413svn1919.tar.gz -G | tar xz
|
|
cd nexus-4.3.2-20140413svn1919
|
|
./configure --prefix=/usr/local
|
|
make
|
|
sudo make install
|
|
</pre>
|
|
<p></p>
|
|
<h3><a name="A_5.2.3_61_61ROOT_61_61"></a> 5.2.3 <code><b>ROOT</b></code> </h3>
|
|
For installing the <code>ROOT</code> system there are some <strong>independent</strong> possibilities: <ul>
|
|
<li> Visit the <code>ROOT</code> <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the packed precompiled binary version matching the OS X version. Then unpack the bundle to its final destination (e.g. /opt/root-system).
|
|
</li> <li> If there is no precompiled binary version of <code>ROOT</code> available for your system or e.g. <code>ROOT</code> should be compiled with another version of <code>GCC</code> visit the <a href="http://root.cern.ch/drupal/content/downloading-root" target="_top">web page</a> and download the 'complete source tree for all systems'. Then unpack this source tree to its destination (e.g. /opt/root-system). In case only a single user is working at the machine it might be considerable to change the ownership of the <code>ROOT</code> folder so that the user ("username" in the example) has easy write access to this directory: <pre class="bash">sudo chown -R username:staff /opt/root-system/ </pre> Finally, <code>ROOT</code> can be configured (here using the minimal set of options) and compiled as stated right below: <pre class="bash">
|
|
cd /opt/root-system
|
|
./configure --gminimal --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
make
|
|
</pre> and for Mac OS X 10.9 (Mavericks) for now (beginning 2014, subject to be changed <strong>hopefully</strong> soon): <pre class="bash">
|
|
cd /opt/root-system
|
|
./configure --gminimal --enable-builtin-freetype --enable-fink --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
|
make
|
|
</pre>
|
|
</li> <li> <code>ROOT</code> is also available through the <code>FinkCommander</code>! Install <strong>root5</strong> or <strong>root5-devel</strong>. However, this versions also have to be compiled locally since there are no binary packages. The manual installation mentioned right above should be preferred in this case.
|
|
</li></ul>
|
|
<p></p>
|
|
In order to finalize the <code>ROOT</code> installation and to prepare already the installation of <code>musrfit</code> and <code>musrgui</code> / <code>musredit</code> this is a good time for setting necessary environment variables for the use in Mac OS X. Put the following lines (without the comments in parentheses and with the paths adjusted to your local installation) into the file <strong>~/.MacOSX/environment.plist</strong> and <span class='foswikiRedFG'>re-login</span>:<br>
|
|
<pre class="html">
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>MUSRFITPATH</key>
|
|
<string>/opt/root-system/bin</string> (where to find the musrfit executables)
|
|
<key>QTDIR</key>
|
|
<string>/sw/lib/qt3mac</string> (where to find Qt3 (for musrgui) or Qt4 (for musredit))
|
|
<key>ROOTSYS</key>
|
|
<string>/opt/root-system</string> (where to find the ROOT system)
|
|
</dict>
|
|
</plist>
|
|
</pre>
|
|
<p></p>
|
|
Additionally, one might want to put a line in <strong>~/.profile</strong> (or <strong>~/.bash_profile</strong>) to look for executables also in the <code>ROOT</code> and <code>Qt</code> binary directories:
|
|
<pre class="bash">
|
|
export PATH=$ROOTSYS/bin:$QTDIR/bin:$PATH
|
|
</pre>
|
|
<p></p>
|
|
<p></p>
|
|
<h2><a name="A_5.3_61_61musrfit_61_61"></a> 5.3 <code><b>musrfit</b></code> </h2>
|
|
First, the most recent source code should be downloaded. First, the most recent source code should be downloaded. The preferred way of doing so is to clone the musrfit repository via git. Assuming the code should be located in ~/musrfit this is achieved most easily calling from the terminal
|
|
<p></p>
|
|
<pre class="bash">
|
|
cd
|
|
git clone https://bitbucket.org/muonspin/musrfit.git
|
|
</pre>
|
|
or
|
|
<pre class="bash">
|
|
cd
|
|
git clone git://gitorious.psi.ch/nemu/musrfit.git
|
|
</pre>
|
|
<p></p>
|
|
<p></p>
|
|
<strong>Note:</strong> musrfit has moved from svn to git. In case you still have an <em>old</em> svn version of musrfit, it is advised to remove it first. For svn users: for a smooth transition from svn to git, please check the following link:
|
|
<a href="http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet/" target="_top">Git for Subversion Users - A Cheat Sheet</a>.
|
|
<p></p>
|
|
If a local repository clone is already present, one can update it using:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
git pull
|
|
</pre>
|
|
<p></p>
|
|
<span class='foswikiRedFG'>As an alternative (if git is not available)</span>, the source code can also be downloaded from the following web-page: <a href="https://bitbucket.org/muonspin/musrfit/downloads" target="_top">musrfit at bitbucket</a>.
|
|
<p></p>
|
|
After the source-code extraction the <strong>autogen.sh</strong> script is called to prepare the build environment. If it has been executed successfully the <strong>configure</strong> script should be ready to collect all the information needed to create the Makefiles. <span class='foswikiRedFG'>If <code>musrfit</code> should support <code>NeXus</code> data files this has to be enabled by specifying the <strong>--enable-NeXus</strong> switch when calling <strong>configure</strong>.</span> For an overview of all available options just call <code>./configure --help</code>. Besides the standard options there are a few special options which should be mentioned here:
|
|
<p></p> <dl>
|
|
<dt> --prefix </dt><dd> Specify the installation prefix, e.g. /opt/root-system (<em>by default: /usr/local</em>)
|
|
</dd> <dt> --with-rootsys </dt><dd> Specify the top of the <code>ROOT</code> installation directory, e.g. /opt/root-system
|
|
</dd> <dt> --with-fftw3 </dt><dd> Specify the prefix of the <code>FFTW3</code> installation. e.g. /sw
|
|
</dd> <dt> --with-gsl </dt><dd> Set the prefix of the <code>GSL</code> installation, e.g. /sw
|
|
</dd> <dt> --with-boostinc </dt><dd> Set the path to the header files of the <code>Boost</code> installation, e.g. /sw/include
|
|
</dd> <dt> --with-hdf4 </dt><dd> Set the prefix of the <code>HDF4</code> installation, e.g. /sw (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-hdf5 </dt><dd> Set the prefix of the <code>HDF5</code> installation, e.g. /sw (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-nexus </dt><dd> Set the prefix of the <code>NeXus</code> installation, e.g. /usr/local (<em>only useful in conjunction with the <code>NeXus</code> support</em>)
|
|
</dd> <dt> --with-qt3 </dt><dd> Set the prefix of the <code>Qt3</code> installation, e.g. /opt/local/lib/qt-3.3 (<em>only useful in conjunction with building <code>musrgui</code></em>)
|
|
</dd> <dt> --with-qt4 </dt><dd> Set the prefix of the <code>Qt4</code> installation, e.g. /opt/local/lib/qt-4.7 (<em>only useful in conjunction with building <code>musredit</code></em>)
|
|
</dd> <dt> --enable-NeXus </dt><dd> Enable the support of <code>NeXus</code> data files (<em>requires the <code>HDF4</code>, <code>HDF5</code> and <code>NeXus</code> libraries to be installed</em>).
|
|
</dd> <dt> --disable-editor </dt><dd> Disable the integrated building of <code>musredit</code>/<code>musrgui</code>.
|
|
</dd> <dt> --disable-omp </dt><dd> Switches off the <a href="http://en.wikipedia.org/wiki/OpenMP" target="_top">OpenMP</a> features of <code>musrfit</code> (parallelization of the χ<sup>2</sup> calculation when compiled with GCC ≥ 4.2)
|
|
</dd></dl>
|
|
<p></p>
|
|
Normally it should not be necessary to make use of any of the options except for specifying the installation path with <strong>--prefix</strong>. The other paths should be detected automatically. If this does not work for some reason the <strong>configure</strong> script will terminate and ask for the information.
|
|
When the <strong>configure</strong> script has been called successfully everything is ready for building the <code>musrfit</code> libraries and executables. A standard installation sequence (without <code>NeXus</code> support) might then look like:
|
|
<pre class="bash">
|
|
cd musrfit
|
|
sh autogen.sh
|
|
./configure --prefix=$ROOTSYS
|
|
make
|
|
make install
|
|
</pre>
|
|
In order to finish the installation of <code>musrfit</code> the paths where <code>musrfit</code> searches for data files should be adjusted in the installed <strong>musrfit_startup.xml</strong> ($ROOTSYS/bin/musrfit_startup.xml). For detailed information on this XML file refer to the <a href="MusrFit.html#MusrfitStartupXml">manual</a>.
|
|
<p></p>
|
|
<a name="MusrGuiInstall"></a>
|
|
<h2><a name="A_5.4_61_61musredit_61_61"></a> 5.4 <code><b>musredit</b></code> </h2>
|
|
<span class='foswikiBlueFG'>In the latest version of <code>musrfit</code> the configure script tries to determine automatically if <code>Qt4.5</code> or higher is set up on the machine. In case this is found, the editor <code>musredit</code> is built already together with <code>musrfit</code>. <em>If not</em>, one can either try to call the configure script with the "--with-qt4" option or install this editor separately:</span>
|
|
<pre class="bash">
|
|
cd src/musredit
|
|
qmake musredit.pro
|
|
</pre>
|
|
If everything went fine <code>musredit</code> can be compiled and installed:
|
|
<pre class="bash">
|
|
make
|
|
make install
|
|
</pre>
|
|
The last command copies <strong>musredit.app</strong> to the standard program directory <strong>/Applications</strong> and the <strong>musredit_startup.xml</strong> to <strong>$ROOTSYS/bin/musredit_startup.xml</strong>. Eventually, in the installed <strong>musredit_startup.xml</strong> the path specifications have to be adjusted to match the local <code>musrfit</code> installation. For detailed information on this XML file refer to the <a href="MusrGui.html#MusrguiStartupXml">manual</a>.
|
|
<p></p>
|
|
<h2><a name="A_5.5_61_61musrgui_61_61"></a> 5.5 <code><b>musrgui</b></code> </h2>
|
|
If <code>Qt3</code> is set up the installation of the <code>musrfit</code> editor can be done as follows from within the shell:
|
|
<pre class="bash">
|
|
cd src/musrgui
|
|
qmake musrgui.pro
|
|
make
|
|
make install
|
|
</pre>
|
|
The last command copies <strong>musrgui.app</strong> to the standard program directory <strong>/Applications</strong> <a name="FootNote5text"></a><span class='FootNoteTextLink' title='In the case <code><b>qt3-mac</b></code> has not been installed, there will be no <strong>musrgui.app</strong> but only the executable <strong>musrgui</strong> which will be placed in the directory <strong>$ROOTSYS/bin</strong> and has to be called from the terminal.'><a href="#FootNote5note" class="foswikiCurrentTopicLink">(4)</a></span> and the <strong>musrgui_startup.xml</strong> to <strong>$ROOTSYS/bin/musrgui_startup.xml</strong>. Eventually, in the installed <strong>musrgui_startup.xml</strong> the path-specifications have to be adjusted to match the local <code>musrfit</code> installation. For detailed information on this XML file refer to the <a href="MusrGui.html#MusrguiStartupXml">manual</a>.
|
|
<p></p>
|
|
Under some circumstances it might happen, that if <code>musrgui</code> was called from <code>Finder</code> the necessary libraries for executing <code>musrfit</code> could not be found.
|
|
In that case, the only workaround for the moment is to export the environment variable <strong>DYLD_LIBRARY_PATH</strong> in the shell and call <code>musrgui</code> from a terminal!
|
|
In order to accomplish that, add the following lines to <strong>~/.profile</strong> and call <code>musrgui</code> with the specified command (e.g. mgui):
|
|
<pre class="bash">
|
|
export DYLD_LIBRARY_PATH=/opt/root-system/lib:/sw/lib:$DYLD_LIBRARY_PATH
|
|
alias mgui='/Applications/musrgui.app/Contents/MacOS/musrgui'
|
|
</pre>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
Notes
|
|
<p></p>
|
|
<a name="FootNote5note"></a><span class="FootNoteLabel"><a href="#FootNote5text" class="foswikiCurrentTopicLink"> <strong>4</strong> </a></span>: <span class="FootNote">In the case <code><b>qt3-mac</b></code> has not been installed, there will be no <strong>musrgui.app</strong> but only the executable <strong>musrgui</strong> which will be placed in the directory <strong>$ROOTSYS/bin</strong> and has to be called from the terminal.</span>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<hr />
|
|
<p></p>
|
|
<h2><a name="A_5.6_Check_of_the_installation"></a> 5.6 Check of the installation </h2>
|
|
In order to perform a quick test for finding out if the installation has been completed successfully, a few msr files together with the corresponding data files can be found in the <code>musrfit</code> source tree at <strong>doc/examples/</strong>.<br>
|
|
If <code>musrgui</code> has been installed, just open one of the <strong>test-*.msr</strong> files in the editor and test the <code>musrfit</code> functionalities. Otherwise, if only the terminal should be used, as an initial test for instance the following could be done:
|
|
<pre class="bash">
|
|
cd doc/examples
|
|
musrview test-histo-ROOT-NPP.msr
|
|
</pre>
|
|
<p></p>
|
|
-- <a href="http://www.fsf.org/register_form?referrer=8369" target="_top">BMW</a> & <a href="http://lmu.web.psi.ch/lem/group.html" target="_top">AS</a> </div>
|
|
<div class="foswikiContentFooter"></div><!-- -->
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- -->
|
|
<span class='foswikiClear'></span>
|
|
<div class="foswikiMetaData foswikiHideOnPrint foswikiMetaDataNotAllowed">
|
|
<div class="jqTabPane jqTabPanePlain {select:'1', autoMaxExpand:false, animate:true, minHeight:230}">
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- --><!-- -->
|
|
<!-- -->
|
|
<!-- --><!-- -->
|
|
<!-- --><!-- -->
|
|
<!-- -->
|
|
</div><!-- //ENDTABPANE -->
|
|
</div>
|
|
<!-- -->
|
|
<!-- -->
|
|
<div class="foswikiFormSteps">
|
|
<a name="topic-actions"></a>
|
|
<div class="patternTopicActions foswikiFormStep">
|
|
<span class="patternActionButtons"><span><a href='https://intranet.psi.ch/wiki/bin/edit/MUSR/MusrFitSetup?t=1418910329' rel='nofollow' title='Edit this topic text' accesskey='e'><span class='foswikiAccessKey'>E</span>dit</a></span><span class='foswikiSeparator'> | </span><span class="foswikiRequiresChangePermission"><a href='https://intranet.psi.ch/wiki/bin/attach/MUSR/MusrFitSetup' rel='nofollow' title='Attach an image or document to this topic' accesskey='a'><span class='foswikiAccessKey'>A</span>ttach</a></span><span class='foswikiSeparator'> | </span><span><a href='MusrFitSetupc99a.html?cover=print;cover=print' rel='nofollow' title='Printable version of this topic' accesskey='p'><span class='foswikiAccessKey'>P</span>rint version</a></span><span class='foswikiSeparator'> | </span><span><a href='https://intranet.psi.ch/print/php/pdf.php?url=MUSR/MusrFitSetup?cover=print' title='PDF version of this topic'>PDF</a></span><span class='foswikiSeparator'> | </span><span><span class="foswikiRequiresChangePermission"><a href='https://intranet.psi.ch/wiki/bin/oops/MUSR/MusrFitSetup?template=oopshistory' rel='nofollow' title='View total topic history' accesskey='h'><span class='foswikiAccessKey'>H</span>istory</a></span>: r60 <a rel="nofollow" href="https://intranet.psi.ch/wiki/bin/compare/MUSR/MusrFitSetup?rev1=59;rev2=60"><</a> <a rel="nofollow" href="https://intranet.psi.ch/MUSR/MusrFitSetup?rev=59">r59</a> <a rel="nofollow" href="https://intranet.psi.ch/wiki/bin/compare/MUSR/MusrFitSetup?rev1=58;rev2=59"><</a> <a rel="nofollow" href="https://intranet.psi.ch/MUSR/MusrFitSetup?rev=58">r58</a> <a rel="nofollow" href="https://intranet.psi.ch/wiki/bin/compare/MUSR/MusrFitSetup?rev1=57;rev2=58"><</a> <a rel="nofollow" href="https://intranet.psi.ch/MUSR/MusrFitSetup?rev=57">r57</a></span><span class='foswikiSeparator'> | </span><span><a href='https://intranet.psi.ch/MUSR/MusrFitSetup?template=backlinksweb' rel='nofollow' title='Search the MUSR Web for topics that link to here' accesskey='b'><span class='foswikiAccessKey'>B</span>acklinks</a></span><span class='foswikiSeparator'> | </span><span><a href='https://intranet.psi.ch/MUSR/MusrFitSetup?raw=on' rel='nofollow' title='View without formatting' accesskey='v'><span class='foswikiAccessKey'>V</span>iew wiki text</a></span><span class='foswikiSeparator'> | </span><span><a href='https://intranet.psi.ch/MUSR/MusrFitSetup?refresh=on' title='Refresh images and LaTeX charts'>Refresh</a></span><span class='foswikiSeparator'> | </span><span><a href='https://intranet.psi.ch/MUSR/MusrFitSetup?template=more&maxrev=60&currrev=60' rel='nofollow' title='Delete or rename this topic; set parent topic; view and compare revisions' accesskey='m'><span class='foswikiAccessKey'>M</span>ore topic actions</a></span></span>
|
|
</div>
|
|
</div></div><div class="patternInfo"><span class="patternRevInfo">Topic revision: r60 - 25 Oct 2014, <a href="https://intranet.psi.ch/Main/AndreasSuter">AndreasSuter</a></span></div>
|
|
</div>
|
|
</div><div id="patternSideBar"><div id="patternClearHeaderLeft"></div>
|
|
<div id="patternSideBarContents">
|
|
<div class="patternLeftBarPersonal">
|
|
<ul><li class="patternLogIn"><a href="https://intranet.psi.ch/wiki/bin/logon/MUSR/MusrFitSetup">Log In</a> or <a href="https://intranet.psi.ch/System/UserRegistration">Register</a></li></ul>
|
|
</div>
|
|
<p></p>
|
|
<p></p>
|
|
<b>PSI Webs</b> <ul>
|
|
<li> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/psi.png" width="16" height="16" alt="psi" /></span> <a href="https://intranet.psi.ch/Main/WebHome">Main</a>
|
|
</li> <li> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/psi.png" width="16" height="16" alt="psi" /></span> <a href="https://intranet.psi.ch/Main/WebList">weitere Webs</a>
|
|
</li></ul>
|
|
<hr />
|
|
<b>System Webs</b> <ul>
|
|
<li> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/foswiki.png" width="16" height="16" alt="foswiki" /></span> <a href="https://intranet.psi.ch/Sandbox/WebHome">Sandbox</a>
|
|
</li> <li> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/foswiki.png" width="16" height="16" alt="foswiki" /></span> <a href="https://intranet.psi.ch/System/WebHome">Documentation</a>
|
|
</li></ul>
|
|
<hr /> <ul>
|
|
<li> <a href="https://intranet.psi.ch/MUSR/WebCreateNewTopic?parent=MusrFitSetup" target="_top"><span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/newtopic.png" width="16" height="16" alt="newtopic" /></span> Create New Topic</a>
|
|
</li> <li> <a href="WebTopicList.html"> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/index.png" width="16" height="16" alt="index" /></span> Show All Topics</a>
|
|
</li> <li> <a href="WebSearch.html"> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/searchtopic.png" width="16" height="16" alt="searchtopic" /></span> Search in Topics</a>
|
|
</li> <li> <a href="WebChanges.html"> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/changes.png" width="16" height="16" alt="changes" /></span> Recent Changes</a>
|
|
</li> <li> <a href="WebNotify.html"> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/notify.png" width="16" height="16" alt="notify" /></span> Define Notifications</a>
|
|
</li></ul>
|
|
<p></p>
|
|
</div></div>
|
|
</div>
|
|
<div class="clear"> </div>
|
|
</div></div><div id="patternTopBar">
|
|
<div id="patternTopBarContentsWrapper">
|
|
<div id="patternTopBarContents"><table border="0" cellpadding="0" cellspacing="0" style="width:100%" summary="">
|
|
<tr><td valign="middle"><span id="foswikiLogo" class="foswikiImage"><a href="WebHome.html"><img src="../pub/Main/WebPreferences/psi_logo_150.gif" border="0" alt="Paul Scherrer Institut" style="border:none; margin: -8px 0 0 15px;" /></a></span></td>
|
|
<td align="right" valign="top" class="patternMetaMenu" id="psimetanav">
|
|
<p></p> <ul>
|
|
<li> <form name="quickSearchForm" id="solrSearchForm" action="https://intranet.psi.ch/PSI/Search"><input type="hidden" name="filter" value="web:MUSR" /><input type="text" class="foswikiInputField" id="quickSearchBox" name="search" value="" size="18" /><input type="hidden" name="scope" value="all" /><!-- <input type="hidden" name="web" value="MUSR" /> --> <noscript> <input type="submit" size="5" class="foswikiButton" name="submit" value="Search" /> </noscript><input type="image" class="searchsubmit" alt="Search" value="Suche..." name="sa" src="../webbase/img/search.png"> </form>
|
|
</li> <li> <form name="changeLanguage" action="https://intranet.psi.ch/wiki/bin/oops/MUSR/MusrFitSetup" method="get"> <input type="hidden" name="redirectto" value="/MUSR/MusrFitSetup?cover=print" /> <select name="language" class="foswikiSelect" onchange="document.changeLanguage.submit()"> <option value="de">Deutsch</option> <option selected="selected" value="en">English</option></select> <input type="hidden" name="template" value="oopslanguagechanged" /> <noscript> <input class="foswikiButton" type="submit" value="Change language" /> </noscript> </form>
|
|
</li></ul>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
</td></tr></table>
|
|
</div><!--/patternTopBarContents-->
|
|
</div><!--/patternTopBarContentsWrapper-->
|
|
</div><!-- /patternTopBar--><div id="patternBottomBar"><div id="patternBottomBarContents"><div id="patternWebBottomBar">Ideas, requests, problems regarding <a href="https://intranet.psi.ch/Main/WebHome">PSI Wiki</a>? <a href="mailto:psi.intranet@psi.ch?subject=PSI Wiki%20Feedback%20on%20MUSR.MusrFitSetup">Send feedback</a></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div></body>
|
|
<!-- Mirrored from intranet.psi.ch/MUSR/MusrFitSetup?cover=print by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 18 Dec 2014 13:46:11 GMT -->
|
|
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
|
|
</html>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p> |