Cleaned up create-db sge script a bit.
This commit is contained in:
parent
1647aac086
commit
c33e8204ea
|
@ -10,4 +10,4 @@ set -o nounset
|
|||
|
||||
printenv
|
||||
|
||||
"$BASEDIR/ExtensionCrawler/create-db" -t 1 -a "$ARCHIVE" -n $SGE_TASK_ID -N $MAX_SGE_TASK_ID "$BASEDIR/out"
|
||||
"$BASEDIR/ExtensionCrawler/create-db" -t 1 -a "$ARCHIVE" -n $SGE_TASK_ID -N $MAX_SGE_TASK_ID $EXTRAARGS
|
||||
|
|
|
@ -2,16 +2,22 @@
|
|||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
ARCHIVE=${1:-$(ssh sharc.shef.ac.uk find /shared/brucker_research1/Shared/BrowserExtensions/.snapshot -maxdepth 1 -name \"D*\" | sort -r | head -n1)}
|
||||
echo "Using archive $ARCHIVE"
|
||||
EXTRAARGS=${EXTRAARGS:-}
|
||||
echo "Using extra args: $EXTRAARGS"
|
||||
|
||||
TARGETDIR="${2:-/data/\$USER}/create-db-$(date +%Y%m%d-%H%M%S)"
|
||||
NRJOBS=${NRJOBS:-256}
|
||||
echo "Using $NRJOBS jobs"
|
||||
|
||||
ARCHIVE=${ARCHIVE:-$(ssh sharc.shef.ac.uk find /shared/brucker_research1/Shared/BrowserExtensions/.snapshot -maxdepth 1 -name \"D*\" | sort -r | head -n1)}
|
||||
echo "Using archive: $ARCHIVE"
|
||||
|
||||
TARGETDIR="${TARGETDIR:-/data/\$USER}/create-db-$(date +%Y%m%d-%H%M%S)"
|
||||
echo "Using target dir: $TARGETDIR"
|
||||
BASEDIR=$( cd $(dirname "$0"); cd ..; pwd -P )
|
||||
|
||||
echo "Creating dirs ..."
|
||||
ssh sharc.shef.ac.uk mkdir -p $TARGETDIR/ExtensionCrawler
|
||||
ssh sharc.shef.ac.uk mkdir -p $TARGETDIR/logs
|
||||
ssh sharc.shef.ac.uk mkdir -p $TARGETDIR/out
|
||||
|
||||
echo "Pushing $BASEDIR to sharc.shef.ac.uk:$TARGETDIR/ExtensionCrawler ..."
|
||||
rsync -zr --exclude "$BASEDIR/archive" "$BASEDIR/" sharc.shef.ac.uk:"$TARGETDIR/ExtensionCrawler"
|
||||
|
@ -20,10 +26,11 @@ echo "Starting job ..."
|
|||
ssh sharc.shef.ac.uk \
|
||||
ARCHIVE=\"$ARCHIVE\" \
|
||||
BASEDIR=\"$TARGETDIR\" \
|
||||
MAX_SGE_TASK_ID=256 \
|
||||
EXTRAARGS=\"$EXTRAARGS\" \
|
||||
MAX_SGE_TASK_ID=\"$NRJOBS\" \
|
||||
qsub \
|
||||
-V \
|
||||
-t 1-256 \
|
||||
-t 1-$NRJOBS \
|
||||
-j yes \
|
||||
-o "$TARGETDIR/logs" \
|
||||
"$TARGETDIR/ExtensionCrawler/sge/create-db.sge"
|
||||
|
|
Loading…
Reference in New Issue