From chemistry-request@server.ccl.net  Fri Mar 10 23:01:52 2000
Received: from darwin.ntu.edu.au (darwin.ntu.edu.au [138.80.128.3])
	by server.ccl.net (8.8.7/8.8.7) with SMTP id XAA30321
	for <chemistry@ccl.net>; Fri, 10 Mar 2000 23:01:49 -0500
Received: (qmail 32751 invoked from network); 11 Mar 2000 04:01:32 -0000
Received: from quoll.ntu.edu.au (138.80.63.13)
  by darwin.ntu.edu.au with SMTP; 11 Mar 2000 04:01:32 -0000
Received: by quoll.ntu.edu.au; (5.65/1.1.8.2/09Aug94-1121AM)
	id AA04162; Sat, 11 Mar 2000 13:53:58 +0930
Date: Sat, 11 Mar 2000 13:53:58 +0930
From: Brian Salter-Duke <b_duke@quoll.ntu.edu.au>
To: Tapas Kar <tapaskar@siu.edu>
Cc: Yubo Fan <yubofan@guomai.sh.cn>, CCL <chemistry@ccl.net>
Subject: Re: CCL:Batch jobs of G98
Message-Id: <20000311135358.A4171@quoll.ntu.edu.au>
Mail-Followup-To: Tapas Kar <tapaskar@siu.edu>,
	Yubo Fan <yubofan@guomai.sh.cn>, CCL <chemistry@ccl.net>
References: <38C5CB81.A892BE42@guomai.sh.cn><001101bf8950$b6d0f600$5363e683@thchem.siu.edu> <38C72D09.B942AC11@guomai.sh.cn> <001001bf89db$15f23060$5363e683@thchem.siu.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.6i
In-Reply-To: <001001bf89db$15f23060$5363e683@thchem.siu.edu>; from Tapas Kar on Thu, Mar 09, 2000 at 09:21:04AM -0600

On Thu, Mar 09, 2000 at 09:21:04AM -0600, Tapas Kar wrote:
> In Aix, add following lines in the /etc/qconfig file
> 
> rung98:
>         s_statfilter = /usr/lpd/aixshort
>         device = gq1,gq2
>         up = TRUE
> gq1:
>         file = FALSE
>         backend = /bin/csh
> gq2:
>         file = FALSE
>         backend = /bin/csh
> 
> r-g98:
>         device = gq-s
>         up = TRUE
> gq-s:
>         file = FALSE
>         backend = /bin/csh

I prefer to use a generic batch queue such as:-
 
bat_ksh:
        s_statfilter = /usr/lpd/aixshort
	up = TRUE
	device = bat_kqd
        discipline = fcfs
bat_kqd:
        file = FALSE
        backend = /bin/ksh 

This one happens to be the Korn shell as my G98 stuff is configured for
that shell, but I also have a C-shell entry.

> After adding those lines, check the queue by using " qchk -A"
> 
> 3% Tapas/Risky4> qchk -A
> Queue   Dev   Status    Job Files              User         PP %   Blks  Cp
> Rnk
> ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- 
> ---
> rung92  gq1   RUNNING   104 /USERS_HOME/tapas/ tapas         0  0     1   1
> 1
> rung92  gq2   RUNNING   105 /USERS_HOME/tapas/ tapas         0  0     1   1
> 2
> r-g92   gq-s  READY
> 
> Now use the following script to submit GXX jobs,
> 
> thisdir=`pwd`
> echo  /app/g98A7/g98/g98 $thisdir/$1 > $1.exe
> qprt -Prung92 $thisdir/$1.exe  ( submit jobs in any available queue)
> #qprt -Prung92:gq1 $thisdir/$1.exe (submit jobs in gq1 only)
> #qprt -Prung92:gq2 $thisdir/$1.exe  ( submit jobs in gq2 only)
> #qprt -Pr-g92 $thisdir/$1.exe  (submit jobs in gq-s only)
> echo Job $1.com submitted
> qchk -A | grep -v "lp" | grep -v "bsh"

This is a modification that does it better:-
 
thisdir=`pwd`
cat <<END > $1.job
#!/bin/ksh
cd $thisdir
rm -f core
rm $GAUSS_SCRDIR/gau*
. $g98root/g98/bsd/g98.profile
$g98root/g98/g98 $1 
END
qprt -Pbat_ksh $thisdir/$1.job  
echo Job $1.com submitted
qchk -A | grep -v "lp" | grep -v "bsh"
rm -f *.job

It clears the *.job file and also removes core files and scratch files from
a previous run. Note I set $g98root in my .profile but call g98.profile at run 
time.

> ** don't put the comments within bracket in the script, it is just to
> explain you)
> I used a file named "subj" which contains the ablve lines, and then changed
> the mod to all executable
> using
> chmod +x subj
> Then, use the following command
> >./subj  GXX-input-file-name  (.com is nor required)
> you will see one line GXX-input-file-name.exe files for each job, delete
> those after job completion.
> 
> Hope this will work.
> 
> ****************************************************************************
> ***
> Is any one out there using similar setup for other operating systems, please
> post it to CCL************.
> ****************************************************************************
> ***
> Tapas

We are talking about a very AIX-specific solution to the problem here.

I run NQS on all my machines, including AIX, but the qconfig solution for
AIX is probably the simplest solution.

Cheers, Brian.

-- 
        Associate Professor Brian Salter-Duke (Brian Duke)
Chemistry, Faculty of Science, IT and Education, Northern Territory University,
          Darwin, NT 0909, Australia.  Phone (61) (0)8-89466702
e-mail: b_duke@lacebark.ntu.edu.au  or b_duke@quoll.ntu.edu.au


