Skip to content

Commit

Permalink
Fix #716: Non-option arguments to programs run using pbsdsh must be…
Browse files Browse the repository at this point in the history
… before `--hpx:nodes`, contrary to directions
  • Loading branch information
hkaiser committed Feb 14, 2013
1 parent 2403221 commit 59f5434
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion docs/manual/commandline.qbk
Expand Up @@ -211,8 +211,14 @@ ignore the option. For instance, the following PBS script passes the option
APP_PATH=~/packages/hpx/bin/hello_world
APP_OPTIONS=

__pbsdsh__ -u $APP_PATH ``[hpx_cmdline --hpx:1:pu-offset=4]`` ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE` $APP_OPTIONS
__pbsdsh__ -u $APP_PATH $APP_OPTIONS ``[hpx_cmdline --hpx:1:pu-offset=4]`` ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE`
```

[caution If the first application specific argument (inside `$APP_OPTIONS`)
is a non-option (i.e. does not start with a '`-`' or a '`--`', then those
have to be placed before the option [hpx_cmdline --hpx:nodes], which
in this case should be the last option on the command line.]

[c++]

[/////////////////////////////////////////////////////////////////////////////]
Expand Down
9 changes: 7 additions & 2 deletions docs/tutorial/gettingstarted.qbk
Expand Up @@ -425,9 +425,14 @@ in the section __hello_world_example__.
APP_PATH=~/packages/hpx/bin/hello_world
APP_OPTIONS=

__pbsdsh__ -u $APP_PATH ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE` $APP_OPTIONS
__pbsdsh__ -u $APP_PATH $APP_OPTIONS ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE`
```

[caution If the first application specific argument (inside `$APP_OPTIONS`)
is a non-option (i.e. does not start with a '`-`' or a '`--`', then those
have to be placed before the option [hpx_cmdline --hpx:nodes], which
in this case should be the last option on the command line.]

The [^#PBS -l nodes=2:ppn=4] directive will cause two compute nodes to be
allocated for the application, as specified int the option [^nodes]. Each of the
nodes will dedicate four cores to the program, as per the option [^ppn], short
Expand Down Expand Up @@ -480,7 +485,7 @@ Now, we invoke this script using the __pbsdsh__ tool:
APP_PATH=~/packages/hpx/bin/hello_world
APP_OPTIONS=

__pbsdsh__ -u runme.sh $APP_PATH ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE` $APP_OPTIONS
__pbsdsh__ -u runme.sh $APP_PATH $APP_OPTIONS ``[hpx_cmdline --hpx:nodes]``=`cat $PBS_NODEFILE`
```

All that remains now is submitting the job to the queuing system. Assuming that
Expand Down

0 comments on commit 59f5434

Please sign in to comment.