#!/bin/csh -f if ($#argv > 0) then set lj = $argv[1] endif set job = $lj.job if (-e $job) then rm -f $job endif set cwd = `pwd` set cur_dir = $cwd set scr_dir = $cwd set run_dir = $cwd set save_dir = $cwd set store_dir = $cwd set orig_dir = $cwd set jobname = $lj #***** echo " " if (x$2 == x) then echo -n 'How many CPU seconds will you need (default 43200)? ' set CPUTIM = $< else set CPUTIM = $2 endif if ($CPUTIM <= 0) then set CPUTIM = 43200 endif @ CPUtim = $CPUTIM - 30 if (x$3 == x) then echo -n 'How much memory will you need(default 40) in megawords? ' set MEM = $< else set MEM = $2 endif if ($MEM <= 0) then set MEM = 40 endif set MEMMW = $MEM"MW" if (x$4 == x) then echo -n 'How many processors do you want to use (default 1)? ' set PE = $< else set PE = $2 endif set lpe = "-l mpp_p=$PE" if ($PE <= 1) then set PE = 1 set lpe = "-la single" else @ CPUtim = $CPUtim / $PE endif set jobname = $lj cat << EOF > $job #QSUB -r $lj -s /bin/csh -o $lj.log -eo -x -J m -nc #QSUB -lT $CPUTIM -lt $CPUtim #QSUB -lM $MEMMW #QSUB $lpe #***** #Home directory: cd $cur_dir date ammonia date # # Error output will be in $lj.stderr echo " " exit EOF chmod +x $job echo " ************* Enjoy your results and see You later ******************* " echo " " set ex_status = 0 get_out: exit($ex_status)