- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -
CAE utilities: Difference between revisions
No edit summary |
m (→qgen) |
||
Line 6: | Line 6: | ||
==qgen== | ==qgen== | ||
generate a job script based on a template | qgen will generate a job script based on a template. | ||
qgen -h | qgen -h | ||
Line 25: | Line 25: | ||
(If there's no X avaiable, replace tkdiff with e.g. sdiff) | (If there's no X avaiable, replace tkdiff with e.g. sdiff) | ||
qgen just replaces some placeholders within the template. | qgen just replaces some placeholders within the template. | ||
Everyone can expand the system writing own templates. The default path for these files is ~/qgen_templates | Everyone can expand the system writing own templates. The default path for these files is ~/qgen_templates | ||
qgen --submit test | Now the job script could be submitted with "qsub test.pbs", but... | ||
(approx.) the same (for 2 requested nodes) can also be achieved with: | |||
qgen -n 2 --submit test | |||
However, omitting the -o option, the executed job script will not be saved for the user. | |||
In general, templates require additional options. The help might give you a hint at the end, e.g. | In general, templates require additional options. The help might give you a hint at the end, e.g. | ||
qgen -h abaqus | qgen -h abaqus | ||
qgen a tool to generate(&submit) pbs jobfiles (author: Martin Bernreuther <bernreuther@hlrs.de>) | |||
usage: qgen [-n|--nodes <nodes>] [-t|--walltime <walltime>] [-N|--jobname <jobname>] [-w|--workdir <workdir>] [-o <jobfile>] [--submit|--submitq <queue>|--execute] [-] [<template>] [<template_opt1> <template_opt2>...] | |||
-n|--nodes <nodes> [default: 1] number of nodes | |||
-t|--walltime <walltime> [default: 12:00:00] walltime | |||
-N|--jobname <jobname> [default: <template><datetime>] job name | |||
-w|--workdir <workdir> [default: /scratch2/ws/hpcbern-dynatest-0] working directory | |||
-o <jobfile> [default: <stdout>] jobfile output | |||
--submit submit immediately (to standard queue) | |||
--submitq <queue> submit immediately to queue | |||
--execute execute on current host immediately | |||
-l list system templates | |||
-h|--help print help and exit | |||
<template> template to use | |||
<template_options> additional options depending on the template | |||
qgen will create a pbs jobscript based on a template, substituting | |||
$QGEN_NODES, $QGEN_WALLTIME, $QGEN_NAME, $QGEN_WORKDIR and $* (latter with template options) | |||
Instead of setting the values with command line arguments," | |||
echo "environment variables might be used (except for template options) | |||
These environment variables might be also set in the configuration file | |||
~/.qgenrc, which is sourced at the beginning. | |||
Templates are searched for in $QGEN_TEMPLATE_PATH, actually set to: | |||
~/qgen_templates /app/rus/struct/bin/qgen_templates | |||
abaqus template_options: options for abaqus, e.g. job=<jobname> | |||
There's also a simple template to execute a single command: | There's also a simple template to execute a single command: | ||
qgen --submit cmd top -b -n 1 | qgen -N cmdtoptest --submit cmd top -b -n 1 | ||
The output of the command "top -b -n 1" can be found in the | The output of the command "top -b -n 1" can be found in the cmdtoptest.o* file. | ||
The error output cmdtoptest.e* is hopefully empty... |
Revision as of 16:59, 8 October 2008
A collection of small helper scripts.
module load cae
will you take care that these are found when called through the commandline or e.g. a job script.
qgen
qgen will generate a job script based on a template.
qgen -h
will print some help and
qgen -l
will list all available templates found in the QGEN_TEMPLATE_PATH One of these templates is "test", which doesn't need any further arguments.
qgen test
A job file will be printed. Save this job file to "test.pbs" and compare it with the template:
qgen -o test.pbs test tkdiff test.pbs /app/rus/struct/bin/qgen_templates/test
(If there's no X avaiable, replace tkdiff with e.g. sdiff)
qgen just replaces some placeholders within the template. Everyone can expand the system writing own templates. The default path for these files is ~/qgen_templates
Now the job script could be submitted with "qsub test.pbs", but... (approx.) the same (for 2 requested nodes) can also be achieved with:
qgen -n 2 --submit test
However, omitting the -o option, the executed job script will not be saved for the user.
In general, templates require additional options. The help might give you a hint at the end, e.g.
qgen -h abaqus
qgen a tool to generate(&submit) pbs jobfiles (author: Martin Bernreuther <bernreuther@hlrs.de>) usage: qgen [-n|--nodes <nodes>] [-t|--walltime <walltime>] [-N|--jobname <jobname>] [-w|--workdir <workdir>] [-o <jobfile>] [--submit|--submitq <queue>|--execute] [-] [<template>] [<template_opt1> <template_opt2>...] -n|--nodes <nodes> [default: 1] number of nodes -t|--walltime <walltime> [default: 12:00:00] walltime -N|--jobname <jobname> [default: <template><datetime>] job name -w|--workdir <workdir> [default: /scratch2/ws/hpcbern-dynatest-0] working directory -o <jobfile> [default: <stdout>] jobfile output --submit submit immediately (to standard queue) --submitq <queue> submit immediately to queue --execute execute on current host immediately -l list system templates -h|--help print help and exit <template> template to use <template_options> additional options depending on the template qgen will create a pbs jobscript based on a template, substituting $QGEN_NODES, $QGEN_WALLTIME, $QGEN_NAME, $QGEN_WORKDIR and $* (latter with template options) Instead of setting the values with command line arguments," echo "environment variables might be used (except for template options) These environment variables might be also set in the configuration file ~/.qgenrc, which is sourced at the beginning. Templates are searched for in $QGEN_TEMPLATE_PATH, actually set to:
~/qgen_templates /app/rus/struct/bin/qgen_templates
abaqus template_options: options for abaqus, e.g. job=<jobname>
There's also a simple template to execute a single command:
qgen -N cmdtoptest --submit cmd top -b -n 1
The output of the command "top -b -n 1" can be found in the cmdtoptest.o* file. The error output cmdtoptest.e* is hopefully empty...