fly rebuilt

May 16, 2014
by admin

I have rebuilt fly with a machine donated from Mt. Holyoke (thanks Jeremy and Ron!). It’s a Dell 2950 – dual quad-core 2.0Ghz Xeon with 32GB of RAM and a couple of 1TB hard drives we had lying around in the library server room. I upgraded to ROCKS 6.1.1 while I was at it, which isn’t all that much different from ROCKS 6.0, it turns out, but the ganglia interface is a little nicer, and it comes with lots of security updates, etc. I deleted some unused accounts, installed newer versions of some software (including tractor), and now I’m trying to compile emergent again.

That was MUCH easier than I thought it was going to be. It only took me a few hours – I thought it would take a week.

One lesson learned: Make sure /etc/sysconfig/network has fly.local set as the hostname so that idmapd properly maps things to the .local domain. If you don’t, everything gets mapped to being owned by nobody when you log into the nodes. The first obvious symptom of this is that you get asked for a password when logging into a node, because SSH says that ownership doesn’t match on .ssh/authorized_keys, which it in fact doesn’t, because you are not nobody 🙂



One Response to “fly rebuilt”

  1.   admin Says:

    Emergent compiled AND RUNS, after recompiling EVERYTHING!

    Here’s my message to the list, for my own future reference:

    Hi guys,
    I may have gotten this working. I have updated to ROCKS 6.1.1 (based on CentOS 6.5) and rebuilt from scratch. Here’s my exact steps, I’m pretty sure (I hope I didn’t forget anything!):

    1. Install ROCKS 6.1.1 with all the OS rolls.
    2. yum install readline-devel
    3. grab scons-2.3.1-1.noarch.rpm from http://prdownloads.sourceforge.net/scons/scons-2.3.1-1.noarch.rpm and install
    4. build and install serf-1.3.5 to /share/apps (the shared folder between all the nodes in ROCKS)
    5. build and install subversion-1.8.8 to the same place
    6. Install the devtools packages for CentOS (specifically devtoolset-1.1-binutils-2.23.51.0.3-3.el6.x86_64.rpm, devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.x86_64.rpm, devtoolset-1.1-gcc-4.7.2-5.el6.x86_64.rpm, devtoolset-1.1-runtime-1-13.el6.noarch.rpm, and devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm)
    7. Run the following script, based heavily upon the one from the site (thank you Brian Mingus!)
    8. run LD_LIBRARY_PATH=/share/apps/lib:/share/apps/Trolltech/lib:$LD_LIBRARY_PATH /share/apps/bin/emergent -nogui and get a prompt! No further testing has been performed – Jaime, want to test more thoroughly for me?

    If this works and looks decent, I can probably make a perl script that checks if steps 2-6 need to be done, does them if need be, and then runs the bash script. Let me know what you think.

    Here’s the script:

    #!/bin/bash
    # Build emergent and all of its prerequisites from source Copyright (C)
    # 2009-2010 Brian Mingus, University of Colorado at Boulder
    # Updated in 2014 by Wm. Josiah Erikson, Hampshire College

    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or (at
    # your option) any later version.

    # This program is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # General Public License for more details.

    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    # 02110-1301, USA.

    ################# #################
    # * Do *NOT* run this script without first considering whether you
    # should modify the variables in Step 1 * This script will take several
    # hours to run. * You need approximately 2.5 GB of free space on your
    # disk. * By default this script will build emergent in ~/emergent (~
    # means $HOME) * By default this script will build emergent’s
    # prerequisites in ~/emergent/src_build * In order to update emergent in
    # the future: cd ~/emergent && svn up && cd build && make -j2 && make
    # install * By default do *NOT* run this script as root * If you get
    # cannot find library errors, or if you can not run emergent, * you may
    # need to put the following lines (uncommented) at the end of your
    # ~/.bashrc export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH export
    # EMERGENT_PREFIX_DIR=$HOME PATH=$HOME/bin:$PATH
    # If building on CentOS, make sure to download and install the scons RPM
    # from scons-2.3.1-1.noarch.rpm from http://prdownloads.sourceforge.net/scons/scons-2.3.1-1.noarch.rpm
    # and install readline-devel with yum, then build serf-1.3.5 and install,
    # then build and install subversion-1.8.8, and then install the devtoolset-1.1 RPM packages
    #################
    #################

    echo ‘###################################’
    echo Step 1: Configuration
    echo ‘###################################’

    # Modifiable variables
    INSTALL_PREFIX=/share/apps # If you want to install to the system set this to /usr/local and *RUN THE SCRIPT AS ROOT*
    BUILD_DIR=/home/josiah/build/emergent/src_build # This is where we will download and build all packages before install
    MAKE_JOBS=”-j8″ # Change the integer to the number of cpus that you have available for building

    # Do not modify anything below this line
    QUARTER_VERSION=latest
    QT_VERSION=4.7.4
    COIN_VERSION=4.0.0a
    CMAKE_VERSION=2.8.5
    GSL_VERSION=1.13
    ODE_VERSION=0.11.1
    PNG_VERSION=1.2.39
    JPG_VERSION=7

    FTP_REPO=ftp://grey.colorado.edu/pub/emergent
    export QTDIR=/share/apps/Trolltech
    export COINDIR=$INSTALL_PREFIX
    LD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$INSTALL_PREFIX/include:/lib:/usr/lib
    export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
    export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
    export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++
    export CMAKE_CXXFLAGS=”-mcmodel=large”
    export LDFLAGS=”-L/share/apps/lib”
    #export CMAKE_PREFIX_PATH=/share/apps/Qt/5.2.1/gcc_64/lib/cmake

    if [[ ! -d $INSTALL_PREFIX ]]
    then
    mkdir $INSTALL_PREFIX
    fi

    if [[ -d $BUILD_DIR ]]
    then
    rm -fr $BUILD_DIR
    fi

    mkdir -p $BUILD_DIR

    #if [[ -e ~/.bashrc ]]
    #then
    # source ~/.bashrc
    #fi

    export PATH=/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2:/opt/centos/devtoolset-1.1/root/usr/bin/:$QTDIR/bin:$INSTALL_PREFIX/bin:/bin:/usr/bin:$PATH
    echo ‘###################################’
    echo Step 2: CMake
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/cmake-${CMAKE_VERSION}.tar.gz
    tar -xzf cmake-${CMAKE_VERSION}.tar.gz
    cd cmake-${CMAKE_VERSION}
    ./configure –prefix=$INSTALL_PREFIX
    gmake $MAKE_JOBS
    make install
    #echo “Skipping…”

    echo ‘###################################’
    echo Step 3: jpeg
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/jpegsrc.v${JPG_VERSION}.tar.gz
    tar -xzf jpegsrc.v${JPG_VERSION}.tar.gz
    cd jpeg-${JPG_VERSION}
    ./configure –prefix=$INSTALL_PREFIX
    make $MAKE_JOBS
    make install
    #echo “Skipping….”

    echo ‘###################################’
    echo Step 4: png
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/libpng-${PNG_VERSION}.tar.gz
    tar -xzf libpng-${PNG_VERSION}.tar.gz
    cd libpng-${PNG_VERSION}
    ./configure –prefix=$INSTALL_PREFIX
    make $MAKE_JOBS
    make install
    #echo “Skipping…”
    echo ‘###################################’
    echo Step 5: Qt
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/qt-everywhere-opensource-src-${QT_VERSION}.tar.gz
    tar -xzf qt-everywhere-opensource-src-${QT_VERSION}.tar.gz
    cd qt-everywhere-opensource-src-${QT_VERSION}
    sed -i ‘s/OPT_CONFIRM_LICENSE=no/OPT_CONFIRM_LICENSE=yes/’ configure
    ./configure -prefix $QTDIR -opensource
    make $MAKE_JOBS
    make install
    #echo “Skipping”
    echo ‘###################################’
    echo Step 6: Coin
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/Coin-${COIN_VERSION}.tar.gz
    tar -xzf Coin-${COIN_VERSION}.tar.gz
    cd Coin-${COIN_VERSION}
    ./configure –prefix=$INSTALL_PREFIX
    make $MAKE_JOBS
    make install
    #echo “Skipping…”
    echo ‘###################################’
    echo Step 7: Quarter
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/Quarter-${QUARTER_VERSION}.tar.gz
    tar -xzf Quarter-${QUARTER_VERSION}.tar.gz
    cd Quarter
    ./configure –prefix=$INSTALL_PREFIX –with-qt-designer-plugin-path=$QTDIR/plugins/designer
    make $MAKE_JOBS
    make install
    #echo “Skippping…”

    echo ‘###################################’
    echo Step 8: GNU Scientific Library
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/gsl-${GSL_VERSION}.tar.gz
    tar -xzf gsl-${GSL_VERSION}.tar.gz
    cd gsl-${GSL_VERSION}
    ./configure –prefix=$INSTALL_PREFIX
    make $MAKE_JOBS
    make install
    echo “Skipping…”

    echo ‘###################################’
    echo Step 9: Open Dynamics Engine
    echo ‘###################################’

    cd $BUILD_DIR
    wget ${FTP_REPO}/ode-${ODE_VERSION}.tar.gz
    tar -xzf ode-${ODE_VERSION}.tar.gz
    cd ode-${ODE_VERSION}
    ./configure –enable-shared –disable-static –prefix=$INSTALL_PREFIX
    make $MAKE_JOBS
    make install

    echo ‘###################################’
    echo Step 10: emergent
    echo ‘###################################’

    cd $BUILD_DIR
    svn checkout –username anonymous –password emergent http://grey.colorado.edu/svn/emergent/emergent/trunk $BUILD_DIR/emergent_svn/
    cd $BUILD_DIR/emergent_svn/
    #svn upgrade
    #svn up
    ./configure –prefix=$INSTALL_PREFIX –emer-mac-arch-bits=64 –qt4 –clean
    cd build
    make $MAKE_JOBS
    make install

    #echo “You must now cd $BUILD_DIR/build and then make install as root.”

    echo “###################################”
    echo “Step 11: You’re done. Type emergent at the command line.”
    echo “”
    echo “If you did a local install (not into /usr/local) then you can start emergent like this:”
    echo “LD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$QTDIR/lib:\$LD_LIBRARY_PATH $INSTALL_PREFIX/bin/emergent”
    echo “”
    echo “If you get errors regarding missing libraries, or your shell cant see emergent, put this at the end of your ~/.bashrc:”
    echo “LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH”
    echo “PATH=$HOME/bin:$PATH”
    echo “###################################”

Leave a Reply

You must be logged in to post a comment.