#!/usr/bin/perl if ($ARGV[0] eq 'help') { #Documentation print ' submits the jobs created by abi_setdir it requires 1 files: qpts.abi (which contains a list of N qpoints) It then submits the N run.abi located in the QPT_qx_qy_qz directories ' } else { open (FICHIER0, "qpts.abi"); @map0 = ; &trim(@map0); $diro = `pwd`; chop($diro); #-------------------------------------------------------- foreach $lign0 (@map0) { # each qpoint $ind1++; @lis0=split(/ /,$lign0); $lis1[0]=int($lis0[0]*100)/100; $lis1[1]=int($lis0[1]*100)/100; $lis1[2]=int($lis0[2]*100)/100; $nam0=QPT._.$lis1[0]._.$lis1[1]._.$lis1[2]; chdir ($nam0); system("condor_submit run.abi"); chdir (".."); } } system("condor_q"); #-------------------------------------------------------- sub trim { foreach $lign (@_) { $lign=~s/ +/ /g; if (substr($lign,0,1) eq ' ') {substr($lign,0,1)=''} chop ($lign); } }