File: master_distribution.sh

package info (click to toggle)
eprover 2.6%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 21,288 kB
  • sloc: ansic: 331,111; csh: 12,026; python: 10,178; awk: 5,825; makefile: 461; sh: 389
file content (39 lines) | stat: -rwxr-xr-x 1,029 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/sh
#
# Loop over a problem set. If
# /usr/wiss/stenzg/home_sun/tmp/SUNHALLE_RESERVED exists, run on
# sunhalle52-107, otherwise use all hosts. 
#

MYHOME=/usr/gast/schulz/home_sun/
STENZHOME=/usr/gast/stenzg/home_sun/

#MYHOME=/home/schulz
#STENZHOME=/home/schulz

touch $MYHOME/dummy;

while test -f $MYHOME/dummy; do
    echo New iteration - checking for jobs
    if test -f $MYHOME/distribute_jobs; then
	for file in `cat $MYHOME/distribute_jobs`; do
	    echo Running on $file
	    if test -f $STENZHOME/tmp/SUNHALLE_RESERVED; then    
		distribute_eprover.awk $file 52 107;
	    else
		distribute_eprover.awk $file;
	    fi;
	done;
        mv $MYHOME/distribute_jobs $MYHOME/distribute_jobs_done
	if test -f $MYHOME/distribute_jobs_queued; then
	    mv $MYHOME/distribute_jobs_queued $MYHOME/distribute_jobs
        fi;
    else
        if test -f $MYHOME/distribute_jobs_queued; then
	    mv $MYHOME/distribute_jobs_queued $MYHOME/distribute_jobs
	else
	    echo Sleeping
	    sleep 300;	
        fi;
    fi;
done;