Project

General

Profile

Install Xmipp » History » Version 51

Amber Herold, 05/13/2011 12:34 PM

1 1 Amber Herold
h1. Install Xmipp
2
3 30 Neil Voss
h2. Install documentation at Xmipp
4
5 34 Amber Herold
Biocomputing Unit at the Spanish National Center of Biotechnology (CNB-CSIC) provides "detailed documentation":http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware on how to install Xmipp on various systems. Below we cover _our way_ to get it working on your system.
6 30 Neil Voss
7 46 Amber Herold
h2. Install supporting packages
8
9
|_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name|
10
|gcc-c++||gcc-c++||
11
|openmpi-devel||openmpi-devel||
12
|libtiff-devel||libtiff-devel||
13 48 Amber Herold
|libjpeg-devel||libjpeg-devel||
14 49 Amber Herold
|zlib-devel||zlib-devel||
15 46 Amber Herold
16 22 Neil Voss
h2. Install Xmipp from source
17
18 29 Neil Voss
We recommend installing Xmipp from source to properly use the openmpi libraries that allows you to run on multiple processors
19
20 27 Neil Voss
h3. Download source code
21
22 10 Neil Voss
* Download the v2.4 source code from http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware
23 12 Neil Voss
* Unzip the source code:
24
<pre>tar zxvf Xmipp-2.4-src.tar.gz</pre>
25 27 Neil Voss
26
h3. Prepare Xmipp make files
27
28 1 Amber Herold
* Go into Xmipp source directory
29
* Find openmpi directory
30
<pre>
31 11 Neil Voss
locate libmpi.so
32 15 Neil Voss
  /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so
33 1 Amber Herold
</pre>
34
35 36 Amber Herold
 *Note:* If you can not find the openmpi directory, make sure you have installed the openmpi package. The installation on CentOS using yum is: yum -y install openmpi-devel.
36 35 Amber Herold
37 37 Amber Herold
* Setup Xmipp to use openmpi by changing three lines in SConstruct (creating a backup of the file first)
38 1 Amber Herold
<pre>
39 11 Neil Voss
cp -v SConstruct SConstruct.orig
40 28 Neil Voss
</pre><pre>
41 1 Amber Herold
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/')
42
opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/')
43
opts.Add('MPI_LIB', 'MPI library', 'mpi')
44
</pre>
45
46 27 Neil Voss
h3. Compile the source code
47
48
* Configure
49 40 Amber Herold
50 41 Amber Herold
 Be sure to modify the path in the second command as needed. For example, on a 32 bit machine using 1.4-gcc the command is:
51
 export PATH=$PATH:/usr/lib/openmpi/1.4-gcc/bin
52 40 Amber Herold
53 11 Neil Voss
<pre>
54 39 Amber Herold
sudo mpi-selector --verbose --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi`
55 1 Amber Herold
export PATH=$PATH:/usr/lib64/openmpi/1.3.2-gcc/bin
56
./scons.configure
57 5 Amber Herold
</pre>
58 45 Amber Herold
 
59 1 Amber Herold
* Look for the following line in the output:
60 42 Amber Herold
61 1 Amber Herold
<pre>
62
* Checking for MPI ... yes
63 11 Neil Voss
</pre>
64 42 Amber Herold
65 1 Amber Herold
* Now compile the source code
66 42 Amber Herold
67 1 Amber Herold
<pre>
68
./scons.compile
69
</pre>
70 42 Amber Herold
71 17 Neil Voss
* Move the main source code directory to global location, like @/usr/local@
72 42 Amber Herold
73 19 Neil Voss
<pre>sudo mv -v Xmipp-2.4-src /usr/local/Xmipp</pre>
74 17 Neil Voss
75 27 Neil Voss
h3. Setup environmental variables
76
77
* For bash, edit xmipp.sh:
78 21 Neil Voss
<pre>
79 18 Neil Voss
export XMIPPDIR=/usr/local/Xmipp
80
export PATH=${XMIPPDIR}/bin:${PATH}
81 1 Amber Herold
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
82 18 Neil Voss
</pre>
83 27 Neil Voss
* For C shell, edit xmipp.csh:
84 18 Neil Voss
<pre>
85 1 Amber Herold
setenv XMIPPDIR /usr/local/Xmipp
86
setenv PATH ${XMIPPDIR}/bin:${PATH}
87
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
88
</pre>
89 27 Neil Voss
* Copy to /etc/profile.d
90 17 Neil Voss
<pre>
91 18 Neil Voss
sudo cp -v xmipp.sh /etc/profile.d/
92 20 Neil Voss
sudo chmod 755 /etc/profile.d/xmipp.sh
93 18 Neil Voss
94 26 Neil Voss
- or -
95
96 18 Neil Voss
sudo cp -v xmipp.csh /etc/profile.d/
97 20 Neil Voss
sudo chmod 755 /etc/profile.d/xmipp.csh
98 17 Neil Voss
</pre>
99 18 Neil Voss
100 51 Amber Herold
bq. You may need to log out and log back in for these changes to take place, or source the environment script: <pre> source /etc/profile.d/xmipp.sh</pre>
101 1 Amber Herold
102 22 Neil Voss
h2. Test Xmipp
103 23 Neil Voss
104
Test Xmipp by running ml_align2d program
105 1 Amber Herold
<pre>
106 24 Neil Voss
xmipp_ml_align2d -h
107 22 Neil Voss
</pre>
108 24 Neil Voss
This result should appear
109 22 Neil Voss
<pre>
110
2104:Argument -i not found or invalid argument
111
File: libraries/data/args.cpp line: 502
112
Usage:  ml_align2d [options] 
113
   -i <selfile>                : Selfile with input images 
114
   -nref <int>                 : Number of references to generate automatically (recommended)
115
   OR -ref <selfile/image>         OR selfile with initial references/single reference image 
116
 [ -o <rootname> ]             : Output rootname (default = "ml2d")
117
 [ -mirror ]                   : Also check mirror image of each reference 
118
 [ -fast ]                     : Use pre-centered images to pre-calculate significant orientations
119
 [ -thr <N=1> ]                : Use N parallel threads 
120
 [ -more_options ]             : Show all possible input parameters 
121
</pre>
122 47 Amber Herold
123 8 Amber Herold
______
124 16 Neil Voss
125 32 Neil Voss
[[Install SPIDER|< Install SPIDER]] | [[Install UCSF Chimera|Install UCSF Chimera >]]
126 9 Amber Herold
127 1 Amber Herold
______