Difference between revisions of "Installation linux"
Line 222: | Line 222: | ||
On some Linux systems, the icons for the menu items are not shown. 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 reverted. <br> | On some Linux systems, the icons for the menu items are not shown. 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 reverted. <br> | ||
If you suffer from this problem, to reactive the icons simply type in the shell: | If you suffer from this problem, to 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 | gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true | ||
== See also == | == See also == | ||
[[Category:Installation]] | [[Category:Installation]] |
Revision as of 13:13, 9 June 2014
Contents
Installing the relax dependencies
The python-devel and scons packages are only required if the C modules need to be compiled for your system.
- Grace software is used for visualisation of 2D data sets.
- subversion is only if you wan't to checkout the source code.
- matplotlib is not a necessity, but is likely to be implemented later for extended plotting.
RHEL 5 and compatible distributions
For RPM-based Linux distributions with access to the YUM installer, first install the relax dependencies with:
yum install python
yum install python-devel
yum install numpy
yum install scipy
yum install scons
yum install wxPython
yum install grace
yum install subversion
yum install python-matplotlib
# We can manage python package installations with pip
sudo easy_install pip
If you do not have root access but are in the sudo group, then add a sudo before each of the above commands.
Minfx and Bmrblib
Remember to check, if there are newer versions of minfx and bmrblib.
The minfx and bmrblib libraries can be installed on all Linux systems by typing:
cd $HOME/Downloads
wget http://download.gna.org/minfx/minfx-1.0.6.tar.gz
tar -xzf minfx-1.0.6.tar.gz
cd minfx-1.0.6
#Then either
sudo pip install .
# Or
sudo python setup.py install
cd ..
wget http://download.gna.org/bmrblib/bmrblib-1.0.3.tar.gz
tar -xzf bmrblib-1.0.3.tar.gz
cd bmrblib-1.0.3
#Then either
sudo pip install .
# Or
sudo python setup.py install
cd ..
mpi4py
For the model-free and relaxation dispersion analyses in relax, the optimisation can be speed up using Gary Thompson's multi-processor framework. This allows the calculations to be run on a computer cluster. This uses OpenMPI via the mpi4py Python package. See the manual.
It requires the installation of openmpi and the mpi4py Python package.
Remember to check if there are newer versions of mpi4py.
The mpi4py libraries can be installed on all Linux systems by typing or check instructions here.:
# Install openmpi-devel, to get 'mpicc'
sudo yum install openmpi-devel
# Check for mpicc
which 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 mpi4py
cd $HOME/Downloads
wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-1.3.1.tar.gz
tar -xzf mpi4py-1.3.1.tar.gz
cd mpi4py-1.3.1
#Then either
sudo pip install .
# Or
python setup.py build
sudo python setup.py install
Testing the Python installation
Before installing relax, it is best to be sure that the Python modules are functional by importing them:
$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
>>> import wx
>>> wx.__file__
'...'
>>> import bmrblib
>>> bmrblib.__file__
'...'
>>> import minfx
>>> minfx.__file__
'...'
>>> import mpi4py
>>> mpi4py.__file__
'...'
Checking out a relax branch
If you would like to play with relax branch rather than the main relax downloads, the Subversion program should first be installed.
You can see the different branches here.
First the relax sources can be checked out of the source code repository and the C modules compiled:
Using subversion
To check out the relax_disp or trunk branch using the subversion client, simply type:
svn co svn://svn.gna.org/svn/relax/branches/relax_disp relax_disp
svn co svn://svn.gna.org/svn/relax/trunk relax_trunk
If this svn command does not work, try:
svn co http://svn.gna.org/svn/relax/branches/relax_disp relax_disp
svn co http://svn.gna.org/svn/relax/trunk relax_trunk
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:
cd relax_disp
scons
You must be in the base relax directory for this to work.
In addition, if you would like to compile the relax user manual via LaTeX, you can also use scons. See the wiki page manual.:
Add to path - C_shell / Tcsh
cd relax_disp
echo "setenv PATH $PWD"':$PATH' >> $HOME/.cshrc
Restart the terminal, to load the new variables.
Start relax
Normal
# Normal
relax
# See help
relax -h
# In GUI mode
relax -g
# Execute script
relax -g
In multiprocessor mode
set RELAX=`which relax`
# Normal
mpirun -np N+1 $RELAX --multi='mpi4py'
# In gui
mpirun -np N+1 $RELAX --multi='mpi4py' -g
where N is the number of slaves you have. See the mpirun documentation for details - this is not part of relax.
This code runs in the GUI, the script UI and the prompt UI, i.e. everywhere.
Helper start scripts
If you have several versions or development branches of relax installed, you could probably use some of these scripts, and put them in your PATH.
Script for force running the disp branch of relax on server computer
This script exemplifies a setup, where the above installation requirements is met on one server computer haddock, and where satellite computers are forced to run on this computer.
The file relax_disp is made executable (chmod +x relax_disp), and put in a PATH, known by all satellite computers.
#!/bin/tcsh -f
# Set the lax version used for this script.
set RELAX=/network_drive/software_user/software/NMR-relax/relax_disp/relax
# Check machine, since only machine haddock have correct packages installed.
if ( $HOST != "haddock") then
echo "You have to run on haddock. I do it for you"
ssh haddock -Y -t "cd $PWD; $RELAX $argv; /bin/tcsh"
else
$RELAX $argv
endif
Script for running the disp branch of relax with maximum number of processors available
This script exemplifies a setup, to test the running relax with maximum number of processors.
The file relax_test is made executable, and put in a PATH, known by all satellite computers.
#!/bin/tcsh -fe
# Set the relax version used for this script.
set RELAX=/sbinlab2/tlinnet/software/NMR-relax/relax_disp/relax
# Set number of available CPUs.
set NPROC=`nproc`
set NP=`echo $NPROC + 1 | bc `
echo "Running relax with NP=$NP in multi-processor mode"
# Run relax in multi processor mode.
/usr/lib64/openmpi/bin/mpirun -np $NP $RELAX --multi='mpi4py' $argv
TEST INSTALLATION
After an installation you should really run an Installation_test
Trouble shooting
On some Linux systems, the icons for the menu items are not shown. 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 reverted.
If you suffer from this problem, to 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