[GE users] qsub -wd usage

Bart Willems b-willems at northwestern.edu
Sat Oct 25 23:42:40 BST 2008


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Hi All,

I am trying to make our cluster users make use of local scratch space
instead of NFS storage while running their jobs. What I would like to do
is something along the lines of the following job submission script:

#!/bin/bash

# This script should be submitted to the batch scheduler with the qsub
# command as "qsub <scriptname>".

# Lines that begin with "#$" are interpreted by the batch scheduler (SGE)
# as scheduling commands.

# Use this shell as the default shell
#$ -S /bin/bash

# Combine stdout and stderr of job
#$ -j y

# Specify the requested cpu time
#$ -l h_cpu=00:10:00

# Define source and working directories
SRCDIR=/storage/bart/code/
WRKDIR=/scratch/`whoami`/test

# Create working directory
mkdir -p $WRKDIR

# Change to working directory
cd $WRKDIR

# Copy needed files to working directory.
cp $SRCDIR/helloworld .

# run job from working directory
#$ -wd $WRKDIR

# computational command to run
./helloworld


At the end, I would evidently copy back all files from $WRKDIR to $SRCDIR,
but I 'm not even getting that far. The two problems I seem to be facing
are

(1) the -wd option does not like to be followed by a variable
(2) the -wd option must be followed by a directory that already exists

Eventually, I would like the working directory name WRKDIR to be based on
the job_id to make sure that it 's unique, so I cannot make the
directories in advance.

Does anyone have any suggestions on how to tackle this?

Thanks,
Bart


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list