"WolframBatch" (Batch Computation Provider)

Details

Wolfram Batch is a batch computation service that schedules jobs across remote cloud provider instances.

Environment Properties

The following properties are supported in a RemoteBatchSubmissionEnvironment object for the "WolframBatch" provider:
  • "WolframID"Automaticyour Wolfram ID account email
  • Job Settings

    The following settings are supported by the RemoteProviderSettings option when using the "WolframBatch" provider:
  • "RemoteMachineClass""StandardKernel"type of computing resource to use
    "CreditAllocation"Allmaximum number of service credits to use
    "NotificationEvents"Nonewhat notification events to generate and the actions to take
    "DefaultNotificationAction"Automaticdefault action for notification events
  • "RemoteMachineClass" specifies what hardware to run the remote job on. Supported settings include:
  • "StandardKernel"suitable for many sequential code use cases
    "LargeMemoryKernel"sequential computations needing more memory
    "Parallel64"machine class capable of running 64 threads of execution
    "Parallel128"machine class capable of running 128 threads of execution
  • "CreditAllocation" specifies a maximum number of service credits to use for the job. With the default setting All, the job will run to completion, provided there are sufficient service credits in your account. See https://account.wolfram.com/products/service-credits to add credits to your account and to enable auto-recharge.
    "EstimatedTime" specifies a number of seconds or time Quantity that the job is expected to run, for generating notification events when fractions of the estimated time are reached.
    "NotificationEvents" specifies what notification events to generate and what actions to take for those events. Possible settings include:
  • Noneno notifications
    Automaticissue a set of events for major changes using automatic actions appropriate to each
    eventevent that uses the default notification action
    event->actionevent that uses a given action
    {event,...}multiple events that use the default notification action
    {event,...}->actionmultiple events that use the same action
    {event,...}->{action,...}multiple events that use multiple notification actions
  • Notification events can be specified in the following forms:
  • "event"named event
    {"event",val}event that is qualified by a value
  • "DefaultNotificationAction" specifies a default notification action for events in "NotificationEvents" that do not specify an action.
    Possible settings for notification actions and the "DefaultNotificationAction" setting include:
  • "Email"sends an email to the "WolframID" environment setting
    "SMS"sends an SMS text message to $MobilePhone
    "MMS"sends an MMS text message to $MobilePhone
  • Possible events for "NotificationEvents" related to job state changes include:
  • "JobStarting"job has been assigned to a compute resource and the environment is being prepared
    "JobStarted"job code has started running
    "JobCompleted"job code has finished
    "JobTerminated"job has been stopped before completion
    "JobStates"issue all the above job state change events
  • Possible events for "NotificationEvents" related to time elapsed since the job was created include:
  • "Hourly"every hour since job creation
    "Daily"every day after job creation, issued approximately within an hour from midnight
    {"TimeElapsed",t}time elapsed since job creation, in seconds or a time Quantity
    {"TimeElapsedIntervals",t}issued in even time intervals elapsed since job creation, in seconds or time Quantity
  • Possible events for "NotificationEvents" related to service credits:
  • {"JobCreditsUsed",c}when credits used in the job reach a given level
    {"JobCreditsUsedIntervals",c}issued every time the job uses a multiple of the given number of credits
    {"CreditsRemaining",c}when your account goes below the given number of credits
    "NoCreditsRemaining"when no credits are remaining in your account
  • Job Statuses

    The following are possible values of the "JobStatus" job property when using the "WolframBatch" provider, listed in the order through which a typical job will pass:
  • "Submitted"the submitted job has not yet been evaluated by the batch scheduler
    "Pending"the job is waiting for dependencies to be satisfied
    "Runnable"the job is waiting for compute resources to be available
    "Starting"the job has been scheduled to an instance and its container image is being downloaded
    "Running"the job's container has started
    "Succeeded"the job's execution has succeeded and its output has been uploaded
    "Failed"the job's execution has failed
  • A job in the "Running" state may be in the process of downloading input files, evaluating job code or uploading output data.
    An array job will remain in the "Pending" state until either all of its constituent child jobs have succeeded (at which point it will transition to the "Succeeded" state) or at least one child job has failed (at which point it will transition to the "Failed" state).

    Job Properties

    When using the "WolframBatch" provider, the following property is available from "Single"-type job objects, in addition to the standard properties supported by RemoteBatchJobObject:
  • "JobLog"console logs from the job container
  • Examples

    open allclose all

    Basic Examples  (4)

    The default remote batch environment is "WolframBatch". If you are not connected to your WolframID account, it will prompt you to log in first:

    Submit a job using the default "WolframBatch" environment. RemoteBatchSubmit returns a RemoteBatchJobObject that allows you to manage and view the state of the job:

    Query the job status:

    Query the job status again, after it has completed:

    Retrieve the job result:

    Construct an environment with a specific Wolfram ID:

    Construct an environment with a specific remote machine class:

    Job Settings  (3)

    "RemoteMachineClass"  (1)

    Run a batch job on a computer with a large memory capacity:

    "CreditAllocation"  (1)

    Run a batch job with a given service credit budget:

    "NotificationEvents"  (1)

    Receive SMS text notifications for job state change events:

    Receive text notifications when the job starts and finishes, and email every 2 hours while it runs: