On Nov 10, 2011, at 7:17 , case wrote:
> On Thu, Nov 10, 2011, Michael Sternberg wrote:
>> Here's a snippet from my build script. Are you saying I need to re-run
>> AT15_Amber11.py right before step (4)?
>
> Yes: you must run AT15_Amber11.py after each run of configure. I think
> that Jason may be preparing a patch to the configure script that will make that
> happen automagically.
I am happy to report almost complete install success for Amber11 + AT1.5 (except for 2.5% of test failures, to be traced) on my platform:
$ cat /etc/redhat-release
CentOS release 5.6 (Final)
$ gmake --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
$ ifort --version
ifort (IFORT) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Moral: It would be really helpful for newcomers to deinterlace the installation instructions between Amber and AmberTools. They may be two different packages in scope and for some sort of administrative or legal reason, but they are intimately linked at the installation step. It has been a matter of trial and error for me to figure out when and where to apply "make clean", apply the .py patch file, and in what order to compile the parallel bits (all of AmberTools first, then all of Amber, OR all serial first then all parallel?).
I use the script below to build and test all components, {Amber,AmberTools}-{serial,parallel}. For clarity, the directories involved are as follows:
/home/share/soft/amber/EMBODY build script
/home/share/soft/amber/dist/ holds .tar and patches
/home/share/soft/amber/orig/amber11/ untarred Amber and AmberTools
/home/share/soft/amber/patched/amber11/ copied from orig/ and patched
/home/share/soft/amber/embody-11.0-5/ build and test logs
/opt/soft/amber-11.0-5 final installation (bin, lib, ...)
/opt/soft/modulefiles/amber Environment Modules
$ grep -c PASSED embody-11.0-5/test.log
1090
$ grep -c FAILURE: embody-11.0-5/test.log
28
BTW, the EMBODY script works with my build tool
https://trac.anl.gov/embody/ . The tool calls user-defined (or default) functions stage_<name>(), providing the necessary variables and directories. The output of all stages is logged.
With best regards,
Michael
------------------------------------------------------------------------------------------------------
#!/bin/bash
# $Id: EMBODY,v 1.4 2011/11/10 20:54:31 stern Exp stern $
# Amber/AmberTools
#
# Note: does not support --prefix=<dir> Workaround: treat the src tree as
# installable and compile therein.
NAME=amber
VERSION=11.0
BUILD=5
# package versions
AMBER_DIST=Amber11.tar.bz2
AMBERTOOLS_DIST=AmberTools-1.5.tar.bz2
AMBER_ROOT=amber11
AMBER_PATCHES_ALL=bugfix.1to17.tar.bz2
AMBERTOOLS_PATCHES_ALL=bugfix.all
# buff up Amber build scripts after AmberTools compiled.
DEBURR_AMBER=AT15_Amber11.py
module unload mkl
module load mkl/10.3.7
module unload openmpi
module load openmpi/1.4.4-intel11-1
module load embody
source libembody
# compilation settings
export SSE_TYPES=SSE2,SSSE3
export AMBERHOME=$prefix
build_root=$PWD
MODULE_WHATIS="AMBER"
MODULE_HELP="
AMBER refers to two things: a set of molecular mechanical force fields
for the simulation of biomolecules (which are in the public domain, and
are used in a variety of simulation programs); and a package of
molecular simulation programs which includes source code and demos.
This is the AMBER code, version $VERSION, which is distributed by UCSF
subject to a licensing agreement.
http://ambermd.org/
"
MODULE_DEP="
conflict $NAME
"
MODULE_AUX="
prepend-path MANPATH \$prefix/AmberTools/man
setenv AMBERHOME \$prefix
"
stage_distclean () {
# Rededicated stage to wipe and recreate source tree from tar and patches.
# unpack a clean distribution locally, and prepare a patch base
rm -rf orig patched
mkdir -p orig patched 2> /dev/null
# fetch patches
(
cd dist
wget -N
http://ambermd.org/bugfixes/AmberTools/1.5/$AMBERTOOLS_PATCHES_ALL
wget -N
http://ambermd.org/bugfixes/$VERSION/$AMBER_PATCHES_ALL
wget -N
http://ambermd.org/bugfixes/$VERSION/apply_bugfix.x
chmod +x ./apply_bugfix.x
)
gtar -C orig -jxvf dist/$AMBER_DIST
gtar -C orig -jxvf dist/$AMBERTOOLS_DIST
rsync --delete -SHavi orig/ patched/
# apply patches; temporarily redirect AMBERHOME
cd patched/$AMBER_ROOT
patch -p0 -N < $build_root/dist/$AMBERTOOLS_PATCHES_ALL
AMBERHOME=$PWD $build_root/dist/apply_bugfix.x $build_root/dist/$AMBER_PATCHES_ALL
# Which one comes first? Either way, we get:
# 13 out of 13 hunks FAILED -- saving rejects to file AmberTools/src/configure.rej
# remove droppings
rm amber_bugfix*.txt
# The build step originally failed because MKL arch dir "em64t" is
# incorrect; FIX to make it "intel64":
find . -type f ! -name \*.orig -print0 \
| xargs -0 grep -l lib/em64t \
| xargs perl -i.orig -pe 's,lib/em64t,lib/intel64,g'
## Heisenbug - disappeared on re-creation attempt.
#patch -p0 -N < $build_root/freeform.patch
# cleanup for binary installation
rm GNU_Lesser_Public_License README
}
stage_prep () {
# This stage best run from the host serving /opt (mgmt01). Rededicated
# stage to merely mirror the patched source tree into the install dir.
cd patched/$AMBER_ROOT
rsync -SHavi \
--omit-dir-times \
--include='*/*/test' \
--exclude=\*.{orig,rej} \
--exclude={test,benchmarks} \
--exclude=$DEBURR_AMBER \
--delete-excluded \
./ \
$prefix/
ln -snf $PWD/{test,benchmarks} $prefix
ln -snf $PWD/AmberTools/{test,benchmarks} $prefix/AmberTools
}
stage_build () {
# Moved all native AmberTools/Amber steps here, including configure steps.
# (1) AmberTools, serial
cd $prefix/AmberTools/src
./configure intel
cp -p config.h $build_root/$embody_logdir/config.h.serial # preserve
make install
# (2) Amber main, serial
# But first apply AmberTools patch.
cd $prefix
python $build_root/patched/$AMBER_ROOT/$DEBURR_AMBER
cd $prefix/src
make serial
# (3) AmberTools, parallel
# First, give access to newly provided byacc (and whatever else).
export PATH=$prefix/bin:$PATH
cd $prefix/AmberTools/src
make clean
./configure -mpi intel
cp -p config.h $build_root/$embody_logdir/config.h.parallel # preserve
make install
# (4) Amber main, parallel
# config.h is still good, but need to patch again.
cd $prefix
python $build_root/patched/$AMBER_ROOT/$DEBURR_AMBER
cd $prefix/src
make clean
make parallel
}
stage_test () {
#--------------------
# AmberTools testbed
#--------------------
dir=$embody_testdir/AmberTools/test
mkdir -p $dir
rsync -SHavi \
--omit-dir-times \
--delete \
patched/$AMBER_ROOT/AmberTools/test/ \
$dir/
ln -s $prefix/{bin,dat,include,lib,share,src} \
$embody_testdir/
ln -s $prefix/AmberTools/{bin,include,lib,share,src} \
$embody_testdir/AmberTools/
make -C $dir test
DO_PARALLEL='mpirun -np 4 -mca btl self,tcp' \
make -C $dir test.parallel
#--------------------
# Amber testbed
#--------------------
dir=$embody_testdir/test
mkdir -p $dir
rsync -SHavi \
--omit-dir-times \
--delete \
patched/$AMBER_ROOT/test/ \
$dir/
ln -s $prefix/{bin,exe,dat,include,lib,share,src} \
$embody_testdir/
make -C $dir test
DO_PARALLEL='mpirun -np 4 -mca btl self,tcp' \
make -C $dir test.parallel
}
stage_install () {
# no steps necessary, except perhaps a definitive compile-freeze.
cd $prefix
#rm -rf {.,AmberTools}/{src,test,benchmarks}
}
stage_clean () {
make -C $prefix/AmberTools/src clean
make -C $prefix/src clean
}
embody_stages
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Nov 11 2011 - 08:00:02 PST