Base Executor - Local apps ========================== .. automodule:: executor :no-undoc-members: See the Executor APIs for optional arguments. .. tab-set:: .. tab-item:: Base Executor Only for running local serial-launched applications. To run MPI applications and use detected resources, use the :doc:`MPIExecutor<../executor/mpi_executor>` .. autoclass:: libensemble.executors.executor.Executor :members: :exclude-members: serial_setup, sim_default_app, gen_default_app, get_app, default_app, set_resources, get_task, set_workerID, set_worker_info, new_tasks_timing, add_platform_info, set_gen_procs_gpus, kill, poll .. automethod:: __init__ .. tab-item:: Task .. _task_tag: Tasks are created and returned by the Executor's ``submit()``. Tasks can be polled, killed, and waited on with the respective ``poll``, ``kill``, and ``wait`` functions. Task information can be queried through instance attributes and query functions. .. autoclass:: libensemble.executors.executor.Task :members: :exclude-members: calc_task_timing, check_poll .. tab-item:: Task Attributes .. note:: These should not be set directly. Tasks are launched by the Executor, and task information can be queried through the task attributes below and the query functions. :task.state: (string) The task status. One of ("UNKNOWN"|"CREATED"|"WAITING"|"RUNNING"|"FINISHED"|"USER_KILLED"|"FAILED"|"FAILED_TO_START") :task.process: (process obj) The process object used by the underlying process manager (e.g., return value of subprocess.Popen). :task.errcode: (int) The error code (or return code) used by the underlying process manager. :task.finished: (boolean) True means task has finished running - not whether it was successful. :task.success: (boolean) Did task complete successfully (e.g., the return code is zero)? :task.runtime: (int) Time in seconds that task has been running. :task.submit_time: (int) Time since epoch that task was submitted. :task.total_time: (int) Total time from task submission to completion (only available when task is finished). Run configuration attributes - some will be autogenerated: :task.workdir: (string) Work directory for the task :task.name: (string) Name of task - autogenerated :task.app: (app obj) Use application/executable, registered using exctr.register_app :task.app_args: (string) Application arguments as a string :task.stdout: (string) Name of file where the standard output of the task is written (in task.workdir) :task.stderr: (string) Name of file where the standard error of the task is written (in task.workdir) :task.dry_run: (boolean) True if task corresponds to dry run (no actual submission) :task.runline: (string) Complete, parameterized command to be subprocessed to launch app