Table of Contents
cd mkdir -p ownprogs/srcPlace all your following downloaded software in ~/ownprogs/src
unalias yourownalias
mv ~/.ipython/ ~/.ipython_bak/
module list module switch mpi/openmpi/icc/1.2.7 mpi/openmpi/icc/1.2.9 module listSee below under "Installing mpi4py" why we're not using en even more recent Open MPI here. We're now ready to install the new software. Log in on DLX via ssh -l yourid dlx.uky.edu if you haven't yet.
cd ~/ownprogs/src/Unpack Python and change to the directory
tar xvfz Python-2.6.6.tgz cd Python-2.6.6Configure, build and install the new Python for compilation, assuming that we will be installing it into the ~/ownprogs/ directory
./configure --prefix=$HOME/ownprogs make make install
cd ~/ownprogs/bin/python Python 2.6.6 (r266:84292, Aug 25 2010, 17:46:49) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
echo "alias python='$HOME/ownprogs/bin/python'" >> $HOME/.bashrc
cd ~/ownprogs/src/Unpack Ipython and change to the directory
tar xvfz ipython-0.10.tar.gz cd ipython-0.10Install Ipython, using your own, just installed, version of Python
~/ownprogs/bin/python setup.py installTry out Ipython
cd ~/ownprogs/bin/ipython ********************************************************************** Welcome to IPython. I will try to create a personal configuration directory where you can customize many aspects of IPython's functionality in: /home/yourid/.ipython Initializing from configuration: /home/yourid/ownprogs/lib/python2.6/site-packages/IPython/UserConfig Successful installation! Please read the sections 'Initial Configuration' and 'Quick Tips' in the IPython manual (there are both HTML and PDF versions supplied with the distribution) to make sure that your system environment is properly configured to take advantage of IPython's features. Important note: the configuration system has changed! The old system is still in place, but its setting may be partly overridden by the settings in "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file if some of the new settings bother you. Please press <RETURN> to start IPython.and after pressing RETURN once
********************************************************************** Python 2.6.6 (r266:84292, Aug 25 2010, 17:46:49) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]:Type something like
In [1]: from math import sqrt In [2]: sqrt(9) Out[2]: 3.0 In [3]:If there were no error messages, Ipython 0.10 was installed successfully. You can make an alias for your version of Ipython
echo "alias ipython='$HOME/ownprogs/bin/ipython'" >> $HOME/.bashrc
cd module unload mpi/openmpi/icc/1.4.0 module load mpi/openmpi/icc/1.2.9You should add these two lines to your ~/.bashrc file, so that this module loading happens automatically every time you log in.
cd ~/ownprogs/src tar xvfz mpi4py-1.2.1.tar.gz cd mpi4py-1.2.1Build and install mpi4py with your own recently installed Python
~/ownprogs/bin/python setup.py build ~/ownprogs/bin/python setup.py installTest your new installation of mpi4py (while still being in ~/ownprogs/src/mpi4py-1.2.1), using your own Python
mpiexec -n 5 ~/ownprogs/bin/python demo/helloworld.pyYou should see something like this:
Hello, World! I am process 1 of 5 on dlxlogin1.local. Hello, World! I am process 2 of 5 on dlxlogin1.local. Hello, World! I am process 3 of 5 on dlxlogin1.local. Hello, World! I am process 4 of 5 on dlxlogin1.local. Hello, World! I am process 0 of 5 on dlxlogin1.local.If you do, success!
cd module load imkl/10.2.5This will tell the system where to find Intel's Math Kernel Libraries (MKL). You should add the last line to your ~/.bashrc file. Change to the source directory, unpack Numpy, and change to its directory
cd ~/ownprogs/src tar xvfz numpy-1.5.0.tar.gz cd numpy-1.5.0Make an own copy of the example file site.cfg.example
cp site.cfg.example site.cfgThis file will hold additional information for Numpy to use during compilation. Edit site.cfg in your favorite editor. Go the the very end of the file, and add the following lines
[mkl] library_dirs = /share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/ mkl_libs = mkl_core, guide, mkl_intel_thread, mkl_intel_lp64 lapack_libs = mkl_lapack include_dirs = /share/apps/intel/ict/mkl/10.2.5.035/include/Make sure that all other lines in this file are commented (begin with #; this should be the case if you did not edit site.cfg earlier). Save the file and exit your editor. Now build and install Numpy with your own python
~/ownprogs/bin/python setup.py buildThis generates a lot of output on the screen, but once it finishes, scroll up all the way to the first messages and check whether you see something like this
Running from numpy source directory.F2PY Version 1
blas_opt_info:
blas_mkl_info:
FOUND:
libraries = ['mkl_core', 'guide', 'mkl_intel_thread', 'mkl_intel_lp64', 'pthread']
library_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/include/']
FOUND:
libraries = ['mkl_core', 'guide', 'mkl_intel_thread', 'mkl_intel_lp64', 'pthread']
library_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/include/']
lapack_opt_info:
lapack_mkl_info:
mkl_info:
FOUND:
libraries = ['mkl_core', 'guide', 'mkl_intel_thread', 'mkl_intel_lp64', 'pthread']
library_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/include/']
FOUND:
libraries = ['mkl_lapack', 'mkl_core', 'guide', 'mkl_intel_thread', 'mkl_intel_lp64', 'pthread']
library_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/include/']
FOUND:
libraries = ['mkl_lapack', 'mkl_core', 'guide', 'mkl_intel_thread', 'mkl_intel_lp64', 'pthread']
library_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/lib/em64t/']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['/share/apps/intel/ict/mkl/10.2.5.035/include/']
running build
If you see the FOUND: messages, things seem to go fine. If you see NOT FOUND:, there is a problem. Assuming that you saw FOUND: flags, continue with installing Numpy
~/ownprogs/bin/python setup.py installTest your new Numpy
cd ~/ownprogs/bin/ipython Python 2.6.6 (r266:84292, Aug 25 2010, 17:46:49) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: import numpy as np In [2]: np.linspace(-3.,3.,7) Out[2]: array([-3., -2., -1., 0., 1., 2., 3.])If you see something like the above, and no error messages, Numpy was installed successfully.
cd ~/ownprogs/src tar xvfz scipy-0.8.0.tar.gz cd scipy-0.8.0Install Scipy using your own Python installation
~/ownprogs/bin/python setup.py installThis step also automatically takes care of the building process. It will take a few minutes. Then, try out your new Scipy
cd ~/ownprogs/bin/ipython Python 2.6.6 (r266:84292, Aug 25 2010, 17:46:49) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: import numpy as np In [2]: from scipy import integrate In [3]: x = np.linspace(0.,np.pi,100) In [4]: y = np.sin(x) In [5]: integrate.simps(y,x) Out[5]: 1.9999999690165366If you see something like the above and no error messages, Scipy was installed successfully.
cd ~/ownprogs/src tar xvfz zlib-1.2.5.tar.gz cd zlib-1.2.5Configure zlib and test the configuration
./configure --prefix=$HOME/ownprogs make testIf this was successful (no error messages), then install it
make install
cd ~/ownprogs/src tar xvfz hdf5-1.8.5-patch1.tar.gz cd hdf5-1.8.5-patch1Configure HDF5
./configure --prefix=$HOME/ownprogs/hdf5 --with-zlib=$HOME/ownprogs/If the output ends with something similar to the following, proceed.
Languages:
----------
Fortran: no
C++: no
Features:
---------
Parallel HDF5: no
High Level library: yes
Threadsafety: no
Default API Mapping: v18
With Deprecated Public Symbols: yes
I/O filters (external): deflate(zlib)
I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
MPE: no
Direct VFD: no
dmalloc: no
Clear file buffers before write: yes
Using memory checker: no
Function Stack Tracing: no
GPFS: no
Strict File Format Checks: no
Optimization Instrumentation: no
Large File Support (LFS): yes
H5dump Packed Bits: yes
Build HDF5 and check the built
make make checkIf successful (you've seen lots of PASSED messages on the screen and no errors), install HDF5 and check the installation
make install make check-install
cd ~/ownprogs/src tar xvfz h5py-1.3.0.tar.gz cd h5py-1.3.0.tar.gzConfigure h5py so that it will use the just installed HDF5 library, then build and install it
~/ownprogs/bin/python setup.py configure --hdf5=$HOME/ownprogs/hdf5 --api=18 ~/ownprogs/bin/python setup.py build ~/ownprogs/bin/python setup.py installIf there were no errors, this concludes the installation procedures.
module unload mpi/openmpi/icc/default module load mpi/openmpi/icc/1.2.9 module load imkl/10.2.5For convenience, make aliases for your own Python and Ipython installations by adding these lines to your ~/.bashrc file
alias python='$HOME/ownprogs/bin/python' alias ipython='$HOME/ownprogs/bin/ipython'