How the Babel Developers Install BabelGreetings Babelers! Today for a variety of technical resasons, I've got to install a SVN snapshot of Babel on a bunch of different machines. Our existing toolstack on many of these machines is out of date, so I'm essentially going to start from scratch. For those of you who've tried to build Babel and wonder how we developers do it, I figured I'd write up this wiki as a kind of lab notes for the experience. NOTE: You'll see that I'm installing a significant amount of build tools. This is because I'm toying with SVN checkouts. Most users download releases and never modify the makefiles or configure scripts in Babel, and can blissfully ignore some of the steps I'm doing. I'll use this glyph ![]() SoftwareHere's a list of all the software I'm going to use today. (actually the next few days, since I've got mucho meetings interrupting the technical work.)
SystemsSince I've got a filesystem that's crossmounted on these machines, I'm going to do a lot of VPATH builds, but you can set up your system however you like. The three main systems I'm going to handle is
SetupSo here's my high-level directory structure:ROOT=/opt/babel BABEL_SRCS=${ROOT}/srcs POWER=${ROOT}/power5-fed X86=${ROOT}/x86-elan3 OPTERON=${ROOT}/opteron-ib ALL_SYSTEMS="POWER X86 OPTERON" The rest of the instructions will be in terms of these environment variables, so if you want to install along side with me, you'll want to set these to something appropriate for your system. Now I'm going to download and unpack all this code in my ${BABEL_SRCS} directory cd ${BABEL_SRCS} wget http://www.python.org/ftp/python/2.5/Python-2.5.tgz wget http://superb-east.dl.sourceforge.net/sourceforge/numpy/numpy-1.0.1.tar.gz wget http://superb-east.dl.sourceforge.net/sourceforge/chasm-interop/chasm_1.4.RC2.tar.gz wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.8.tar.bz2 # iff you are developing Babel wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2 # iff you are developing Babel wget http://ftp.gnu.org/gnu/automake/automake-1.10.tar.bz2 # iff you are developing Babel wget http://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz # iff you are developing Babel svn co svn+ssh://cca-forum.org/home/svn/babel/trunk babel_svn # or wget http://www.llnl.gov/CASC/components/docs/babel-1.0.2.tar.gz for i in *.bz2; do gtar jxvf $i; done for i in *gz; do gtar zxvf $i; done Picking Your CompilerNow we have to commit to a suite of compilers and compile-time flags. For my $X86 machine, I'll use the Intel 9.1 compilers for everything except Fortran 77, which I'll use g77... just for fun! export PLATFORM=$X86 #or pick your favorite here export PREFIX=${PLATFORM}/icc91 export PATH=${PREFIX}/bin:${PATH} export LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH} export CC=icc export CFLAGS=-g export CXX=icpc export CXXFLAGS=-g export F77=g77 export FFLAGS=-g export FC=ifort export FCFLAGS='-g -Vaxlib' Staging the buildMy instincts say to do VPATH builds for all the remaining codes. Unfortunately, they do not all follow GNU coding guidelines. So I'll simply build them in the code tree, install, and wipe the directory and create a fresh one from the tarball when I go to the next platform. ChasmInstallation is relatively straightforward. The need to explicitly state the F90 compiler vendor is necessary. Also Chasm uses the more obvious (but deprecated by autotools) F90 variable instead of FC.cd ${BABEL_SRCS}/chasm ./configure --with-F90-vendor=Intel F90=${FC} --disable-pdt --prefix=${PREFIX} make all install I did find one bug with Chasm while installing it. But its a cosmetic one that I logged in Sourceforge. $ cd $BABEL_SRCS $ chasm-config --version 1.2.1 PythonThis is fairly straightforward. The --enable-shared flag is often needed ot generate a libpython.so which is critical for server-side Python. cd ${BABEL_SRCS}/Python-2.5 ./configure --enable-shared --prefix=${PREFIX} make all install ![]() NumPyThis uses Python's build system. So if you just installed Python in the last step, here's a little self-test to make sure things are going well. if test "`which python`" != ${PREFIX}/bin/python; then for i in 1 2 3 4 5; do echo "STOP! something is wrong" done sleep 5 fi Now you're ready to install NumPy. cd ${BABEL_SRCS}/numpy-1.0.1 python setup.py build python setup.py install If you are using a pre-existing Python that is installed somewhere you cannot write to, then you'll have to specify an alternate location to install NumPy and set up your environment so that Python will look at the alternate location for resources. If you'd like to verify all is well, try this. $ cd ${BABEL_SRCS} $ python Python 2.5 (r25:51908, Mar 7 2007, 18:14:04) GCC Intel(R) C++ gcc 3.4 mode on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> If you don't get an ImportError, you're in business. Note the glyph in the title? It means that most users can skip this entire section. Folks who need this information already know who they are. The tricky part about the build tools is installing them in proper order as each depends on the other. The order is always M4, Autoconf, Automake, Libtool. The fastest way to do this is put the install directory in your search path and rehash after every part is intalled. I generally install build tools in a special directory away from other things. Most people who use Babel don't need to use our particular version of autotools, only the few folks who are developing in the Babel tree do. Futhermore, we can have multiple Babel installs per machine (different compiler suites, etc.) and these tools clearly are immune from these variations. DEV_TOOLS=${PLATFORM}/dev_tools mkdir $DEV_TOOLS export PATH=${DEV_TOOLS}/bin:${PATH} export LD_LIBRARY_PATH=${DEV_TOOLS}/lib:${LD_LIBRARY_PATH} for i in m4-1.4.8 autoconf-2.61 automake-1.10 libtool-1.5.22; do ( cd $i; ./configure --prefix=${DEV_TOOLS}; make all install;) rehash; done In my setup, I'll have several versions of Babel built against all the resources we've already installed. So I'll make a new subdirectory under $PREFIX for Babel. Plus, I'll do a VPATH build to not muddy up the SVN checkout export BABEL_PREFIX=${PREFIX}/babel-r5911 export BABEL_BUILDDIR=${BABEL_PREFIX}/_build mkdir -p $BABEL_BUILDDIR cd $BABEL_BUILDDIR There are a couple of one-time environment settings that need to be made. I need to specify custom JAVA settings, for example. This machine has a commercial JVM that was compiled with Intel compilers, so your JNI_INCLUDES and JNI_LDFLAGS will probably be different. One-time settings such as these can be done simply as arguments to the configure script. The -C flag accellerates the configuration process somewhat by pushing the two configure scripts to share a cache file. Since this is a two processor node, I'll use -j4 for make. This creates four-way parallelism in the build (rule of thumb is two threads per processor is the sweet-spot). ${BABEL_SRCS}/babel_svn/configure \ CHASMPREFIX=${PREFIX} \ JNI_INCLUDES=-I${JAVAHOME}/include \ JNI_LDFLAGS=-L${JAVAHOME}/jre/bin \ --with-mpi -C \ --prefix=${BABEL_PREFIX} make -j4 all make install Created by: kumfert last modification: Tuesday 13 of March, 2007 [20:27:23 UTC] by kumfert |
Login Online users
5
online users
|