eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' if 0; #;-*- Perl -*- ################################################################################################### #This script submits a job from the current working directory and return a jobid (in numbers only). #if somehow the submission fails, "2bsubmitted" must be returned as the jobid. ################################################################################################### if(-e "INCAR" && -e "KPOINTS" && -e "POTCAR" && -e "akmc.sub"){ chomp($line=`qsub akmc.sub | tail -1`); $line=~s/^\s+//; @line=split(/\s+/,$line); $jobID=$line[2]; }else{ die "Error signal from submit.pl"; } print "$jobID\n"; if(!($jobID=~/^\d+$/)){ print "2bsubmitted"; }