| From | Sent On | Attachments |
|---|---|---|
| Reuti | Feb 1, 2006 2:37 pm | |
| Mikael Johansson | Feb 2, 2006 4:47 am | |
| Andrea Lorenz | Feb 2, 2006 5:18 am | |
| Rayson Ho | Feb 2, 2006 5:21 am | |
| Mikael Johansson | Feb 2, 2006 5:25 am | |
| Reuti | Feb 2, 2006 7:48 am | |
| Mikael Johansson | Feb 2, 2006 9:47 am | |
| Reuti | Feb 2, 2006 4:41 pm |
| Subject: | Gaussian G03-D.01 Integration in SGE hint | |
|---|---|---|
| From: | Reuti (reu...@staff.uni-marburg.de) | |
| Date: | Feb 1, 2006 2:37:10 pm | |
| List: | net.sunsource.gridengine.users | |
Hi,
the D.01 revision of G03 allows an uneven allocation of tasks/slots on the nodes for parallel runs - :-)). Up to now, it was only possible to have all-1 or all-2 in a usual dual-headed nodes cluster. To get it working:
- use the $SGE_ROOT/mpi folder, maybe rename the folder/scripts to linda/startlinda.sh and so on
Replace PeHostfile2Machinefile() in startlinda.sh then with:
PeHostfile2MachineFile() { local machines while read line; do # echo $line host=`echo $line|cut -f1 -d" "|cut -f1 -d"."` nslots=`echo $line|cut -f2 -d" "` if [ -n "$machines" ]; then machines="$machines,$host:$nslots" else machines="$host:$nslots" fi done < $1 echo $machines }
This will assemble just one line, which we will put in the Gaussian inputfile. Be sure not to use a | (pipe) construct here, as the assembled variable $machines would be known only in the implied sub- shell.
And a script like:
#!/bin/sh export g03root=your_g03_location . $g03root/g03/bsd/g03.profile cd $TMPDIR if [ "$NSLOTS" -gt 1 ]; then awk -v mynproc="%lindaworkers=`cat $TMPDIR/machines`" -f awk_script < infile > infile.mod else awk -f awk_script < infile > infile.mod fi g03 < infile.mod > outfile
The used awk_script:
BEGIN { IGNORECASE=1
if (mynproc) { print mynproc }
}
/^ *%nproc/ { next }
/^ *%linda/ { next }
/^ *-*Link1/ { print
if (mynproc) { print mynproc }
next }
{ print }
You might want to use this script also for a serial run as shown (don't set nproc in this case simply) to remove any %nproc{s,l} or % lindaworkers, as you now call simply g03. The %lindaworkers has to appear after each --Link1-- command.
Maybe someone is interested in this - Reuti
PS: Modify linda_rsh: you have to change the call in linda_rsh from / usr/bin/rsh to rsh for a Tight Integration, and add a -V to the qrsh call in the rsh-wrapper $SGE_ROOT/linda/rsh.





