updated of the offline docu.

This commit is contained in:
2025-06-09 09:10:49 +02:00
parent 0943f1f061
commit 0cde84d756
63 changed files with 6618 additions and 22247 deletions

View File

@ -1,90 +1,49 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.9.5 documentation</title>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.9.9 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=7a5cd723" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=4320943d"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
<link href="_static/style.css" rel="stylesheet" type="text/css">
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> musrfit
<a href="index.html" class="icon icon-home">
musrfit
</a>
<div class="version">
1.9
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
@ -121,70 +80,32 @@
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">musrfit</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs</li>
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/setup-dks.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="setting-up-musrfit-dks-high-speed-fitting-with-gpu-s">
<span id="setup-dks"></span><span id="index-0"></span><h1>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs<a class="headerlink" href="#setting-up-musrfit-dks-high-speed-fitting-with-gpu-s" title="Permalink to this headline"></a></h1>
<section id="setting-up-musrfit-dks-high-speed-fitting-with-gpu-s">
<span id="setup-dks"></span><span id="index-0"></span><h1>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs<a class="headerlink" href="#setting-up-musrfit-dks-high-speed-fitting-with-gpu-s" title="Link to this heading"></a></h1>
<p>In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially <code class="docutils literal notranslate"><span class="pre">musrfit.</span></code>
This allows now to analyze histogram sets of high field spectrometers like <code class="docutils literal notranslate"><span class="pre">HAL-9500</span></code> at PSI without
the <em>error-prone</em> RRF fitting (see U. Locans and A. Suter,
@ -195,37 +116,37 @@ allows Apple macOS users to speed up their fitting code on the CPU. Currently it
to get <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> multi-threaded under macOS since Apple doesnt be default support <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code>. <code class="docutils literal notranslate"><span class="pre">DKS</span></code>
enables <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> to utilize <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> instead which is present on macOS by default.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
<p class="admonition-title">Warning</p>
<p>Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
appropriate server with a sufficiently strong power supply!</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">However, the current <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> version doesnt yet support all theory functions on the GPU.
<p class="admonition-title">Note</p>
<p>However, the current <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> version doesnt yet support all theory functions on the GPU.
In case the theory function is not yet available for the GPU, <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> will fall back to the CPU implementation.</p>
</div>
<p>Conceptually the setup of <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> is as following:</p>
<ol class="arabic simple">
<li>install the latest hardware driver for your graphic card.</li>
<li>install the GPU SDK which enables number crunching (<code class="docutils literal notranslate"><span class="pre">CUDA</span></code> for NVIDIA, <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> for AMD)</li>
<li>install <code class="docutils literal notranslate"><span class="pre">DKS</span></code></li>
<li>install the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version which is <code class="docutils literal notranslate"><span class="pre">DKS</span></code> ready</li>
<li><p>install the latest hardware driver for your graphic card.</p></li>
<li><p>install the GPU SDK which enables number crunching (<code class="docutils literal notranslate"><span class="pre">CUDA</span></code> for NVIDIA, <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> for AMD)</p></li>
<li><p>install <code class="docutils literal notranslate"><span class="pre">DKS</span></code></p></li>
<li><p>install the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version which is <code class="docutils literal notranslate"><span class="pre">DKS</span></code> ready</p></li>
</ol>
<p>In the following the description for the installation of <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for the following systems will be discussed in some more detail:</p>
<ul class="simple">
<li>NVIDIA Tesla K40c</li>
<li>AMD Graphic Card (Radeon R9 390X)</li>
<li>macOS in order to get <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support</li>
<li><p>NVIDIA Tesla K40c</p></li>
<li><p>AMD Graphic Card (Radeon R9 390X)</p></li>
<li><p>macOS in order to get <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support</p></li>
</ul>
<p>The usage of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> with GPU acceleration and <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support is described in the
<a class="reference internal" href="user-manual.html#user-manual"><span class="std std-ref">User manual of the μSR data analysis software musrfit</span></a>. The additional
<code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> are found <a class="reference internal" href="user-manual.html#msr-commands-block-dks"><span class="std std-ref">here</span></a>.</p>
<div class="section" id="setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">
<span id="index-1"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a Tesla K40c (NVIDIA)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia" title="Permalink to this headline"></a></h2>
<section id="setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">
<span id="index-1"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a Tesla K40c (NVIDIA)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia" title="Link to this heading"></a></h2>
<p>It is assumed that the Tesla K40c is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems
see the card, enter the following command in the terminal:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep NVIDIA
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>lspci<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>NVIDIA
</pre></div>
</div>
<p>The response should look something like</p>
@ -233,100 +154,100 @@ see the card, enter the following command in the terminal:</p>
</pre></div>
</div>
<p>which means that the OS physically recognizes your card.</p>
<div class="section" id="driver-installation-for-the-tesla-k40c">
<h3>Driver Installation for the Tesla K40c<a class="headerlink" href="#driver-installation-for-the-tesla-k40c" title="Permalink to this headline"></a></h3>
<section id="driver-installation-for-the-tesla-k40c">
<h3>Driver Installation for the Tesla K40c<a class="headerlink" href="#driver-installation-for-the-tesla-k40c" title="Link to this heading"></a></h3>
<p>Next, you will need to download and install the driver for your card. Select the proper operating system,
card, etc. from the <a class="reference external" href="http://www.nvidia.com/Download/index.aspx?lang=en-us">NVIDIA download center</a>. At PSI
we are running currently Red Hat Enterprise Linux 7.x (RHEL) for which we will get a <code class="docutils literal notranslate"><span class="pre">rpm</span></code> (something like
<code class="docutils literal notranslate"><span class="pre">nvidia-diag-driver-local-repo-rhel7-375.66-1.x86_64.rpm</span></code>). Install it and make sure there is no conflict
with the nouveau driver of the system.</p>
</div>
<div class="section" id="installation-of-cuda">
<span id="index-2"></span><h3>Installation of CUDA<a class="headerlink" href="#installation-of-cuda" title="Permalink to this headline"></a></h3>
</section>
<section id="installation-of-cuda">
<span id="index-2"></span><h3>Installation of CUDA<a class="headerlink" href="#installation-of-cuda" title="Link to this heading"></a></h3>
<p>Download the <a class="reference external" href="https://developer.nvidia.com/cuda-downloads">CUDA SDK</a> form NVIDIA for your system. Again,
for the RHEL 7.x this is an <code class="docutils literal notranslate"><span class="pre">rpm</span></code>. After the installation of the rpm you should reboot your machine.
Afterwards you are ready for the installation of <code class="docutils literal notranslate"><span class="pre">DKS</span></code>.</p>
</div>
<div class="section" id="installation-of-dks">
<span id="index-3"></span><h3>Installation of DKS<a class="headerlink" href="#installation-of-dks" title="Permalink to this headline"></a></h3>
</section>
<section id="installation-of-dks">
<span id="index-3"></span><h3>Installation of DKS<a class="headerlink" href="#installation-of-dks" title="Link to this heading"></a></h3>
<p>For the following list of commands the <code class="docutils literal notranslate"><span class="pre">'$'</span></code> will be given as the command prompt. <em>Do not enter it!</em>
Also some comments will be added starting with a <code class="docutils literal notranslate"><span class="pre">'#'</span></code> which can be omitted. They are only there to
explain what is going on. <code class="docutils literal notranslate"><span class="pre">DKS</span></code> stands for Dynamical Kernel Scheduler and provides a thin interface
allowing host applications to incorporate GPUs and other hardware accelerators.</p>
<p>Details can be found in the papers listed <a class="reference internal" href="cite.html#cite"><span class="std std-ref">here</span></a>, or on the <a class="reference external" href="https://gitlab.psi.ch/uldis_l/DKS/wikis/home">DKS wiki page</a>.</p>
<p>Details can be found in the papers listed <a class="reference internal" href="cite.html#cite"><span class="std std-ref">here</span></a>.</p>
<p>In brief the installation should be something like this:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># go to whatever directory you would like to clone/install DKS</span>
<span class="c1"># For macOS DKS will likely to got to $HOME/Applications to be consistent with the musrfit docu for macOS</span>
$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps
$ git clone https://gitlab.psi.ch/uldis_l/DKS.git
$ <span class="nb">cd</span> DKS
$ mkdir build
$ <span class="nb">cd</span> build
$ cmake ../ -DENABLE_MUSR<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span>../exec
$ cmake --build ./ --clean-first
$ make install
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span><span class="nv">$HOME</span>/Apps
$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>git://gitea.psi.ch:LMU/DKS.git
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>DKS
$<span class="w"> </span>mkdir<span class="w"> </span>build
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>build
$<span class="w"> </span>cmake<span class="w"> </span>../<span class="w"> </span>-DENABLE_MUSR<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DCMAKE_INSTALL_PREFIX<span class="o">=</span>../exec
$<span class="w"> </span>cmake<span class="w"> </span>--build<span class="w"> </span>./<span class="w"> </span>--clean-first
$<span class="w"> </span>make<span class="w"> </span>install
</pre></div>
</div>
<p>Since <code class="docutils literal notranslate"><span class="pre">DKS</span></code> is installed in a non-standard path, a couple of additional small steps are required.
This will be different for Linux compared to macOS.</p>
<p>For <strong>Linux:</strong></p>
<p>add the <code class="docutils literal notranslate"><span class="pre">DKS</span></code> library path to <code class="docutils literal notranslate"><span class="pre">/etc/ld.so.conf.d/musrfit-x86_64.conf</span></code> and execute as super user</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/ldconfig
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>/sbin/ldconfig
</pre></div>
</div>
<p>For <strong>macOS:</strong></p>
<p>add the <code class="docutils literal notranslate"><span class="pre">DKS</span></code> path to <code class="docutils literal notranslate"><span class="pre">$HOME/.profile</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DKS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/DKS/exec
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$DKS</span>/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">DKS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/DKS/exec
<span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$DKS</span>/lib:<span class="nv">$LD_LIBRARY_PATH</span>
launchctl setenv DKS <span class="nv">$DKS</span>
launchctl setenv LD_LIBRARY_PATH <span class="nv">$LD_LIBRARY_PATH</span>
launchctl<span class="w"> </span>setenv<span class="w"> </span>DKS<span class="w"> </span><span class="nv">$DKS</span>
launchctl<span class="w"> </span>setenv<span class="w"> </span>LD_LIBRARY_PATH<span class="w"> </span><span class="nv">$LD_LIBRARY_PATH</span>
</pre></div>
</div>
</div>
<div class="section" id="installation-of-musrfit-for-dks">
<span id="musrfit-dks-install"></span><h3>Installation of musrfit for DKS<a class="headerlink" href="#installation-of-musrfit-for-dks" title="Permalink to this headline"></a></h3>
</section>
<section id="installation-of-musrfit-for-dks">
<span id="musrfit-dks-install"></span><h3>Installation of musrfit for DKS<a class="headerlink" href="#installation-of-musrfit-for-dks" title="Link to this heading"></a></h3>
<p>Most of the installation steps are the same as described for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> without GPU support.
Here only the differences are explained. First checkout <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>, then you will need to
switch the working branch which is done by</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
$ git checkout dks6
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span><span class="nv">$HOME</span>/Apps/musrfit
$<span class="w"> </span>git<span class="w"> </span>checkout<span class="w"> </span>dks6
</pre></div>
</div>
<div class="section" id="install-via-cmake">
<h4>Install via cmake<a class="headerlink" href="#install-via-cmake" title="Permalink to this headline"></a></h4>
<section id="install-via-cmake">
<h4>Install via cmake<a class="headerlink" href="#install-via-cmake" title="Link to this heading"></a></h4>
<p>There is on more configuration switch</p>
<dl class="docutils">
<dt><strong>-Ddks=&lt;value&gt;</strong></dt>
<dd>it allows to enable/disable <code class="docutils literal notranslate"><span class="pre">DKS</span></code> support. The default is <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=1</span></code>, <em>i.e.</em> enabled. To disable use <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=0</span></code>.</dd>
<dl class="simple">
<dt><strong>-Ddks=&lt;value&gt;</strong></dt><dd><p>it allows to enable/disable <code class="docutils literal notranslate"><span class="pre">DKS</span></code> support. The default is <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=1</span></code>, <em>i.e.</em> enabled. To disable use <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=0</span></code>.</p>
</dd>
</dl>
<p>For a typical setup on a RHEL or macOS system it could look like this</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -DASlibs<span class="o">=</span><span class="m">1</span> -DBMWlibs<span class="o">=</span><span class="m">1</span> -Dnexus<span class="o">=</span><span class="m">1</span> -Ddks<span class="o">=</span><span class="m">1</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>cmake<span class="w"> </span>../<span class="w"> </span>-DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span><span class="w"> </span>-DASlibs<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DBMWlibs<span class="o">=</span><span class="m">1</span><span class="w"> </span>-Dnexus<span class="o">=</span><span class="m">1</span><span class="w"> </span>-Ddks<span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
<p>After</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cmake --build ./ --clean-first -- -j8
$ make install
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>cmake<span class="w"> </span>--build<span class="w"> </span>./<span class="w"> </span>--clean-first<span class="w"> </span>--<span class="w"> </span>-j8
$<span class="w"> </span>make<span class="w"> </span>install
</pre></div>
</div>
<p>and updating the shared library lookup table (<em>only</em> needed for Linux)</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/ldconfig <span class="c1"># as superuser / root</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>/sbin/ldconfig<span class="w"> </span><span class="c1"># as superuser / root</span>
</pre></div>
</div>
<p>you are done with the setup.</p>
</div>
</div>
</div>
<div class="section" id="setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">
<span id="index-4"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a AMD Graphic Card (Radeon R9 390X)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x" title="Permalink to this headline"></a></h2>
<div class="section" id="driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x">
<h3>Driver Installation for an AMD Graphic Card, <em>e.g.</em> Radeon R9 390X<a class="headerlink" href="#driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x" title="Permalink to this headline"></a></h3>
</section>
</section>
</section>
<section id="setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">
<span id="index-4"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a AMD Graphic Card (Radeon R9 390X)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x" title="Link to this heading"></a></h2>
<section id="driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x">
<h3>Driver Installation for an AMD Graphic Card, <em>e.g.</em> Radeon R9 390X<a class="headerlink" href="#driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x" title="Link to this heading"></a></h3>
<p>This will depend slightly on the AMD Card and operating system. Here I will summaries how it was done
on a RHEL (Linux) system using a Radeon R9 390X.</p>
<p>It is assumed that the Radeon R9 390X is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems see
the card, enter the following command in the terminal:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep AMD
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>lspci<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>AMD
</pre></div>
</div>
<p>The response should look something like</p>
@ -335,48 +256,48 @@ the card, enter the following command in the terminal:</p>
</div>
<p>which means that the OS physically recognizes your card.</p>
<p>For RHEL7.x the AMDGPU-PRO driver should be used. It can be downloaded from <a class="reference external" href="http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-RedHat-Install.aspx">AMD</a>. Unpack the driver</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
$ <span class="nb">cd</span> amdgpu-pro-17.10-414273
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>tar<span class="w"> </span>-Jxvf<span class="w"> </span>amdgpu-pro-17.10-414273.tar.xz
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>amdgpu-pro-17.10-414273
</pre></div>
</div>
<p>Install the driver as root</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./amdgpu-pro-install --compute -y
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./amdgpu-pro-install<span class="w"> </span>--compute<span class="w"> </span>-y
</pre></div>
</div>
<p>Here I assume that the AMD graphic card is only used for computation. You need to add the following command
in order that the user <strong>blabla</strong> (change this to the appropriate user name) can access the GPU (otherwise
only root works):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/usermod -a -G video blabla
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>/sbin/usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>video<span class="w"> </span>blabla
</pre></div>
</div>
<p>Reboot the machine.</p>
</div>
<div class="section" id="amd-app-software-development-kit-sdk-to-enable-opencl-support">
<h3>AMD APP Software Development Kit (SDK) to enable <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support<a class="headerlink" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support" title="Permalink to this headline"></a></h3>
</section>
<section id="amd-app-software-development-kit-sdk-to-enable-opencl-support">
<h3>AMD APP Software Development Kit (SDK) to enable <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support<a class="headerlink" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support" title="Link to this heading"></a></h3>
<p>The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to
quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation,
and other materials to quickly get you started leveraging accelerated compute using <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> or <code class="docutils literal notranslate"><span class="pre">C++</span> <span class="pre">AMP</span></code> in your
<code class="docutils literal notranslate"><span class="pre">C/C++</span></code> applications.</p>
<p>Download the AMD APP SDK 3.0 from <a class="reference external" href="http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/">AMD-SDK</a>.</p>
<p>Extract the installer</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>tar<span class="w"> </span>-xvjf<span class="w"> </span>AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
</pre></div>
</div>
<p>Run the installer</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
</pre></div>
</div>
<p>This will install the AMD APP SDK to <code class="docutils literal notranslate"><span class="pre">/opt/AMDAPPSDK-3.0/</span></code> where you can find the <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> include
and library files, as well as documentation and sample code. The install guide for AMD OpenCL SDK can
be found at <a class="reference external" href="http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf">AMD SDK Installation Notes</a>.</p>
</div>
<div class="section" id="installation-of-dks-and-musrfit">
<h3>Installation of DKS and musrfit<a class="headerlink" href="#installation-of-dks-and-musrfit" title="Permalink to this headline"></a></h3>
</section>
<section id="installation-of-dks-and-musrfit">
<h3>Installation of DKS and musrfit<a class="headerlink" href="#installation-of-dks-and-musrfit" title="Link to this heading"></a></h3>
<p>To install <code class="docutils literal notranslate"><span class="pre">DKS</span></code> and <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> follow the instructions <a class="reference internal" href="#musrfit-dks-install"><span class="std std-ref">above</span></a>.</p>
</div>
</div>
<div class="section" id="setting-up-musrfit-dks-for-macos-for-opencl-support">
<span id="index-5"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for macOS for OpenCL support<a class="headerlink" href="#setting-up-musrfit-dks-for-macos-for-opencl-support" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="setting-up-musrfit-dks-for-macos-for-opencl-support">
<span id="index-5"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for macOS for OpenCL support<a class="headerlink" href="#setting-up-musrfit-dks-for-macos-for-opencl-support" title="Link to this heading"></a></h2>
<p>Since Apple is not providing an out-of-the-box <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code> support on their macOS compiler framework (Xcode),
typically <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is just running <em>single threaded</em>. Here <code class="docutils literal notranslate"><span class="pre">DKS</span></code> can help since it delivers <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code>
support which is present on macOS. Hence, if you would like to run <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> multi-threaded the easiest
@ -384,73 +305,36 @@ way is to use <code class="docutils literal notranslate"><span class="pre">DKS</
<p>Since there is no graphic card involved, you do not need any graphic card driver of additional SDK.
The only thing you need <code class="docutils literal notranslate"><span class="pre">DKS</span></code> and the proper <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version.</p>
<p>The installation instruction for <code class="docutils literal notranslate"><span class="pre">DKS/musrfit</span></code> can be found <a class="reference internal" href="#musrfit-dks-install"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="musredit.html" class="btn btn-neutral float-right" title="musredit: the GUI Based Interface to musrfit" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="setup-standard.html" class="btn btn-neutral" title="Setting up musrfit on Different Platforms" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="setup-standard.html" class="btn btn-neutral float-left" title="Setting up musrfit on Different Platforms" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="musredit.html" class="btn btn-neutral float-right" title="musredit: the GUI Based Interface to musrfit" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Jun 24, 2024.
</p>
<p>&#169; Copyright 2025, Andreas Suter.
<span class="lastupdated">Last updated on Jun 07, 2025.
</span></p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.5',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});