-
Notifications
You must be signed in to change notification settings - Fork 13
centos 5.4 cluster compute
This cookbook will work with the Generic Amazon HVM and the Rightscale HVM images. It is based on the Ubuntu 9.10 AMI Cookbook and the CentOS 5 AMI Cookbook
-
Update package list:
yum update
-
Remove g77 if installed:
yum -y remove g77
3. Set up the repositories to safely install packages missing from Centos repositories:
yum -y install yum-priorities yum-utils cd /etc/yum.repos.d wget http://s3tools.org/repo/CentOS_5/s3tools.repo wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
-
Check and install rpmforge rpms:
rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm rm -f rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
-
Setup Python 2.6 repositories:
wget http://dagobah.ftphosting.net/yum/smartfile.repo -O /etc/yum.repos.d/smartfile.repo
6. Set the priority of each entry in each repo file in /etc/yum.repos.d by adding a line “priority = 1” for each of the entries in the Centos repo files and “priority = 2” for each of the entries in the other repo files.
-
Install s3cmd:
yum -y install s3cmd
-
Install build essential tools:
yum -y groupinstall "Development Tools" "Development Libraries" "X Software Development"
-
Install Python-related packages:
yum -y install python26 python26-devel python26-libs \ python26-setuptools python26-setuptools-devel python26-simplejson \ python26-imaging python26-imaging-devel python-curl python26-docutils \ python26-lxml python26-memcached python26-Django easy_install26 pyyaml boto dnspython pip virtualenv pssh multiprocessing ctypes nose pyrex
-
Install other tools and libraries:
yum -y install nfs-utils-lib-devel java-1.6.0-openjdk-devel zsh ksh csh \ tcsh unzip mysql screen httpd emacs ntsysv bz2 curses sqlite zlib keychain tmux \ git mercurial encfs libyaml-devel rxvt
-
Install OpenMPI development package:
yum -y install openmpi-devel
-
Configure mpi via mpi-selector:
mpi-selector --set openmpi-1.4-gcc-x86_64 --yes --system
-
Logout and login to get the updated mpi environment
-
Test the grid engine. This show give:
ompi_info | grep -i grid # MCA ras: gridengine (MCA v2.0, API v2.0, Component v1.4.1)
-
Install mpi4py:
easy_install26 mpi4py
-
Test mpi4py installation:
mpi4py_version="mpi4py-1.2.1" wget http://mpi4py.googlecode.com/files/$mpi4py_version.tar.gz tar xzvf $mpi4py_version.tar.gz cd $mpi4py_version/test python26 runalltest.py
-
Launch one of the 32bit or 64bit StarCluster AMI's and copy /opt/sge6-fresh to /opt/sge6-fresh on your new image host.
-
Install DRMAA-python:
wget http://drmaa-python.googlecode.com/files/DRMAA-python-0.2.tar.gz tar xzvf DRMAA-python-0.2.tar.gz cd DRMAA-python-0.2 nano setup.py # set SGE6_ROOT='/opt/sge6-fresh' and save python26 setup.py install cd .. rm -f DRMAA-python-0.2.tar.gz ln -s /opt/sge6-fresh/lib/lx24-amd64/libdrmaa.so.1.0 /usr/lib64/libdrmaa.so.1.0 ln -s /usr/lib64/libdrmaa.so.1.0 /usr/lib64/libdrmaa.so
-
Test:
python26 -c "import DRMAA" python26 -c "import drmaa"
Please follow the same instructions listed in the StarCluster Ubuntu 10.10 Guide
This section is purely optional and was documented because the original author of the guide needed PETSc. Please ignore if you have no interest in PETSc.
-
Download the sources:
petsc_version="petsc-3.1-p4" DEV_HOME=/usr/local/src mkdir /usr/lib/petsc cd /usr/lib/petsc wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/$petsc_version.tar.gz tar xzvf $petsc_version.tar.gz cd $petsc_version
-
Configure PETSc:
./config/configure.py --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions \ --with-x=1 --with-debugging=0 --with-shared --useThreads 0 \ --with-mpi-dir=/usr/lib64/openmpi/1.4-gcc \ --with-blas-lib="[/usr/lib/libcblas.so,/usr/lib/libf77blas.so,/usr/lib/libatlas.so]" \ --with-lapack-lib="[/usr/lib/liblapack.so,/usr/lib/libatlas.so]" \ --with-umfpack=1 --with-umfpack-include=/usr/include \ --with-umfpack-lib="[/usr/lib/libumfpack.so,/usr/lib/libamd.a]" \ --download-plapack
-
Build PETSc:
export PETSC_DIR=$PWD export PETSC_ARCH=linux-gnu-c-opt make all test
-
Cleanup tar.gz files:
cd ../ rm -f $petsc_version.tar.gz cd ~ rm -f $DEV_HOME/PLAPACKR32.tgz
-
Install petsc4py:
easy_install26 petsc4py
-
Test the installation:
wget http://petsc4py.googlecode.com/files/petsc4py-1.1.tar.gz tar xzvf petsc4py-1.1.tar.gz cd petsc4py-1.1/test python26 runtests.py cd ~ rm -f petsc4py-1.1.tar.gz rm -Rf petsc4py-1.1
This section is purely optional and was documented because the original author of the guide needed NLTK. Please ignore if you have no interest in NLTK.
-
Download sources:
nltk_version="nltk-2.0b9" easy_install26 nltk wget http://nltk.googlecode.com/files/$nltk_version.zip unzip $nltk_version.zip cd $nltk_version
-
Install ntlk:
python26 setup.py install
-
Cleanup:
cd ../ rm -f $nltk_version.zip rm -Rf $nltk_version
-
Download nltk download (can take a while!):
python26 -m nltk.downloader -d /usr/share/nltk_data all
In a local terminal:
starcluster ebsimage <id> <name>