Assumptions: C and C++ compilers are already installed (usually located in /usr/bin). Additionally, if you have root (or write) access to /usr/local/bin, then after untar'ing the file (step 3), remove the prefix on Step 5.
1. Download the latest openmpi source files:
- http://www.open-mpi.org/software/ompi/v1.4/
2. Find out how many processors are available to utilize:
[mlagatuz@fedora-boot Download]$ grep 'processor.*:'\
/proc/cpuinfo | wc -l
2
[mlagatuz@fedora-boot Download]$
3. cd into the download directory and untar the file
[mlagatuz@fedora-boot Download]$ tar -xzf \
openmpi-1.4.2.tar.gz
4. cd into the newly created openmpi-
[mlagatuz@fedora-boot Download]$ cd openmpi-1.4.2
[mlagatuz@fedora-boot Download]$ less INSTALL
5. Run configure (./configure) and append the prefix option with your preference of binary installation location (/home/mlagatuz/Desktop/openmpi for me)
[mlagatuz@fedora-boot openmpi-1.4.2]$ ./configure \
--prefix=/home/mlagatuz/Desktop/openmpi
6. Run within the same the directory --> make all install
[mlagatuz@fedora-boot openmpi-1.4.2]$ make all install
7. cd into your home directory and edit your .bash_profile (or .cshrc) to include the binary installation location within your PATH, then source it
[mlagatuz@fedora-boot build]$ cd
[mlagatuz@fedora-boot ~]$ vi .bash_profile
PATH=$PATH:$HOME/bin:/home/mlagatuz/Desktop/openmpi/bin
--[mlagatuz@fedora-boot ~]$ which mpic++
~/Desktop/openmpi/bin/mpic++
[mlagatuz@fedora-boot ~]$
Resources
1. MPI in 30 Minutes
- http://www.linux-mag.com/id/5759
No comments:
Post a Comment