Project

General

Profile

Install Xmipp » History » Version 29

Neil Voss, 05/13/2010 09:24 AM

1 1 Amber Herold
h1. Install Xmipp
2
3 22 Neil Voss
h2. Install Xmipp from source
4
5 29 Neil Voss
We recommend installing Xmipp from source to properly use the openmpi libraries that allows you to run on multiple processors
6
7 27 Neil Voss
h3. Download source code
8
9 10 Neil Voss
* Download the v2.4 source code from http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware
10 12 Neil Voss
* Unzip the source code:
11
<pre>tar zxvf Xmipp-2.4-src.tar.gz</pre>
12 27 Neil Voss
13
h3. Prepare Xmipp make files
14
15 1 Amber Herold
* Go into Xmipp source directory
16
* Find openmpi directory
17
<pre>
18 11 Neil Voss
locate libmpi.so
19 15 Neil Voss
  /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so
20 1 Amber Herold
</pre>
21
22
* Setup Xmipp to use openmpi by changing three lines in SConstruct
23
<pre>
24 11 Neil Voss
cp -v SConstruct SConstruct.orig
25 28 Neil Voss
</pre><pre>
26 1 Amber Herold
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/')
27
opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/')
28
opts.Add('MPI_LIB', 'MPI library', 'mpi')
29
</pre>
30
31 27 Neil Voss
h3. Compile the source code
32
33
* Configure
34 11 Neil Voss
<pre>
35
sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi`
36 1 Amber Herold
export PATH=$PATH:/usr/lib64/openmpi/1.3.2-gcc/bin
37
./scons.configure
38 5 Amber Herold
</pre>
39 1 Amber Herold
* Look for the following line in the output:
40
<pre>
41
* Checking for MPI ... yes
42 11 Neil Voss
</pre>
43 1 Amber Herold
* Now compile the source code
44
<pre>
45
./scons.compile
46
</pre>
47 17 Neil Voss
* Move the main source code directory to global location, like @/usr/local@
48 19 Neil Voss
<pre>sudo mv -v Xmipp-2.4-src /usr/local/Xmipp</pre>
49 17 Neil Voss
50 27 Neil Voss
h3. Setup environmental variables
51
52
* For bash, edit xmipp.sh:
53 21 Neil Voss
<pre>
54 18 Neil Voss
export XMIPPDIR=/usr/local/Xmipp
55
export PATH=${XMIPPDIR}/bin:${PATH}
56 1 Amber Herold
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
57 18 Neil Voss
</pre>
58 27 Neil Voss
* For C shell, edit xmipp.csh:
59 18 Neil Voss
<pre>
60 1 Amber Herold
setenv XMIPPDIR /usr/local/Xmipp
61
setenv PATH ${XMIPPDIR}/bin:${PATH}
62
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XMIPPDIR}/lib
63
</pre>
64 27 Neil Voss
* Copy to /etc/profile.d
65 17 Neil Voss
<pre>
66 18 Neil Voss
sudo cp -v xmipp.sh /etc/profile.d/
67 20 Neil Voss
sudo chmod 755 /etc/profile.d/xmipp.sh
68 18 Neil Voss
69 26 Neil Voss
- or -
70
71 18 Neil Voss
sudo cp -v xmipp.csh /etc/profile.d/
72 20 Neil Voss
sudo chmod 755 /etc/profile.d/xmipp.csh
73 17 Neil Voss
</pre>
74 18 Neil Voss
75 26 Neil Voss
bq. You may need to log out and log back in for these changes to take place.
76 1 Amber Herold
77 22 Neil Voss
h2. Test Xmipp
78 23 Neil Voss
79
Test Xmipp by running ml_align2d program
80 1 Amber Herold
<pre>
81 24 Neil Voss
xmipp_ml_align2d -h
82 22 Neil Voss
</pre>
83 24 Neil Voss
This result should appear
84 22 Neil Voss
<pre>
85
2104:Argument -i not found or invalid argument
86
File: libraries/data/args.cpp line: 502
87
Usage:  ml_align2d [options] 
88
   -i <selfile>                : Selfile with input images 
89
   -nref <int>                 : Number of references to generate automatically (recommended)
90
   OR -ref <selfile/image>         OR selfile with initial references/single reference image 
91
 [ -o <rootname> ]             : Output rootname (default = "ml2d")
92
 [ -mirror ]                   : Also check mirror image of each reference 
93
 [ -fast ]                     : Use pre-centered images to pre-calculate significant orientations
94
 [ -thr <N=1> ]                : Use N parallel threads 
95
 [ -more_options ]             : Show all possible input parameters 
96
</pre>
97 8 Amber Herold
______
98 16 Neil Voss
99 25 Neil Voss
[[Install SPIDER|< Install SPIDER]] | [[Compile FindEM|Compile FindEM >]]
100 9 Amber Herold
101 1 Amber Herold
______