Slurm Scheduler Plugin API

Overview

This document describe.
このドキュメントで説明します。
Slurm scheduler plugins and the API that defines them.
Slurmスケジューラプラグインとそれらを定義するAPI。
It is intended as a resource to programmers wishing to write their own Slurm scheduler plugins.
独自のSlurmスケジューラプラグインを作成したいプログラマへのリソースとして意図されています。

It is noteworthy that two different models are used for job scheduling.
2つの異なるモデルがジョブスケジューリングに使用されることは注目に値します。
The backfill scheduler let.
バックフィルスケジューラを使用します。
Slurm establishes the initial job priority and can periodically alter job priorities to change their order within the queue.
Slurmは最初のジョブの優先順位を確立し、ジョブの優先順位を定期的に変更して、キュー内の順序を変更できます。
Developers may use the model that best fits their needs.
開発者は、ニーズに最適なモデルを使用できます。
Note that a separate node selection plugin is available for controlling that aspect of scheduling.
スケジューリングのその側面を制御するために、個別のノード選択プラグインを使用できることに注意してください。

Slurm scheduler plugins are Slurm plugins that implement the Slurm scheduler API described herein.
Slurmスケジューラプラグインは、ここで説明するSlurmスケジューラAPIを実装するSlurmプラグインです。
They must conform to the Slurm Plugin API with the following specifications:
これらは、次の仕様のSlurm Plugin APIに準拠している必要があります。

const char plugin_type[]
The major type must be "sched." The minor type can be any recognizable abbreviation for the type of scheduler.
主なタイプは「スケジュール」でなければなりません。マイナータイプは、スケジューラのタイプの認識可能な省略形です。
We recommend, for example:
たとえば、次のことをお勧めします。

  • builtin — A plugin that implements the API without providing any actual scheduling services. This is the default behavior and implements first-in-first-out scheduling.
    builtin —実際のスケジューリングサービスを提供せずにAPIを実装するプラグイン。これはデフォルトの動作であり、先入れ先出しスケジューリングを実装します。
  • backfill — Raise the priority of jobs if doing so results in their starting earlier without any delay in the expected initiation time of any higher priority job.
    バックフィル—優先度を上げると、優先度の高いジョブの予想開始時間に遅延が生じることなく、ジョブが早く開始されます。

const char plugin_name[]
Some descriptive name for the plugin.
プラグインの説明的な名前。
There is no requirement with respect to its format.
その形式に関して要件はありません。

const uint32_t plugin_version
If specified, identifies the version of Slurm used to build this plugin and any attempt to load the plugin from a different version of Slurm will result in an error.
指定した場合、このプラグインのビルドに使用されたSlurmのバージョンを識別し、異なるバージョンのSlurmからプラグインをロードしようとすると、エラーが発生します。
If not specified, then the plugin may be loaded by Slurm commands and daemons from any version, however this may result in difficult to diagnose failures due to changes in the arguments to plugin functions or changes in other Slurm functions used by the plugin.
指定されていない場合、プラグインはSlurmコマンドとデーモンによって任意のバージョンから読み込まれる可能性がありますが、プラグイン関数の引数の変更やプラグインで使用される他のSlurm関数の変更が原因で障害を診断することが困難になる場合があります。

API Functions

The following functions must appear.
次の関数が表示されます。
Functions which are not implemented should be stubbed.
実装されていない関数はスタブする必要があります。

int init (void)

Description:
Called when the plugin is loaded, before any other functions are called.
プラグインがロードされたとき、他の関数が呼び出される前に呼び出されます。
Put global initialization here.
ここにグローバル初期化を配置します。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

void fini (void)

Description:
Called when the plugin is removed.
プラグインが削除されたときに呼び出されます。
Clear any allocated storage here.
ここで割り当て済みのストレージをすべてクリアします。

Returns: None.

Note: These init and fini functions are not the same as those described in the dlopen (3) system library.
注:これらのinitおよびfini関数は、dlopen(3)システムライブラリで説明されているものと同じではありません。
The C run-time system co-opts those symbols for its own initialization.
Cランタイムシステムは、これらのシンボルを独自の初期化用にco-optします。
The system _init() is called before the Slurm init(), and the Slurm fini() is called before the system's _fini().
システムの_init()はSlurm init()の前に呼び出され、Slurm fini()はシステムの_fini()の前に呼び出されます。

int slurm_sched_p_reconfig (void);

Description: Reread any configuration files.
説明:構成ファイルを再読み取りします。

Arguments: None

Returns: SLURM_SUCCESS if successful.
戻り値:成功した場合はSLURM_SUCCESS。
On fail ure, the plugin should return SLURM_ERROR and set the errno to an appropriate value to indicate the reason for failure.
失敗した場合、プラグインはSLURM_ERRORを返し、errnoを適切な値に設定して失敗の理由を示す必要があります。

int slurm_sched_p_schedule (void);

Description: For passive schedulers, invoke a scheduling pass.
説明:パッシブスケジューラの場合、スケジューリングパスを呼び出します。

Arguments: None

Returns: SLURM_SUCCESS if successful.
戻り値:成功した場合はSLURM_SUCCESS。
On failure, the plugin should return SLURM_ERROR and set the errno to an appropriate value to indicate the reason for failure.
失敗すると、プラグインはSLURM_ERRORを返し、errnoを適切な値に設定して、失敗の理由を示す必要があります。

int slurm_sched_p_newalloc(job_record_t *job_ptr);

Description: Note the successful allocation of resources to a job.
説明:ジョブへのリソースの割り当てが成功したことに注意してください。

Arguments: Pointer to the slurmctld job structure.
引数:slurmctldジョブ構造へのポインター。
This can be used to get partition, allocated resources, time limit, etc.
これは、パーティション、割り当てられたリソース、制限時間などを取得するために使用できます。

Returns: SLURM_SUCCESS if successful.
戻り値:成功した場合はSLURM_SUCCESS。
On failure, the plugin should return SLURM_ERROR and set the errno to an appropriate value to indicate the reason for failure.
失敗すると、プラグインはSLURM_ERRORを返し、errnoを適切な値に設定して、失敗の理由を示す必要があります。

int slurm_sched_p_freealloc(job_record_t *job_ptr);

Description: Note the successful release of resources for a job.
説明:ジョブのリソースの正常な解放に注意してください。

Arguments: Pointer to the slurmctld job structure.
引数:slurmctldジョブ構造へのポインター。
This can be used to get partition, allocated resources, time limit, etc.
これは、パーティション、割り当てられたリソース、制限時間などを取得するために使用できます。

Returns: SLURM_SUCCESS if successful.
戻り値:成功した場合はSLURM_SUCCESS。
On failure, the plugin should return SLURM_ERROR and set the errno to an appropriate value to indicate the reason for failure.
失敗すると、プラグインはSLURM_ERRORを返し、errnoを適切な値に設定して、失敗の理由を示す必要があります。

uint32_t slurm_sched_p_initial_priority(uint32_t last_prio, job_record_t *job_ptr);

Description: Establish the initial priority of a new job.
説明:新しいジョブの初期優先順位を確立します。

Arguments:
last_prio (input) default priority of the previously submitted job.
last_prio(入力)以前に送信されたジョブのデフォルトの優先度。
This can be used to provide First-In-First-Out scheduling by assigning the new job a priority lower than this value.
これを使用して、新しいジョブにこの値よりも低い優先順位を割り当てることにより、先入れ先出しスケジューリングを提供できます。
This could also be used to establish an initial priority of zero for all jobs, representing a "held" state.
これは、「保留」状態を表す、すべてのジョブに対してゼロの初期優先順位を確立するためにも使用できます。
The scheduler plugin can then decide where and when to initiate pending jobs by altering their priority and (optionally) list of required nodes.
スケジューラプラグインは、優先順位と(オプションで)必要なノードのリストを変更することで、保留中のジョブをいつどこで開始するかを決定できます。

job_ptr (input) Pointer to the slurmctld job structure.
job_ptr(入力)slurmctldジョブ構造へのポインター。
This can be used to get partition, resource requirements, time limit, etc.
これは、パーティション、リソース要件、時間制限などを取得するために使用できます。

Returns: The priority to be assigned to this job.
戻り値:このジョブに割り当てられる優先順位。

void slurm_sched_p_job_is_pending (void);

Description: Note that some job is pending execution.
説明:一部のジョブは実行保留中です。

Arguments: None

Returns: Nothing.

void slurm_sched_p_partition_change (void);

Description: Note that some partition state change happened such as time or size limits.
説明:時間やサイズの制限など、一部のパーティションの状態が変化したことに注意してください。

Arguments: None

Returns: Nothing.

char *slurm_sched_p_get_conf (void);

Description: Return scheduler specific configuration information to be reported for the scontrol show configuration command.
説明:scontrol show configurationコマンドについて報告されるスケジューラ固有の構成情報を返します。

Arguments: None

Returns: A string containing configuration information.
戻り値:構成情報を含む文字列。
The return value is released using the xfree() function.
戻り値は、xfree()関数を使用して解放されます。

Last modified 23 October 2019