<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hello all,<BR>&nbsp;<BR>I have the following shell script for running with qsub/mpiexec<BR>&nbsp;<BR>&nbsp;<BR>#!/bin/bash<BR>#PBS - nodes=14:ppn=2<BR>#PBS -l walltime=99:00:00<BR>#PBS -j eo<BR>#PBS -N mpi<BR>&nbsp;<BR>&nbsp;<BR>###change directory<BR>cd $PBS_O_WORKDIR<BR>&nbsp;<BR>NUM_NODES = `cat $PBS_NODEFILE | wc -l`<BR>&nbsp;<BR>cat $PBS_NODEFIL&nbsp; &gt;&amp; ./temp/outout<BR>&nbsp;<BR>echo $NUM_NODES&nbsp; &gt;&amp; ./temp/out2<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>the statement<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $NUM_NODES&nbsp; &gt;&amp; ./temp/out2<BR>&nbsp;<BR>&nbsp;produce nothing&nbsp; in the file&nbsp;./temp/out2.<BR>&nbsp;<BR>However, the file ./temp/outout has the following lines<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hpc01<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hpc02<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hpc03<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hpc04<BR>&nbsp;<BR>I do not know why<BR>&nbsp;<BR>&nbsp;<BR>please help.<BR>&nbsp;<BR>&nbsp;<BR>Felix<BR><br /><hr />“七件武器,七种完美” <a href='http://get.live.cn' target='_new'>立刻体验!</a></body>
</html>