Slurm APIs

Overview

All of the Slurm commands utilize a collection of Application Programming Interfaces (APIs).
すべてのSlurmコマンドは、アプリケーションプログラミングインターフェイス(API)のコレクションを利用します。
User and system applications can directly use these APIs as desired to achieve tighter integration with Slurm.
ユーザーおよびシステムアプリケーションは、必要に応じてこれらのAPIを直接使用して、Slurmとの緊密な統合を実現できます。
For example, Slurm data structures and error codes can be directly examined rather than executing Slurm commands and parsing their output.
たとえば、Slurmコマンドを実行してその出力を解析するのではなく、Slurmのデータ構造とエラーコードを直接調べることができます。
This document describes Slurm APIs.
このドキュメントでは、SlurmAPIについて説明します。
You should see the man pages for individual APIs to get more details.
詳細については、個々のAPIのマニュアルページを参照してください。

Get Overall Slurm Information

  • slurm_api_version — Get Slurm API version number.
    slurm_api_version — SlurmAPIのバージョン番号を取得します。
  • slurm_load_ctl_conf — Load system-wide configuration specifications.
    slurm_load_ctl_conf —システム全体の構成仕様をロードします。
    Free with slurm_free_ctl_conf to avoid memory leak.
    メモリリークを回避するために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.
    slurm_load_jobs —ジョブ情報をロードします。
    Free with slurm_free_job_info_msg to avoid memory leak.
    メモリリークを回避するために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.
    slurm_get_job_steps —ジョブステップ情報をロードします。
    Free with slurm_free_job_step_info_response_msg to avoid memory leak.
    メモリリークを回避するために、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.
    slurm_load_node —ノード情報をロードします。
    Free with slurm_free_node_info to avoid memory leak.
    メモリリークを回避するために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.
    slurm_load_partitions —パーティション(キュー)情報をロードします。
    Free with slurm_free_partition_info to avoid memory leak.
    メモリリークを回避するために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 —最後に実行されたSlurmAPI関数によって設定されたエラーコードを返します。
  • slurm_perror — Prin.
    slurm_perror —プリン。
    Slurm error information to standard output.
    エラー情報を標準出力にスラームします。
  • 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.
    slurm_init_job_desc_msg —リソース割り当てリクエストで使用されるデータ構造を初期化します。
    You can then just set the fields of particular interest and let the others use default values.
    次に、特に関心のあるフィールドを設定し、他のフィールドにデフォルト値を使用させることができます。
  • 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.
    slurm_allocate_resources —ジョブにリソースを割り当てます。
    Response message must be freed using slurm_free_resource_allocation_response_msg to avoid a memory leak.
    メモリリークを回避するには、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.
    slurm_allocate_resources_and_run —ジョブにリソースを割り当て、ジョブステップを生成します。
    Response message must be freed using slurm_free_resource_allocation_and_run_response_msg to avoid a memory leak.
    メモリリークを回避するために、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.
    slurm_submit_batch_job —後で実行するためにスクリプトを送信します。
    Response message must be freed using slurm_free_submit_response_response_msg to avoid a memory leak.
    メモリリークを回避するには、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.
    slurm_confirm_allocation —指定されたジョブIDに対してリソース割り当てがすでに行われているかどうかをテストします。
    Response message must be freed using slurm_free_resource_allocation_response_msg to avoid a memory leak.
    メモリリークを回避するには、slurm_free_resource_allocation_response_msgを使用して応答メッセージを解放する必要があります。
    This can be used to confirm that an allocation is still active or for error recovery.
    これは、割り当てがまだアクティブであることを確認するため、またはエラー回復のために使用できます。

Job Step Creation

Slurm job steps involve numerous interactions with the slurmd daemon.
Slurmジョブステップには、slurmdデーモンとの多数の相互作用が含まれます。
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_job_step_create — Initiate a job step.
    slurm_job_step_create —ジョブステップを開始します。
    Allocated memory must be freed by slurm_free_job_step_create_response_msg to avoid a memory leak.
    割り当てられたメモリは、メモリリークを回避するために、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.
    slurm_step_ctx_create —ジョブステップコンテキストを作成します。
    Destroy using slurm_step_ctx_destroy.
    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.
    slurm_complete_job —ジョブの完了に注意してください。
    Releases resource allocation for the 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.
    slurm_reconfigure —現在のslurm.conf構成ファイルに基づいてslurmデーモンを更新します。
    Use this after updating the configuration file to ensure that it takes effect.
    構成ファイルを更新した後にこれを使用して、有効になるようにします。
  • 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.
    slurm_update_node —指定されたノードに関連付けられた状態情報を更新します。
    NOTE: Most of a node's characteristics can not be modified.
    注:ノードの特性のほとんどは変更できません。
  • slurm_init_part_desc_msg — Initialize a partition update descriptor.
    slurm_init_part_desc_msg —パーティション更新記述子を初期化します。
    Used this to initialize the data structure used in slurm_update_partition.
    これを使用して、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.
Slurmは、凝縮された形式を使用してノード名を表現します。
For example linux[1-3,6] represents linux1, linux2, linux3, and linux6.
たとえば、linux [1-3,6]は、linux1、linux2、linux3、およびlinux6を表します。
These functions permit you to translate the Slurm expression into a list of individual node names.
これらの関数を使用すると、Slurm式を個々のノード名のリストに変換できます。

  • slurm_hostlist_create — Translate a Slurm node name expression into a record used for parsing.
    slurm_hostlist_create —Slurmノード名式を解析に使用されるレコードに変換します。
    Use slurm_hostlist_destroy to free the allocated storage.
    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