flux submit [OPTIONS] [--ntasks=N] COMMAND...
.. program:: flux submit
:program:`flux submit` enqueues a job to run under Flux and prints its numerical jobid on standard output. The job consists of N copies of COMMAND launched together as a parallel job.
If :option:`--ntasks` is unspecified, a value of N=1 is assumed.
The available OPTIONS are detailed below.
These commands accept only the simplest parameters for expressing the size of the parallel program and the geometry of its task slots:
These commands take the following common resource allocation options:
:man1:`flux-run`, :man1:`flux-submit` and :man1:`flux-bulksubmit` take two sets of mutually exclusive options to specify the size of the job request. The most common form uses the total number of tasks to run along with the amount of resources required per task to specify the resources for the entire job:
The second set of options allows an amount of resources to be specified with the number of tasks per core or node set on the command line. It is an error to specify any of these options when using any per-task option listed above:
These commands also take following job parameters:
By default, task stdout and stderr streams are redirected to the
KVS, where they may be accessed with the flux job attach
command.
In addition, :man1:`flux-run` processes standard I/O in real time, emitting the job's I/O to its stdout and stderr.
By default, these commands duplicate the current environment when submitting jobs. However, a set of environment manipulation options are provided to give fine control over the requested environment submitted with the job.
By default these commands propagate some common resource limits (as described
in :linux:man2:`getrlimit`) to the job by setting the rlimit
job shell
option in jobspec. The set of resource limits propagated can be controlled
via the :option:`--rlimit=RULE` option:
The job environment is described in more detail in the :man7:`flux-environment` :ref:`job_environment` section. A summary of the most commonly used variables is provided below:
The job exit status, normally the largest task exit status, is stored in the KVS. If one or more tasks are terminated with a signal, the job exit status is 128+signo.
The flux-job attach
command exits with the job exit status.
In addition, :man1:`flux-run` runs until the job completes and exits with the job exit status.
Some options that affect the parallel runtime environment are provided by the Flux shell. These options are described in detail in the :ref:`SHELL OPTIONS <flux_shell_options>` section of :man1:`flux-shell`. A list of the most commonly needed options follows.
Usage: :option:`flux submit -o NAME[=ARG]`.
.. program:: flux shell
.. program:: flux submit
:man1:`flux-run`, :man1:`flux-alloc`, :man1:`flux-batch`, :man1:`flux-bulksubmit`, :man7:`flux-environment`