<br><font size=2 face="Courier New">On 2009-11-18 at 06:10 PM , ashley@pittman.co.uk wrot</font><font size=2 face="sans-serif">e:</font>
<br>
<br><font size=2 face="Courier New">&gt; How does this work if you do say ./src/padb -axt? &nbsp;If it works in that<br>
&gt; case then I'm happy with the code and I'll commit it, I've not added<br>
&gt; anything before as I couldn't think of a generalised solution.</font>
<br>
<br><font size=2 face="Courier New">I have a generalised solution now (in pbs_setup_job):</font>
<br><font size=2 face="Courier New">I have tested with: &nbsp; &nbsp; ../padb</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirTest/padb</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ./DirTest/padb</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ./padb</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /full_path/padb</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padb (/usr/bin/padb)</font>
<br>
<br><font size=2 face="Courier New">&gt;&gt; 4077 &nbsp; &nbsp; foreach my $proc ( 0 .. $comm_data-&gt;{nprocesses} - 1 ) { <br>
<br>
&gt; Are you able to extract the process count from the job id and return it<br>
&gt; as &quot;nprocesses&quot; in the hash returned by pbs_setup_job()? &nbsp;I'm not<br>
&gt; familiar with qstat so I don't know how to find this information.</font>
<br>
<br><font size=2 face="Courier New">Ok it is done in pbs_get_lqsub when it treats &quot;qstat -w -n -u $user \@$server&quot; data</font>
<br><font size=2 face="Courier New">The $nprocess is stored in $pbs_tabjobs{$job}{nproc}, and will used in pbs_setup_job.</font>
<br>
<br><font size=2 face="Courier New">The Output test look like:</font>
<br>
<br><font size=2 face="Courier New">[thipa@xn5 padb_open]$ DirTest/padb -O rmgr=pbs -O stack-shows-locals=no &nbsp;-O stack-shows-params=no &nbsp;-tx 27616</font>
<br><font size=2 face="Courier New">Warning, failed to locate ranks [5,7]</font>
<br><font size=2 face="Courier New">-----------------</font>
<br><font size=2 face="Courier New">[0-1,4,6] (4 processes)</font>
<br><font size=2 face="Courier New">-----------------</font>
<br><font size=2 face="Courier New">main() at pp_sndrcv_spbl.c:50</font>
<br><font size=2 face="Courier New">&nbsp; PMPI_Finalize() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; MPID_Finalize() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; MPIDI_CH3_Progress_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; MPIDU_Sock_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; poll() at ?:?</font>
<br><font size=2 face="Courier New">-----------------</font>
<br><font size=2 face="Courier New">[2-3] (2 processes)</font>
<br><font size=2 face="Courier New">-----------------</font>
<br><font size=2 face="Courier New">ThreadId: 1</font>
<br><font size=2 face="Courier New">&nbsp; -----------------</font>
<br><font size=2 face="Courier New">&nbsp; [2] (1 processes)</font>
<br><font size=2 face="Courier New">&nbsp; -----------------</font>
<br><font size=2 face="Courier New">&nbsp; main() at pp_sndrcv_spbl.c:46</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; PMPI_Recv() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; MPID_Progress_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; MPIDI_CH3_Progress_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MPIDU_Sock_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ThreadId: 2</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_thread() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fd_server() at server.c:354</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; -----------------</font>
<br><font size=2 face="Courier New">&nbsp; [3] (1 processes)</font>
<br><font size=2 face="Courier New">&nbsp; -----------------</font>
<br><font size=2 face="Courier New">&nbsp; main() at pp_sndrcv_spbl.c:50</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; PMPI_Finalize() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; MPID_Finalize() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; MPIDI_CH3_Progress_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MPIDU_Sock_wait() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; poll() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ThreadId: 2</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_thread() at ?:?</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fd_server() at server.c:354</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select() at ?:?</font>
<br><font size=2 face="Courier New">[thipa@xn5 padb_open]$ </font>
<br>
<br><font size=2 face="Courier New">Remark: Warning, failed to locate ranks [5,7]==&gt; it is normal (processes terminated)</font>
<br>
<br><font size=2 face="Courier New">&gt; I'll be able to take a closer look when I'm back from SC, I only have my<br>
&gt; netbook with me and aren't able to test anything from here, the patch<br>
&gt; looks good so far however.</font>
<br>
<br><font size=2 face="Courier New">I am giving you the new patch with diff -u here.</font>
<br>
<br>
<br>
<br><font size=2 face="Courier New">Hope you will look at it soon.</font>
<br><font size=2 face="Courier New">I think there is no more problem now and say it works.</font>
<br>
<br>
<br><font size=2 face="Courier New">Regards.</font>
<br><font size=2 face="Courier New">Thipadin.</font>
<br>