Slurm APIs
Overview
All of the Slurm commands utilize a collection of Application Programming
Interfaces (APIs).
User and system applications can directly use these APIs as desired to
achieve tighter integration with Slurm.
For example, Slurm data structures and error codes can be directly
examined rather than executing Slurm commands and parsing their output.
This document describes Slurm APIs.
You should see the man pages for individual APIs to get more details.
Slurmコマンドはすべて、アプリケーションプログラミングインターフェース(API)のコレクションを利用しています。ユーザーおよびシステムアプリケーションは、必要に応じてこれらのAPIを直接使用して、Slurmとのより緊密な統合を実現できます。たとえば、Slurmコマンドを実行してその出力を解析するのではなく、Slurmデータ構造とエラーコードを直接調べることができます。このドキュメントでは、Slurm APIについて説明します。詳細については、個々のAPIのマニュアルページを参照してください。
Get Overall Slurm Information
- slurm_api_version — Get Slurm API version number.
slurm_api_version — Slurm APIのバージョン番号を取得します。 - slurm_load_ctl_conf — Load system-wide configuration
specifications. Free with slurm_free_ctl_conf to avoid memory
leak.
slurm_load_ctl_conf —システム全体の構成仕様をロードします。メモリリークを回避するために、slurm_free_ctl_confで解放します。 - slurm_print_ctl_conf — Print system-wide configuration
specifications.
slurm_print_ctl_conf —システム全体の構成仕様を出力します。 - slurm_free_ctl_conf — Free storage allocated by
slurm_load_ctl_conf.
slurm_free_ctl_conf — slurm_load_ctl_confによって割り当てられたストレージを解放します。
Get Job Information
- slurm_pid2jobid — For a given process ID on a node
get the corresponding Slurm job ID.
slurm_pid2jobid —ノード上の特定のプロセスIDについて、対応するSlurmジョブIDを取得します。 - slurm_get_end_time — For a given Slurm job ID
get the expected termination time.
slurm_get_end_time —指定されたSlurmジョブIDについて、予想される終了時間を取得します。 - slurm_load_jobs — Load job information.
Free with slurm_free_job_info_msg to avoid memory leak.
slurm_load_jobs —ジョブ情報をロードします。メモリリークを回避するために、slurm_free_job_info_msgで解放します。 - slurm_print_job_info_msg — Print information about
all jobs.
slurm_print_job_info_msg —すべてのジョブに関する情報を出力します。 - slurm_print_job_info — Print information about
a specific job.
slurm_print_job_info —特定のジョブに関する情報を出力します。 - slurm_free_job_info_msg — Free storage allocated by
slurm_load_jobs.
slurm_free_job_info_msg — slurm_load_jobsによって割り当てられたストレージを解放します。
Get Job Step Information
- slurm_get_job_steps — Load job step information.
Free with slurm_free_job_step_info_response_msg to
avoid memory leak.
slurm_get_job_steps —ジョブステップ情報をロードします。メモリリークを回避するためにslurm_free_job_step_info_response_msgで解放します。 - slurm_print_job_step_info_msg — Print information about
all job steps.
slurm_print_job_step_info_msg —すべてのジョブステップに関する情報を出力します。 - slurm_print_job_step_info — Print information about
a specific job step.
slurm_print_job_step_info —特定のジョブステップに関する情報を出力します。 - slurm_free_job_step_info_response_msg — Free storage
allocated by slurm_get_job_steps.
slurm_free_job_step_info_response_msg — slurm_get_job_stepsによって割り当てられたストレージを解放します。
Get Node Information
- slurm_load_node — Load node information.
Free with slurm_free_node_info to avoid memory leak.
slurm_load_node —ノード情報をロードします。メモリリークを回避するために、slurm_free_node_infoで解放します。 - slurm_print_node_info_msg — Print information about
all nodes.
slurm_print_node_info_msg —すべてのノードに関する情報を出力します。 - slurm_print_node_table — Print information about
a specific node.
slurm_print_node_table —特定のノードに関する情報を出力します。 - slurm_free_node_info — Free storage
allocated by slurm_load_node.
slurm_free_node_info — slurm_load_nodeによって割り当てられたストレージを解放します。
Get Partition Information
- slurm_load_partitions — Load partition (queue) information.
Free with slurm_free_partition_info to avoid memory leak.
slurm_load_partitions —パーティション(キュー)情報をロードします。メモリリークを回避するためにslurm_free_partition_infoで解放します。 - slurm_print_partition_info_msg — Print information about
all partitions.
slurm_print_partition_info_msg —すべてのパーティションに関する情報を出力します。 - slurm_print_partition_info — Print information about
a specific partition.
slurm_print_partition_info —特定のパーティションに関する情報を出力します。 - slurm_free_partition_info — Free storage
allocated by slurm_load_partitions.
slurm_free_partition_info — slurm_load_partitionsによって割り当てられたストレージを解放します。
Error Handling
- slurm_get_errno — Return the error code set by the
last Slurm API function executed.
slurm_get_errno —最後に実行されたSlurm API関数によって設定されたエラーコードを返します。 - slurm_perror — Prin. Slurm error information to
standard output.
slurm_perror — Prin。エラー情報を標準出力に送信します。 - slurm_strerror — Return a string describing a specific
Slurm error code.
slurm_strerror —特定のSlurmエラーコードを説明する文字列を返す。
Resource Allocation
- slurm_init_job_desc_msg — Initialize the data structure
used in resource allocation requests. You can then just set the fields
of particular interest and let the others use default values.
slurm_init_job_desc_msg —リソース割り当てリクエストで使用されるデータ構造を初期化します。次に、特に関心のあるフィールドを設定し、他のフィールドにデフォルト値を使用させることができます。 - slurm_job_will_run — Determine if a job would be
immediately initiated if submitted now.
slurm_job_will_run —ジョブがすぐに送信された場合、すぐに開始されるかどうかを決定します。 - slurm_allocate_resources — Allocate resources for a job.
Response message must be freed using
slurm_free_resource_allocation_response_msg to avoid a
memory leak.
slurm_allocate_resources —ジョブにリソースを割り当てます。メモリリークを回避するには、slurm_free_resource_allocation_response_msgを使用して応答メッセージを解放する必要があります。 - slurm_free_resource_allocation_response_msg —
Frees memory allocated by slurm_allocate_resources.
slurm_free_resource_allocation_response_msg — slurm_allocate_resourcesによって割り当てられたメモリを解放します。 - slurm_allocate_resources_and_run — Allocate resources for a
job and spawn a job step. Response message must be freed using
slurm_free_resource_allocation_and_run_response_msg to avoid a
memory leak.
slurm_allocate_resources_and_run —ジョブにリソースを割り当て、ジョブステップを生成します。メモリリークを回避するには、slurm_free_resource_allocation_and_run_response_msgを使用して応答メッセージを解放する必要があります。 - slurm_free_resource_allocation_and_run_response_msg —
Frees memory allocated by slurm_allocate_resources_and_run.
slurm_free_resource_allocation_and_run_response_msg — slurm_allocate_resources_and_runによって割り当てられたメモリを解放します。 - slurm_submit_batch_job — Submit a script for later
execution. Response message must be freed using
slurm_free_submit_response_response_msg to avoid a
memory leak.
slurm_submit_batch_job —後で実行するためにスクリプトを送信します。メモリリークを回避するには、slurm_free_submit_response_response_msgを使用して応答メッセージを解放する必要があります。 - slurm_free_submit_response_response_msg —
Frees memory allocated by slurm_submit_batch_job.
slurm_free_submit_response_response_msg — slurm_submit_batch_jobによって割り当てられたメモリを解放します。 - slurm_confirm_allocation — Test if a resource allocation has
already been made for a given job id. Response message must be freed using
slurm_free_resource_allocation_response_msg to avoid a
memory leak. This can be used to confirm that an
allocation is still active or for error recovery.
slurm_confirm_allocation —指定されたジョブIDに対してリソース割り当てがすでに行われているかどうかをテストします。メモリリークを回避するには、slurm_free_resource_allocation_response_msgを使用して応答メッセージを解放する必要があります。これは、割り当てがまだアクティブであることを確認するため、またはエラー回復のために使用できます。
Job Step Creation
Slurm job steps involve numerous interactions with the
slurmd daemon. The job step creation is only the
first step in the process. We don't advise direct user
creation of job steps, but include the information here
for completeness.
Slurmジョブステップには、slurmdデーモンとの多数の対話が含まれます。ジョブステップの作成は、プロセスの最初のステップにすぎません。ユーザーがジョブステップを直接作成することはお勧めしませんが、完全を期すためにここに情報を含めます。
- slurm_job_step_create — Initiate a job step.
Allocated memory must be freed by
slurm_free_job_step_create_response_msg to avoid a
memory leak.
slurm_job_step_create —ジョブステップを開始します。割り当てられたメモリは、メモリリークを回避するために、slurm_free_job_step_create_response_msgによって解放される必要があります。 - slurm_free_job_step_create_response_msg — Free
memory allocated by slurm_job_step_create
slurm_free_job_step_create_response_msg — slurm_job_step_createによって割り当てられたメモリを解放する
. - slurm_step_ctx_create — Create job step context.
Destroy using slurm_step_ctx_destroy.
slurm_step_ctx_create —ジョブステップコンテキストを作成します。slurm_step_ctx_destroyを使用して破棄します。 - slurm_step_ctx_destroy — Destroy a job step context
created by slurm_step_ctx_create.
slurm_step_ctx_destroy — slurm_step_ctx_createによって作成されたジョブステップコンテキストを破棄します。 - slurm_step_ctx_get — Get values from job step context.
slurm_step_ctx_get —ジョブステップコンテキストから値を取得します。 - slurm_step_ctx_set — Set values in job step context.
slurm_step_ctx_set —ジョブステップコンテキストに値を設定します。 - slurm_jobinfo_ctx_get — Get values from a jobinfo
field as returned by slurm_step_ctx_get.
slurm_jobinfo_ctx_get — slurm_step_ctx_getによって返されるjobinfoフィールドから値を取得します。 - slurm_spawn — Spawn tasks and establish communications.
slurm_spawn —タスクを生成し、通信を確立します。 - slurm_spawn_kill — Signal spawned tasks.
slurm_spawn_kill —生成されたタスクにシグナルを送ります。
Job and Job Step Signaling and Cancelling
- slurm_kill_job — Signal or cancel a job.
slurm_kill_job —ジョブを通知またはキャンセルします。 - slurm_kill_job_step — Signal or cancel a job step.
slurm_kill_job_step —ジョブステップを通知またはキャンセルします。
Job Completion
- slurm_complete_job — Note completion of a job.
Releases resource allocation for the job.
slurm_complete_job —ジョブの完了を記録します。ジョブのリソース割り当てを解放します。 - slurm_complete_job_step — Note completion of a
job step.
slurm_complete_job_step —ジョブステップの完了を記録します。
Administrative Functions
Most of these functions can only be executed by user root.
これらの機能のほとんどは、ユーザーrootのみが実行できます。
- slurm_reconfigure — Update slurm daemons
based upon current slurm.conf configuration file.
Use this after updating the configuration file to
ensure that it takes effect.
slurm_reconfigure —現在のslurm.conf構成ファイルに基づいてslurmデーモンを更新します。これを有効にするには、構成ファイルを更新した後でこれを使用します。 - slurm_shutdown — Terminate slurm daemons.
slurm_shutdown — slurmデーモンを終了します。 - slurm_update_job — Update state
information associated with a given job.
slurm_update_job —特定のジョブに関連付けられた状態情報を更新します。 - slurm_update_node — Update state
information associated with a given node. NOTE: Most
of a node's characteristics can not be modified.
slurm_update_node —特定のノードに関連付けられた状態情報を更新します。注:ほとんどのノードの特性は変更できません。 - slurm_init_part_desc_msg — Initialize a
partition update descriptor. Used this to initialize
the data structure used in slurm_update_partition.
slurm_init_part_desc_msg —パーティション更新記述子を初期化します。これを使用して、slurm_update_partitionで使用されるデータ構造を初期化します。 - slurm_update_partition — Update state
information associated with a given partition.
slurm_update_partition —特定のパーティションに関連付けられた状態情報を更新します。 - slurm_delete_partition — Destroy a partition.
slurm_delete_partition —パーティションを破棄します。
Slurm Host List Support
Slurm uses a condensed format to express node names.
For example linux[1-3,6] represents linux1,
linux2, linux3, and linux6. These
functions permit you to translate the Slurm expression
into a list of individual node names.
Slurmは、ノード名を表すために圧縮形式を使用します。たとえば、linux [1-3,6]はlinux1、linux2、linux3、およびlinux6を表します。これらの関数を使用すると、Slurm式を個々のノード名のリストに変換できます。
- slurm_hostlist_create — Translate a Slurm
node name expression into a record used for parsing.
Use slurm_hostlist_destroy to free the allocated
storage.
slurm_hostlist_create — Slurmノード名式を解析に使用されるレコードに変換します。slurm_hostlist_destroyを使用して、割り当てられたストレージを解放します。 - slurm_hostlist_shift — Get the next node
name.
slurm_hostlist_shift —次のノード名を取得する - slurm_hostlist_destroy — Release storage
allocated by slurm_hostlist_create.
slurm_hostlist_destroy — slurm_hostlist_createによって割り当てられたストレージを解放します。
Last modified 23 November 2019