diff options
author | nicolabertoldi <nicolabertoldi@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-03 00:51:06 +0400 |
---|---|---|
committer | nicolabertoldi <nicolabertoldi@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-03 00:51:06 +0400 |
commit | 8b459e004a657500343abe1be6a4d2a929ed55e3 (patch) | |
tree | ded95e47aa52c45f94cfd9e442f83dd987e216e4 | |
parent | 7408c94cd1fc02c78f5c6843afdfcf081473b898 (diff) |
check in qsub-wrpper.pl with temporary log dir in the working dir
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@472 1f5c12ca-751b-0410-a591-d2e778427230
-rwxr-xr-x | scripts/generic/qsub-wrapper.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/generic/qsub-wrapper.pl b/scripts/generic/qsub-wrapper.pl index e93946791..fbeb72790 100755 --- a/scripts/generic/qsub-wrapper.pl +++ b/scripts/generic/qsub-wrapper.pl @@ -9,7 +9,7 @@ use strict; my $queueparameters="-l ws06ossmt=true -l mem_free=0.5G"; my $workingdir=$ENV{PWD}; -my $tmpdir="/tmp"; +my $tmpdir="$workingdir/tmp$$"; my $jobscript="$workingdir/job$$"; my $qsubout="$workingdir/out.job$$"; my $qsuberr="$workingdir/err.job$$"; @@ -120,6 +120,8 @@ init(); usage() if $cmd eq ""; +safesystem("mkdir -p $tmpdir") or die; + preparing_script(); my $qsubcmd="qsub $queueparameters -sync yes -o $qsubout -e $qsuberr -N $qsubname ${jobscript}.bash >& ${jobscript}.log"; @@ -174,6 +176,7 @@ sub remove_temporary_files(){ unlink("${jobscript}.log"); unlink("$qsubout"); unlink("$qsuberr"); + rmdir("$tmpdir"); } sub safesystem { |