From c230e7ef96be9f8ea3bc73fbb0acec45f457ca3d Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Wed, 27 Feb 2019 22:16:23 +0000 Subject: [PATCH] Cleanup. --- sge/grepper.sge | 11 ---------- sge/grepper.sh | 56 ------------------------------------------------- 2 files changed, 67 deletions(-) delete mode 100755 sge/grepper.sge delete mode 100755 sge/grepper.sh diff --git a/sge/grepper.sge b/sge/grepper.sge deleted file mode 100755 index c9d46dc..0000000 --- a/sge/grepper.sge +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -o nounset - -SING_EXEC="singularity exec --pwd /opt/ExtensionCrawler -B $TMPDIR:/tmp $SING_IMG" - -printenv -echo "The following parameter were passed: $*" -echo "Printing the content of $ARCHIVE to force mounting:" -ls "$ARCHIVE" - -/usr/bin/time $SING_EXEC ./grepper -t 1 -a "$ARCHIVE" -n $SGE_TASK_ID -N $MAX_SGE_TASK_ID $* | bzip2 > "$BASEDIR/out/$SGE_TASK_ID.bz2" diff --git a/sge/grepper.sh b/sge/grepper.sh deleted file mode 100755 index a08134b..0000000 --- a/sge/grepper.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/bash -set -o nounset -set -o errexit - -BASEDIR=$( cd $(dirname "$0"); cd ..; pwd -P ) - -NRJOBS=${NRJOBS:-256} -echo "Using $NRJOBS jobs" - -JOBRANGE=${JOBRANGE:-1-$NRJOBS} -echo "Executing jobs $JOBRANGE" - -ARCHIVE=${ARCHIVE:-$(ssh sharc.shef.ac.uk find /shared/brucker_research1/Shared/BrowserExtensions/archive/.snapshot -maxdepth 1 -name \"D*\" | sort -r | head -n1)} -echo "Using archive: $ARCHIVE" - -TARGETDIR="${TARGETDIR:-/data/\$USER}/grepper-$(date +%Y%m%d-%H%M%S)" -echo "Using target dir: $TARGETDIR" - -SING_IMG_SRC="${SING_IMG_SRC:-/shared/brucker_research1/Shared/BrowserExtensions/excrawl.img}" -SING_IMG="$TARGETDIR/excrawl.img" -if ! ssh sharc.shef.ac.uk [ -f "$SING_IMG_SRC" ]; then - echo -n "$SING_IMG_SRC does not exist! Generate new image and push? (yes/abort): " - read confirm - if [ "$confirm" != yes ]; then - exit 0 - fi - echo "Creating new image ..." - (cd "$BASEDIR/singularity"; ./build.sh) - echo "Pushing new image ..." - scp "$BASEDIR/singularity/ExtensionCrawler.img" sharc.shef.ac.uk:"$SING_IMG_SRC" - rm "$BASEDIR/singularity/ExtensionCrawler.img" -fi -echo "Creating dirs ..." -ssh sharc.shef.ac.uk mkdir -p $TARGETDIR/{logs,out} - -echo "Copying $SING_IMG_SRC to $SING_IMG" -ssh sharc.shef.ac.uk cp "$SING_IMG_SRC" "$SING_IMG" - -echo "Pushing sge script ..." -scp "$BASEDIR/sge/grepper.sge" sharc.shef.ac.uk:"$TARGETDIR/grepper.sge" - -echo "Starting job ..." -ssh sharc.shef.ac.uk \ - SING_IMG=\"$SING_IMG\" \ - ARCHIVE=\"$ARCHIVE\" \ - BASEDIR=\"$TARGETDIR\" \ - MAX_SGE_TASK_ID=\"$NRJOBS\" \ - qsub \ - -V \ - -m a \ - -M "msherzberg1@sheffield.ac.uk" \ - -t $JOBRANGE \ - -j yes \ - -o "$TARGETDIR/logs" \ - "$TARGETDIR/grepper.sge" \ - $*