Project

General

Profile

Install Xmipp » History » Revision 58

Revision 57 (Neil Voss, 02/29/2012 02:07 PM) → Revision 58/61 (Sargis Dallakyan, 05/02/2012 09:57 AM)

h1. Install Xmipp 

 h2. Install documentation at Xmipp 

 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. 

 h2. Install supporting packages 

 |_.Name:|_.Download site:|_.CentOS package name|_.Fedora package name|_.SuSE rpm name| 
 |gcc-c++||gcc-c++|| 
 |openmpi-devel||openmpi-devel|| 
 |libtiff-devel||libtiff-devel|| 
 |libjpeg-devel||libjpeg-devel|libjpeg-turbo-devel|| 
 |zlib-devel||zlib-devel|| 

 h2. Install Xmipp from source 

 We recommend installing Xmipp from source to properly use the openmpi libraries that allows you to run on multiple processors 

 h3. Download source code 

 * Download the v2.4 source code from http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware 
 * Unzip the source code: 
 <pre>tar zxvf Xmipp-2.4-src.tar.gz</pre> 

 Alternatively, you may download from the svn repo: 

 <pre>svn co http://newxmipp.svn.sourceforge.net/svnroot/newxmipp/tags/release-2.4/xmipp/ Xmipp-2.4-src</pre> 

 As of Feb 2012, this was required to compile the 2.4 source code. 

 h3. Prepare Xmipp make files Compile the source code 

 * Go into Xmipp source directory 
 

 * Find openmpi directory 
 Add mpi compilers to your path.  
 <pre> 
 locate libmpi.so export PATH=/usr/lib64/openmpi/bin:$PATH 
 /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so 
 </pre> 

 *Note:* This example is for x86_64 CentOS 6. 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. 

 * Setup Xmipp to use openmpi by changing three lines in SConstruct (creating a backup of the file first) 
 <pre> 
 cp -v SConstruct SConstruct.orig 
 </pre><pre> 
 opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/') 
 opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/') 
 opts.Add('MPI_LIB', 'MPI library', 'mpi') 
 </pre>  

 h3. Compile the source code 

 * Configure 

 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: 
 export PATH=$PATH:/usr/lib/openmpi/1.4-gcc/bin 

 <pre> 
 sudo mpi-selector --verbose --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi` 
 export PATH=$PATH:/usr/lib64/openmpi/1.3.2-gcc/bin 
 ./scons.configure 
 </pre>  


 *Note:* If you are installing Xmipp on x86_64 CentOS 6, you can use the following commands instead. 


 <pre> 
 export PATH=/usr/lib64/openmpi/bin:$PATH 
 ./scons.configure \ 
  MPI_LIBDIR=/lib/usr/lib64/openmpi/lib \ 
  MPI_INCLUDE=/lib/usr/lib64/openmpi/include \ 
  MPI_LIB=mpi 
 </pre> 
 
 * Look for the following line in the output: 

 <pre> 
 * Checking for MPI ... yes 
 </pre> 

 * Now compile the source code 

 <pre> 
 ./scons.compile 
 </pre> 

 * Move the main source code directory to global location, like @/usr/local@ 

 <pre>sudo mv -v Xmipp-2.4-src /usr/local/Xmipp</pre> 

 h3. Setup environmental variables 

 * For bash, edit xmipp.sh: 
 <pre> 
 export XMIPPDIR=/usr/local/Xmipp 
 export PATH=${XMIPPDIR}/bin:${PATH} 
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XMIPPDIR}/lib 
 </pre> 
 * For C shell, edit xmipp.csh: 
 <pre> 
 setenv XMIPPDIR /usr/local/Xmipp 
 setenv PATH ${XMIPPDIR}/bin:${PATH} 
 setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XMIPPDIR}/lib 
 </pre> 
 * Copy to /etc/profile.d 
 <pre> 
 sudo cp -v xmipp.sh /etc/profile.d/ 
 sudo chmod 755 /etc/profile.d/xmipp.sh 

 - or - 

 sudo cp -v xmipp.csh /etc/profile.d/ 
 sudo chmod 755 /etc/profile.d/xmipp.csh 
 </pre> 

 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> 

 h2. Test Xmipp 

 Test Xmipp by running ml_align2d program 
 <pre> 
 xmipp_ml_align2d -h 
 </pre> 
 This result should appear 
 <pre> 
 2104:Argument -i not found or invalid argument 
 File: libraries/data/args.cpp line: 502 
 Usage:    ml_align2d [options]  
    -i <selfile>                  : Selfile with input images  
    -nref <int>                   : Number of references to generate automatically (recommended) 
    OR -ref <selfile/image>           OR selfile with initial references/single reference image  
  [ -o <rootname> ]               : Output rootname (default = "ml2d") 
  [ -mirror ]                     : Also check mirror image of each reference  
  [ -fast ]                       : Use pre-centered images to pre-calculate significant orientations 
  [ -thr <N=1> ]                  : Use N parallel threads  
  [ -more_options ]               : Show all possible input parameters  
 </pre> 

 ______ 

 [[Install SPIDER|< Install SPIDER]] | [[Install UCSF Chimera|Install UCSF Chimera >]] 

 ______