[torqueusers] Question regarding getting the value of ppn
John S. Urban
urbanjost at comcast.net
Sat Nov 8 17:19:35 MST 2008
I have a program called qenv(1) that dumps all the information about all
jobs in the form of ksh(1) expressions
that makes steps like this easy that is a cleaner solution; but I am waiting
for permission to distribute it. In the
mean time, depending on what shell you use, something like:
NUMNODES="`sort $PBS_NODEFILE|uniq|wc -l|awk '{print $1}'`" #
sh/ksh/bash/pdksh/...
setenv NUMNODES "sort $PBS_NODEFILE|uniq|wc -l|awk '{print $1}' #
csh/tcsh/..
does what I think you want.
----- Original Message -----
From: "Michael Homa" <mhoma at uic.edu>
To: <torqueusers at supercluster.org>
Sent: Wednesday, November 05, 2008 6:05 PM
Subject: [torqueusers] Question regarding getting the value of ppn
> I'm running torque 2.2.1 and Maui 3.2.6p20 on our university cluster.
> For reasons having to do with the software package Gaussian, I'd like to
> get the NUMERICAL setting for ppn and place it in a Gaussian input file.
> There appears to be no environmental variable setting containing this. I
> looked at both the man page as well as the wiki. However, using a stub
> program, I was able to determine that the content of the the PBS_NODEFILE
> variable is correlated to ppn. For example
>
> o If qsub -l node=2 stub then PBS_NODEFILE contains
> node1
> node2
>
> o If qsub -l node=1:ppn=2 stub then PBS_NODEFILE contains
> node1
> node1
>
> o If qsub -l node=2:ppn=2 stub then PBS_NODEFILE contains
> node1
> node1
> node2
> node2
>
> o If qsub -l node=2:ppn=3 stub then PBS_NODEFILE contains
> node1
> node1
> node1
> node2
> node2
> node2
>
> So, obviously, I can cat the PBS_NODEFILE into a shell array and, via a
> regular expression or via some other method, calculate what ppn is based
> on the number of duplicate names. But, I'm hoping there is a cleaner way
> to do this? Or, maybe an undocumented environmental variable? I didn't see
> anything but hope springs eternal.
>
> Michael Homa
> Operating Systems Support and Database Group
> Academic Computing and Communication Center
> University of Illinois at Chicago
> email: mhoma at uic.edu
>
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
More information about the torqueusers
mailing list