#!/bin/sh # Do the HDF5 library configure, make, and tests for Blue Gene/P # Usage: bgmakeh5 USAGE() { cat <> "$resultfile" 2>&1 if [ $? -ne 0 ]; then echo "error in '$banner'. makeh5 aborted." exit 1 fi } # Main body # Setup exit steps and print starting time trap TIMESTAMP 0 TIMESTAMP # Make sure we are at the library root level # by checking couple typical files. Not bullet-proof. if [ ! \( -d $SRCDIR/src -a -d $SRCDIR/config -a -f $SRCDIR/configure \) ] then echo "Could not find the source dir or configure script. Abort." exit 1 fi # no configure if already done. if [ ! -f config.status ]; then echo "$CONFIGURE $@ ..." (TIMESTAMP; nerror=0; $CONFIGURE $@ < /dev/null || nerror=1; TIMESTAMP; exit $nerror) > '#config' 2>&1 if [ $? -ne 0 ]; then echo "error in Configure. Aborted." exit 1 fi else echo configure.status already exists. Skip configure. fi # need to edit the src/H5pubconf.h file. # fork() compile okay but does not exec. xfile=src/H5pubconf.h for macro in H5_HAVE_FORK; do echo comment out $macro from $xfile ed -s $xfile <> '#make' 2>&1 # Compile the library # Okay to use parallel gmake for compiling gmake -i -j 8 >> '#make' 2>&1 gmake -i install #test_log="#test.$$" # Do make check #env HDF5_Make_Ignore=yes gmake check > $test_log 2>&1 #if grep FAILED $test_log; then # echo "***FAILED detected in " $test_log #fi