Open main menu

Changes

Installation linux

3,085 bytes removed, 20:42, 27 October 2017
Switched to the {{relax source}} template for repository links, and removed all SVN references.
__TOC__
 
== Installing the relax dependencies ==
yum install subversion
yum install python-matplotlib
 
# We can manage python package installations with pip
sudo easy_install pip
</source>
== Minfx and Bmrblib ==
Remember to check, if there are newer versions of # [http://download.gna.org/minfx minfx] and [http://download.gna.org/bmrblib bmrblibMinfx#Install | Minfx]. <br>The [https://gna.org/projects/minfx/ minfx] and [https://gna.org/projects/bmrblib/ bmrblib] libraries can be installed on all Linux systems by typing:<source lang="bash">cd $HOME/Downloads wget http://download.gna.org/minfx/minfx-1.0.5.tar.gztar -xzf minfx-1.0.5.tar.gzcd minfx-1.0.5sudo python setup.py installcd .. wget http://download.gna.org/bmrblib/bmrblib-1.0.3.tar.gztar -xzf bmrblib-1.0.3.tar.gzcd bmrblib-1.0.3sudo python setup.py installcd ..</source> == mpi4py ==Relax can run some # [[mpi4py Bmrblib#Install | optimizations]Bmrblib] with multi-processors. [http://www.nmr-relax.com/manual/Usage_multi_processor.html See the manual].<br>It needs '''openmpi-devel''' and the python package '''mpi4py'''. Remember to check, if there are newer versions of [https://bitbucket.org/mpi4py/mpi4py/downloads mpi4py]. <br>The # [https://code.google.com/p/mpi4py/ mpi4py] libraries can be installed on all Linux systems by typing [http://mpi4py.scipy.org/docs/usrman/install.html or check instructions here.]:<source lang="bash"># Install openmpi-devel, to get 'mpicc'sudo yum install openmpi-devel# Check for mpiccwhich mpicc# If not found, try this fix, ref: http://forums.fedoraforum.org/showthread.php?t=194688#For 32 computer.sudo ln -s /usr/lib/openmpi/bin/mpicc /usr/bin/mpicc# For 64 bit computer.sudo ln -s /usr/lib64/openmpi/bin/mpicc /usr/bin/mpicc# Source your shell settings, to find the executable, or restart your terminal.source $HOME/.cshrc # Then install | mpi4pycd $HOME/Downloadswget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-1.3.1.tar.gztar -xzf mpi4py-1.3.1.tar.gzcd mpi4py-1.3.1python setup.py buildsudo python setup.py install</source>]]
== Testing the Python installation ==
Before installing relax, it is best to be sure that the Python modules are functional by importing them:
<source {{collapsible script| type = Python commands| title = Testing modules by importing them.| lang ="python">| script =
$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
>>> mpi4py.__file__
'...'
</source>}}
== Checking out a relax branch ==
If you would like to play with relax branch rather than the main [http://www.nmr-relax.com/download.html relax downloads], the [httphttps://subversiongit-scm.tigris.orgcom/ SubversionGit] program should first be installed. <br>You can see the different branches [http://svn.gna.org/viewcvs/{{relax/ source|text=here}}.] <br>
First the relax sources can be checked out of the source code repository and the C modules compiled:
=== Using subversion git ===To check out the relax_disp or relax trunk branch using the subversion git client, simply type:<{{#tag:source lang="bash">|svn co svn://svn.gna.org/svn/{{relax/branches/relax_disp relax_dispclone}}svn co svn://svn.gna.org/svn/relax/trunk relax_trunk</source> If this svn command does not work, try:<source | lang="bash">svn co http://svn.gna.org/svn/relax/branches/relax_disp relax_dispsvn co http://svn.gna.org/svn/relax/trunk relax_trunk</source>}}
=== Compilation of the C modules ===
For the {{:R1 }} and {{:R2 }} and relaxation dispersion analyses, the relax C modules must be compiled. This is done using the scons program, by simply typing:
<source lang="bash">
cd relax_disprelax_trunk
scons
</source>
<source lang="bash">
cd relax_disprelax_trunk
echo "setenv PATH $PWD"':$PATH' >> $HOME/.cshrc
</source>
</source>
==Test installation = In multiprocessor mode ===<source lang="bash">set RELAX=`which relax`# Normalmpirun -np N+1 $RELAX --multi='mpi4py'# In guimpirun -np N+1 $RELAX --multi='mpi4py' -g</source>where N is the number of slaves {{caution|After an installation you have. See the mpirun documentation for details - this is not part of relax. <br>This code runs in the GUI, the script UI and the prompt UI, i.e. everywhereshould really run an [[Installation_test]].}}
== Helper start scripts Trouble shooting ==If you have several versions or development branches of relax installed, you could probably use some of these scripts, and put them === The menu icons are missing in your PATHLinux.=== Script On some Linux systems, the icons for force running the disp branch of relax on server computer ===menu items are not shown. This script exemplifies was a setup, where decision taken by the Gnome developers at some point to keep the above installation requirements is met on one server computer ''haddock''GUI minimal, and where satellite computersthough in recent versions this behaviour has been reverted. <br>are forced If you suffer from this problem, to run on this computer. reactive the icons simply type in the shell: gconftool-2 --get /desktop/gnome/interface/menus_have_icons gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true
The file '''relax_disp''' is made executable, and put in a PATH, known by all satellite computersFor GNOME 3 # Get schemas gsettings list-schemas gsettings list-schemas | grep org.gnome.desktop<source lang="bash">#!/bin/tcsh gsettings list-fschemas | grep org.gnome.desktop.interface
# Set the lax version used for this scriptGet keys gsettings list-keys org.gnome.desktop.interface gsettings list-keys org.gnome.desktop.interface | grep iconset RELAX=/network_drive/software_user/software/NMR gsettings list-relax/relax_disp/relaxkeys org.gnome.desktop.interface | grep desktop
# Remove env set to wrong library filesGet value gsettings get org.gnome.desktop.unsetenv LD_LIBRARY_PATHinterface icon-theme
# Check machinehttps://wiki.archlinux.org/index.php/GNOME/Tips_and_tricks#Enable_button_and_menu_icons # Since GTK+ 3.10, since only machine haddock the GSettings key 'menus-have correct packages installed-icons' has been deprecated.Icons in buttons and menus can still be enabled by setting the following overrides: if ( $HOST != "haddock") then echo "You have to run on haddock gsettings set org.gnome. I do it for you" ssh haddock settings-Y -t daemon.plugins.xsettings overrides "cd $PWD; unsetenv LD_LIBRARY_PATH; $RELAX $argv; {'Gtk/binButtonImages': <1>, 'Gtk/tcsh"else $RELAX $argvendifMenuImages': </source1>}"
=== Script for running the disp branch of relax with maximum number of processors available === # CheckThis script exemplifies a setup, to test the running relax with maximum number of processors gsettings list-keys org.  The file '''relax_test''' is made executable, and put in a PATH, known by all satellite computersgnome.<source lang="bash">#!/bin/tcsh settings-fe # Set the relax version used for this scriptdaemon.set RELAX=/sbinlab2/tlinnet/software/NMR-relax/relax_disp/relax # Remove env set to wrong library filesplugins.xsettingsunsetenv LD_LIBRARY_PATH # Set number of available CPUs gsettings get org.set NPROC=`nproc`set NP=`echo $NPROC + 1 | bc ` echo "Running relax with NP=$NP in multi-processor mode" # Run relax in multi processor modegnome./usr/lib64/openmpi/bin/mpirun settings-np $NP $RELAX --multi='mpi4py' $argv</source> == TEST INSTALLATION ==After an installation you should really run an [[Installation_test]] == Trouble shooting ===== The menu icons are missing in Linux. ===On some Linux systems, the icons for the menu items are not showndaemon. This was a decision taken by the Gnome developers at some point to keep the GUI minimal, though in recent versions this behaviour has been revertedplugins. <br>If you suffer from this problem, to reactive the icons simply type in the shell: gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons truexsettings overrides
== See also ==
[[Category:Installation]]
Trusted, Bureaucrats
4,223

edits