Clear $CRUNCH_TMP/src when starting a job.
authorTom Clegg <tom@clinicalfuture.com>
Wed, 11 Dec 2013 01:38:42 +0000 (17:38 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Wed, 11 Dec 2013 01:38:42 +0000 (17:38 -0800)
closes #1687

sdk/cli/bin/crunch-job

index d003719716e04dde0001f47be38f20bafb27c48b..b3fef233c651956c2b75e838ac924069d8f3f97e 100755 (executable)
@@ -339,13 +339,13 @@ else
   Log (undef, "Install revision ".$Job->{script_version});
   my $nodelist = join(",", @node);
 
-  # Clean out crunch_tmp/work and crunch_tmp/opt
+  # Clean out crunch_tmp/work, crunch_tmp/opt, crunch_tmp/src
 
   my $cleanpid = fork();
   if ($cleanpid == 0)
   {
     srun (["srun", "--nodelist=$nodelist", "-D", $ENV{'TMPDIR'}],
-         ['bash', '-c', 'if mount | grep -q $JOB_WORK/; then sudo /bin/umount $JOB_WORK/* 2>/dev/null; fi; sleep 1; rm -rf $JOB_WORK $CRUNCH_TMP/opt']);
+         ['bash', '-c', 'if mount | grep -q $JOB_WORK/; then sudo /bin/umount $JOB_WORK/* 2>/dev/null; fi; sleep 1; rm -rf $JOB_WORK $CRUNCH_TMP/opt $CRUNCH_TMP/src']);
     exit (1);
   }
   while (1)