Resource Selection Plugin Programmer Guide

Overview

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

Slurm node selection plugins are Slurm plugins that implement the Slurm node selection API described herein. They are intended to provide a mechanism for both selecting nodes for pending jobs and performing any system-specific tasks for job launch or termination. The plugins must conform to the Slurm Plugin API with the following specifications:
Slurmノード選択プラグインは、ここで説明するSlurmノード選択APIを実装するSlurmプラグインです。これらは、保留中のジョブのノードを選択し、ジョブの起動または終了のためにシステム固有のタスクを実行するためのメカニズムを提供することを目的としています。プラグインは、次の仕様のSlurm Plugin APIに準拠している必要があります。

const char plugin_type[]
The major type must be "select." The minor type can be any recognizable abbreviation for the type of node selection algorithm. We recommend, for example:
主なタイプは「選択」でなければなりません。マイナータイプは、ノード選択アルゴリズムのタイプの認識可能な省略形です。たとえば、次のことをお勧めします。

  • cons_res — A plugin that can allocate individual processors, memory, etc. within nodes.
    cons_res —ノード内の個々のプロセッサ、メモリなどを割り当てることができるプラグイン。
    This plugin is recommended for systems with many non-parallel programs sharing nodes. For more information see Consumable Resources in Slurm.
    このプラグインは、多くの非並列プログラムがノードを共有するシステムに推奨されます。詳細については、Slurmの消費可能なリソースを参照してください。
  • cray_aries — Cray XE and XT system node selector. Note that this plugin not only selects the nodes for a job, but performs some initialization and termination functions for the job.
    cray_aries — Cray XEおよびXTシステムノードセレクター。このプラグインは、ジョブのノードを選択するだけでなく、ジョブの初期化および終了機能を実行することに注意してください。
    This plugin also serves as a wrapper for the select/linear plugin which enforces various limits and provides support for resource selection optimized for the system topology.
    このプラグインは、さまざまな制限を適用し、システムトポロジーに最適化されたリソース選択のサポートを提供する、select / linearプラグインのラッパーとしても機能します。
  • linear — A plugin that selects nodes assuming a one-dimensional array of nodes.
    linear —ノードの1次元配列を想定してノードを選択するプラグイン。
    The nodes are selected so as to minimize the number of consecutive sets of nodes utilizing a best-fit algorithm. While supporting shared nodes, this plugin does not allocate individual processors, but can allocate memory to jobs.
    ノードは、最適アルゴリズムを利用してノードの連続したセットの数を最小化するように選択されます。共有ノードをサポートしている間、このプラグインは個々のプロセッサを割り当てませんが、ジョブにメモリを割り当てることができます。
    This plugin is recommended for systems without shared nodes.
    このプラグインは、共有ノードのないシステムに推奨されます。

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関数の変更が原因で、障害の診断が困難になる可能性があります。

A simplified flow of logic follows:
ロジックの簡略化されたフローは次のとおりです。

/* slurmctld daemon starts, recover state */
if ((select_p_node_init)()     != SLURM_SUCCESS) ||
    (select_p_state_restore)() != SLURM_SUCCESS) ||
    (select_p_job_init)()      != SLURM_SUCCESS))
   abort

/* wait for job arrival */
if (select_p_job_test(all available nodes) != SLURM_SUCCESS) {
   if (select_p_job_test(all configured nodes) != SLURM_SUCCESS)
      /* reject the job and tell the user it can never run */
   else
      /* leave the job queued for later execution */
} else {
   /* update job's node list and node bitmap */
   if (select_p_job_begin() != SLURM_SUCCESS)
      /* leave the job queued for later execution */
   else {
      while (!select_p_job_ready())
	 wait
      /* execute the job */
      /* wait for job to end or be terminated */
      select_p_job_fini()
    }
}

/* wait for slurmctld shutdown request */
select_p_state_save()

Depending upon failure modes, it is possible that select_p_state_save() will not be called at slurmctld termination.
障害モードによっては、slurmctldの終了時にselect_p_state_save()が呼び出されない可能性があります。
When slurmctld is restarted, other function calls may be replayed.
slurmctldを再起動すると、他の関数呼び出しが再生される場合があります。
select_p_node_init() may be used to synchronize the plugin's state with that of slurmctld.
select_p_node_init()は、プラグインの状態をslurmctldの状態と同期するために使用できます。

Data Objects

These functions are expected to read and/or modify data structures directly in the slurmctld daemon's memory.
これらの関数は、slurmctldデーモンのメモリ内のデータ構造を直接読み取りまたは変更することが期待されています。
Slurmctld is a multi-threaded program with independent read and write locks on each data structure type.
Slurmctldは、各データ構造タイプに対して独立した読み取りおよび書き込みロックを備えたマルチスレッドプログラムです。
Therefore the type of operations permitted on various data structures is identified for each function.
したがって、さまざまなデータ構造で許可される操作のタイプは、関数ごとに識別されます。

These functions make use of bitmaps corresponding to the nodes in a table.
これらの関数は、テーブル内のノードに対応するビットマップを利用します。
The function select_p_node_init() should be used to establish the initial mapping of bitmap entries to nodes.
関数select_p_node_init()を使用して、ビットマップエントリのノードへの初期マッピングを確立する必要があります。
Functions defined in src/common/bitmap.h should be used for bitmap manipulations (these functions are directly accessible from the plugin).
src / common / bitmap.hで定義された関数は、ビットマップ操作に使用する必要があります(これらの関数はプラグインから直接アクセスできます)。

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()の前に呼び出されます。

State Save Functions

int select_p_state_save (char *dir_name);

Description: Save any global node selection state information to a file within the specified directory. The actual file name used is plugin specific.
説明:グローバルノードの選択状態情報を指定したディレクトリ内のファイルに保存します。使用される実際のファイル名はプラグイン固有です。
It is recommended that the global switch state contain a magic number for validation purposes.
検証のために、グローバルスイッチの状態にマジックナンバーを含めることをお勧めします。
This function is called by the slurmctld daemon on shutdown.
この関数は、シャットダウン時にslurmctldデーモンによって呼び出されます。

Arguments: dir_name    (input) fully-qualified pathname of a directory into which user SlurmUser (as defined in slurm.conf) can create a file and write state information into that file. Cannot be NULL.
引数:dir_name(入力)ユーザーのSlurmUser(slurm.confで定義)がファイルを作成し、状態情報をそのファイルに書き込むことができるディレクトリの完全修飾パス名。NULLにすることはできません。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_state_restore (char *dir_name);

Description: Restore any global node selection state information from a file within the specified directory. The actual file name used is plugin specific.
説明:指定されたディレクトリー内のファイルからグローバル・ノード選択状態情報を復元します。使用される実際のファイル名はプラグイン固有です。
It is recommended that any magic number associated with the global switch state be verified.
グローバルスイッチの状態に関連付けられているマジック番号を確認することをお勧めします。
This function is called by the slurmctld daemon on startup.
この関数は、起動時にslurmctldデーモンによって呼び出されます。

Arguments: dir_name    (input) fully-qualified pathname of a directory containing a state information file from which user SlurmUser (as defined in slurm.conf) can read. Cannot be NULL.
引数:dir_name(入力)ユーザーのslurmUser(slurm.confで定義されている)が読み取ることができる状態情報ファイルを含むディレクトリの完全修飾パス名。NULLにすることはできません。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR, causing slurmctld to exit.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返し、slurmctldが終了します。

State Initialization Functions

int select_p_node_init(node_record_t *node_ptr, int node_cnt);

Description: Note the initialization of the node record data structure.
説明:ノードレコードデータ構造の初期化に注意してください。
This function is called by the slurmctld daemon when the node records are initially established and again when any nodes are added to or removed from the data structure.
この関数は、ノードレコードが最初に確立されたとき、およびノー​​ドがデータ構造に追加またはデータ構造から削除されたときに、slurmctldデーモンによって呼び出されます。

Arguments:
node_ptr   (input) pointer to the node data records.
node_ptr(入力)ノードデータレコードへのポインタ。
Data in these records can read. Nodes deleted after initialization may have their the name field in the record cleared (zero length) rather than rebuilding the node records and bitmaps.
これらのレコードのデータは読み取ることができます。初期化後に削除されたノードでは、ノードのレコードとビットマップを再構築するのではなく、レコードの名前フィールドがクリアされる(長さがゼロ)場合があります。


node_cnt    (input) number of node data records.
node_cnt(入力)ノードデータレコードの数。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR, causing slurmctld to exit.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返し、slurmctldが終了します。

int select_p_job_init(List job_list);

Description: Used at slurmctld daemon startup to synchronize plugin (and node) state with that of currently active jobs.
説明:slurmctldデーモンの起動時に使用され、プラグイン(およびノー​​ド)の状態を現在アクティブなジョブの状態と同期します。

Arguments: job_list    (input) list of slurm jobs from slurmctld job records.
引数:job_list(入力)slurmctldジョブレコードからのslurmジョブのリスト。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_reconfigure (void);

Description: Used to notify plugin of change in partition configuration or general configuration change.
説明:パーティション構成の変更または一般構成の変更をプラグインに通知するために使用されます。
The plugin will test global variables for changes as appropriate.
プラグインは、必要に応じてグローバル変数の変更をテストします。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

Node-Specific Functions

select_nodeinfo_t *select_p_select_nodeinfo_alloc(void);

Description: Allocate a buffer for select plugin specific information about a node. Use select_p_select_nodeinfo_free() to free the returned data structure.
説明:ノードに関する特定のプラグイン固有の情報用のバッファーを割り当てます。select_p_select_nodeinfo_free()を使用して、返されたデータ構造を解放します。

Returns: A buffer for select plugin specific information about a node or NULL on failure. Use select_p_select_nodeinfo_free() to free this data structure.
戻り値:ノードに関する選択プラグイン固有の情報のバッファー、または失敗した場合のNULL。このデータ構造を解放するには、select_p_select_nodeinfo_free()を使用します。

int select_p_select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, Buf buffer, uint16_t protocol_version);

Description: Pack select plugin specific information about a node into a buffer for node queries.
説明:ノードに関するプラグイン固有の情報を、ノードクエリ用のバッファーにパックします。

Argument:
nodeinfo    (input) Node information to be packed.
nodeinfo(入力)パックされるノード情報。

buffer    (input/output) pointer to buffer into which the node information is packed.
buffer(入力/出力)ノード情報がパックされるバッファへのポインタ。

protocol_version    (input) Version number of the data packing mechanism (needed for backward compatibility).
protocol_version(入力)データパックメカニズムのバージョン番号(下位互換性のために必要)。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

int select_p_select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, Buf buffer, uint16_t protocol_version);

Description: Unpack select plugin specific information about a node from a buffer for node queries.
説明:ノードクエリ用のバッファーから、ノードに関する選択プラグイン固有の情報を解凍します。
Use select_p_select_nodeinfo_free() to free the returned data structure.
select_p_select_nodeinfo_free()を使用して、返されたデータ構造を解放します。

Argument:
nodeinfo    (output) Node information unpacked from the buffer.
nodeinfo(出力)バッファーからアンパックされたノード情報。
Use select_p_select_nodeinfo_free() to free the returned data structure.
select_p_select_nodeinfo_free()を使用して、返されたデータ構造を解放します。

buffer    (input/output) pointer to buffer from which the node information is to be unpacked.
buffer(入力/出力)ノード情報をアンパックするバッファーへのポインター。

protocol_version    (input) Version number of the data packing mechanism (needed for backward compatibility).
protocol_version(入力)データパックメカニズムのバージョン番号(下位互換性のために必要)。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo);

Description: Free a buffer which was previously allocated for select plugin specific information about a node.
説明:ノードに関するプラグイン固有の情報を選択するために以前に割り当てられたバッファを解放します。

Argument: nodeinfo    (input/output) The buffer to be freed.
nodeinfo(入力/出力)解放されるバッファー。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

int int select_p_select_nodeinfo_set(job_record_t *job_ptr);

Description: Reset select plugin specific information about a job. Called by slurmctld daemon after that job's state has been restored (at startup) or job has been scheduled.
説明:ジョブに関する特定のプラグイン固有の情報をリセットします。ジョブの状態が(起動時に)復元された後、またはジョブがスケジュールされた後に、slurmctldデーモンによって呼び出されます。

Argument: job_ptr    (input) Pointer to the updated job.
引数:job_ptr(入力)更新されたジョブへのポインター。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_nodeinfo_set_all(void);

Description: Update select plugin specific information about every node as needed.
説明:必要に応じて、すべてのノードに関する特定のプラグイン固有の情報を更新します。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_nodeinfo_get(select_nodeinfo_t *nodeinfo, enum select_nodedata_type dinfo, enum node_states state, void *data);

Description: Get information from a select plugin's node specific data structure.
説明:選択したプラグインのノード固有のデータ構造から情報を取得します。

Argument:
nodeinfo    (input) Node information data structure from which information is to get retrieved.
nodeinfo(入力)情報を取得するノード情報のデータ構造。

dinfo    (input) Data type to be retrieved.
dinfo(入力)取得するデータ型。

state    (input) Node state filter to be applied (e.g. only get information about ALLOCATED nodes).
状態(入力)適用されるノード状態フィルター(たとえば、ALLOCATEDノードに関する情報のみを取得)。

data    (output) The retrieved data.
data(出力)取得したデータ。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_update_node_config (int index);

Description: note that a node has registered with a different configuration than previously registered.
説明:ノードが以前に登録されたものとは異なる構成で登録されていることに注意してください。
For example, the node was configured with 1GB of memory in slurm.conf, but actually registered with 2GB of memory.
たとえば、ノードはslurm.confで1GBのメモリで構成されていましたが、実際には2GBのメモリで登録されていました。

Arguments:
index   (input) zero origin index of the node in reference to the entire system.
インデックス(入力)システム全体に関するノードのゼロ原点インデックス。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

bool select_p_node_ranking(node_record_t *node_ptr, int node_cnt)

Description: This function is called by the slurmctld daemon at start time to set node rank information for recording the nodes to optimize application performance.
説明:この関数は、アプリケーションのパフォーマンスを最適化するためにノードを記録するためのノードランク情報を設定するために、開始時にslurmctldデーモンによって呼び出されます。

Arguments:
node_ptr   (input/output) pointer to the node data structure. Each node's node rank field may be set.
node_ptr(入力/出力)ノードのデータ構造へのポインター。各ノードのノードランクフィールドを設定できます。

node_cnt   (input) number of nodes configured on the system.
node_cnt(入力)システムに構成されているノードの数。

Returns: true if node rank information has been set.
戻り値:ノードのランク情報が設定されている場合はtrue。

int select_p_update_node_state(node_record_t *node_ptr);

Description: push a node state change into the plugin. The index should be the index from the slurmctld of the entire system.
説明:ノード状態の変更をプラグインにプッシュします。インデックスは、システム全体のslurmctldからのインデックスである必要があります。

Arguments:
node_ptr   (input/output) pointer to the node data structure. Each node's node rank field may be set.
node_ptr(入力/出力)ノードのデータ構造へのポインター。各ノードのノードランクフィールドを設定できます。

Returns: SLURM_SUCCESS if successful, otherwise SLURM_ERROR
戻り値:成功した場合はSLURM_SUCCESS、それ以外の場合はSLURM_ERROR

Job-Specific Functions

select_jobinfo_t *select_p_select_jobinfo_alloc(void);

Description: Allocate a buffer for select plugin specific information about a job. Use select_p_select_jobinfo_free() to free the allocated memory.
説明:ジョブに関する特定のプラグイン固有の情報用のバッファーを割り当てます。select_p_select_jobinfo_free()を使用して、割り当てられたメモリを解放します。

Returns: Pointer to a select plugin buffer for a job or NULL on failure. Use select_p_select_jobinfo_free() to free the allocated memory.
戻り値:ジョブの選択プラグインバッファーへのポインター、または失敗時のNULL。select_p_select_jobinfo_free()を使用して、割り当てられたメモリを解放します。

select_jobinfo_t *select_p_select_jobinfo_copy(select_jobinfo_t *jobinfo);

Description: Copy the buffer containing select plugin specific information about a job. Use select_p_select_jobinfo_free() to free the allocated memory.
説明:ジョブに関する特定のプラグイン固有の情報を含むバッファーをコピーします。select_p_select_jobinfo_free()を使用して、割り当てられたメモリを解放します。

Arguments: jobinfo    (input) pointer to the select plugin specific information about a job.
ジョブに関するselectプラグイン固有の情報へのjobinfo(入力)ポインター。

Returns: A copy of jobinfo or NULL on failure. Use select_p_select_jobinfo_free() to free the allocated memory.
戻り値:jobinfoのコピー。失敗した場合はNULL。select_p_select_jobinfo_free()を使用して、割り当てられたメモリを解放します。

int select_p_select_jobinfo_free(select_jobinfo_t *jobinfo);

Description: Free the buffer containing select plugin specific information about a job.
説明:ジョブに関する特定のプラグイン固有の情報を含むバッファを解放します。

Arguments: jobinfo    (input) pointer to the select plugin specific information about a job.
引数:ジョブに関するselectプラグイン固有の情報へのjobinfo(入力)ポインター。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_jobinfo_pack(select_jobinfo_t *jobinfo, Buf buffer, uint16_t protocol_version);

Description: Pack into a buffer the contents of the select plugin specific information about a job.
説明:ジョブに関する選択プラグイン固有の情報の内容をバッファーにパックします。

Arguments:
jobinfo    (input) pointer to the select plugin specific information about a job.
ジョブに関するselectプラグイン固有の情報へのjobinfo(入力)ポインター。

buffer    (input/output) pointer to buffer into which the job information is packed.
buffer(入力/出力)ジョブ情報がパックされるバッファへのポインタ。

protocol_version    (input) Version number of the data packing mechanism (needed for backward compatibility).
protocol_version(入力)データパックメカニズムのバージョン番号(下位互換性のために必要)。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_jobinfo_unpack(select_jobinfo_t **jobinfo_pptr, Buf buffer, uint16_t protocol_version);

Description: Unpack from a buffer the contents of the select plugin specific information about a job.
説明:ジョブに関する特定のプラグイン固有の情報の内容をバッファーからアンパックします。
The returned value must be freed using select_p_select_jobinfo_free().
戻り値は、select_p_select_jobinfo_free()を使用して解放する必要があります。

Arguments:
jobinfo    (output) pointer to the select plugin specific information about a job. The returned value must be freed using select_p_select_jobinfo_free().
jobinfo(出力)ジョブに関する選択プラグイン固有の情報へのポインター。戻り値は、select_p_select_jobinfo_free()を使用して解放する必要があります。

buffer    (input/output) pointer to buffer from which the job information is unpacked.
buffer(入力/出力)ジョブ情報がアンパックされるバッファーへのポインター。

protocol_version    (input) Version number of the data packing mechanism (needed for backward compatibility).
protocol_version(入力)データパックメカニズムのバージョン番号(下位互換性のために必要)。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_jobinfo_get(select_jobinfo_t *jobinfo, enum select_jobdata_type data_type, void *data);

Description: Get the contents of a field from the select plugin specific information about a job.
説明:ジョブに関する選択プラグイン固有の情報からフィールドの内容を取得します。

Arguments:
jobinfo    (input) pointer to the select plugin specific information about a job to be read.
jobinfo(入力)読み込まれるジョブに関する選択プラグイン固有の情報へのポインター。

data_type    (input) identification of the field to be retrieved.
取得するフィールドのdata_type(入力)ID。

data    (output) data read from the job record.
ジョブ・レコードから読み取られたデータ(出力)データ。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_select_jobinfo_set(select_jobinfo_t *jobinfo, enum select_jobdata_type data_type, void *data);

Description: Set a field in the select plugin specific information about a job.
説明:ジョブに関する選択プラグイン固有の情報のフィールドを設定します。

Arguments:
jobinfo    (input/output) pointer to the select plugin specific information about a job to be modified.
変更するジョブに関する選択プラグイン固有の情報へのjobinfo(入力/出力)ポインター。

data_type    (input) identification of the field to be set.
設定するフィールドのdata_type(入力)ID。

data    (input) data to be written into the job record.
ジョブレコードに書き込まれるデータ(入力)データ。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

char *select_p_select_jobinfo_sprint(select_jobinfo_t *jobinfo, char *buf, size_t size, int mode);

Description: Print the contents of the select plugin specific information about a job.
説明:ジョブに関する選択プラグイン固有の情報の内容を印刷します。

Arguments:
jobinfo    (input) pointer to the select plugin specific information about a job.
ジョブに関するselectプラグイン固有の情報へのjobinfo(入力)ポインター。

buf    (input/output) buffer into which the contents are written.
内容が書き込まれるbuf(入力/出力)バッファー。

size    (input) size of buf in bytes.
size(入力)bufのサイズ(バイト単位)。

mode    (input) print mode, see enum select_print_mode.
モード(入力)印刷モード。列挙型select_print_modeを参照してください。

Returns: Pointer to the buf on success or NULL on failure.
戻り値:成功した場合はbufへのポインター、失敗した場合はNULL。

char *select_p_select_jobinfo_xstrdup(select_jobinfo_t *jobinfo, int mode);

Description: Print the contents of the select plugin specific information about a job. The return value must be released using the xfree() function.
説明:ジョブに関する選択プラグイン固有の情報の内容を印刷します。戻り値は、xfree()関数を使用して解放する必要があります。

Arguments:
jobinfo    (input) pointer to the select plugin specific information about a job.
ジョブに関するselectプラグイン固有の情報へのjobinfo(入力)ポインター。

mode    (input) print mode, see enum select_print_mode.
モード(入力)印刷モード。列挙型select_print_modeを参照してください。

Returns: Pointer to a string on success or NULL on failure. Call xfree() to release the memory allocated for the return value.
戻り値:成功した場合は文字列へのポインタ、失敗した場合はNULL。xfree()を呼び出して、戻り値に割り当てられたメモリを解放します。

int select_p_job_test(job_record_t *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint32_t mode, List preemption_candidates, List *preempted_jobs, bitstr_t *exc_core_bitmap);

Description: Given a job's scheduling requirement specification and a set of nodes which might be used to satisfy the request, identify the nodes which "best" satisfy the request.
説明:ジョブのスケジューリング要件の仕様と、要求を満たすために使用される可能性のあるノードのセットを前提として、要求を「最もよく」満たすノードを特定します。
Note that nodes being considered for allocation to the job may include nodes already allocated to other jobs, even if node sharing is not permitted. This is done to ascertain whether or not job may be allocated resources at some later time (when the other jobs complete).
ジョブへの割り当てが検討されているノードには、ノードの共有が許可されていない場合でも、他のジョブに既に割り当てられているノードが含まれる場合があることに注意してください。これは、後でジョブ(他のジョブが完了したとき)にリソースが割り当てられるかどうかを確認するために行われます。
This permits Slurm to reject non-runnable jobs at submit time rather than after they have spent hours queued.
これにより、Slurmは実行不能なジョブをキューに入れて数時間過ごした後ではなく、サブミット時に拒否できます。
Informing users of problems at job submission time permits them to quickly resubmit the job with appropriate constraints.
ジョブのサブミット時にユーザーに問題を通知することで、適切な制約のあるジョブをすばやく再サブミットできます。

Arguments:
job_ptr    (input) pointer to the job being considered for scheduling. Data in this job record may safely be read.
job_ptr(入力)スケジューリングの対象となるジョブへのポインター。このジョブレコードのデータは安全に読み取られます。
Data of particular interest include details->contiguous (set if allocated nodes should be contiguous), num_procs (minimum processors in allocation) and details->req_node_bitmap (specific required nodes).
特に重要なデータには、details-> contiguous(割り当てられたノードを隣接させる必要がある場合に設定)、num_procs(割り当ての最小プロセッサ)、details-> req_node_bitmap(特定の必要なノード)があります。

bitmap    (input/output) bits representing nodes which might be allocated to the job are set on input.
ジョブに割り当てられる可能性のあるノードを表すビットマップ(入力/出力)ビットは、入力時に設定されます。
This function should clear the bits representing nodes not required to satisfy job's scheduling request.
この関数は、ジョブのスケジューリング要求を満たすために必要でないノードを表すビットをクリアする必要があります。
Bits left set will represent nodes to be used for this job. Note that the job's required nodes (details->req_node_bitmap) will be a superset bitmap when the function is called.
セットされたままのビットは、このジョブに使用されるノードを表します。ジョブが必要とするノード(details-> req_node_bitmap)は、関数が呼び出されたときにスーパーセットビットマップになることに注意してください。

min_nodes    (input) minimum number of nodes to allocate to this job. Note this reflects both job and partition specifications.
min_nodes(入力)このジョブに割り当てるノードの最小数。これはジョブとパーティションの両方の仕様を反映していることに注意してください。

max_nodes    (input) maximum number of nodes to allocate to this job. Note this reflects both job and partition specifications.
max_nodes(入力)このジョブに割り当てるノードの最大数。これはジョブとパーティションの両方の仕様を反映していることに注意してください。

req_nodes    (input) the requested (desired) of nodes to allocate to this job. This reflects job's maximum node specification (if supplied).
req_nodes(入力)このジョブに割り当てるノードの要求された(望ましい)。これは、ジョブの最大ノード指定を反映しています(指定されている場合)。

mode    (input) controls the mode of operation. Valid options are:
mode(入力)は、動作モードを制御します。有効なオプションは次のとおりです。

* SELECT_MODE_RUN_NOW: try to schedule job now
* SELECT_MODE_RUN_NOW:今すぐジョブをスケジュールしてください

* SELECT_MODE_TEST_ONLY: test if job can ever run
* SELECT_MODE_TEST_ONLY:ジョブが実行できるかどうかをテストします

* SELECT_MODE_WILL_RUN: determine when and where job can run
* SELECT_MODE_WILL_RUN:ジョブを実行できる時期と場所を決定します

preemption_candidates    (input) list of pointers to jobs which may be preempted in order to initiate this pending job. May be NULL if there are no preemption candidates.
preemption_candidates(入力)この保留中のジョブを開始するためにプリエンプトされる可能性のあるジョブへのポインタのリスト。プリエンプションの候補がない場合は、NULLになることがあります。

preempted_jobs    (input/output) list of jobs which must be preempted in order to initiate the pending job.
preempted_jobs(入力/出力)保留中のジョブを開始するためにプリエンプトする必要があるジョブのリスト。
If the value is NULL, no job list is returned.
値がNULLの場合、ジョブリストは返されません。
If the list pointed to has a value of NULL, a new list will be created otherwise the existing list will be overwritten.
指しているリストの値がNULLの場合、新しいリストが作成されます。それ以外の場合は、既存のリストが上書きされます。
Use the list_destroy function to destroy the list when no longer needed.
list_destroy関数を使用して、不要になったリストを破棄します。

exc_core_bitmap    (input) bitmap of cores held for advanced reservations.
exc_core_bitmap(入力)事前予約のために保持されているコアのビットマップ。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_job_begin(job_record_t *job_ptr);

Description: Note the initiation of the specified job is about to begin. This function is called immediately after select_p_job_test() successfully completes for this job.
説明:指定されたジョブの開始がまもなく開始されることに注意してください。この関数は、select_p_job_test()がこのジョブに対して正常に完了した直後に呼び出されます。

Arguments: job_ptr    (input) pointer to the job being initialized. Data in this job record may safely be read or written.
引数:job_ptr(入力)初期化されるジョブへのポインター。このジョブレコードのデータは、安全に読み書きできます。
The nodes and node_bitmap fields of this job record identify the nodes which have already been selected for this job to use.
このジョブレコードのnodeおよびnode_bitmapフィールドは、このジョブで使用するためにすでに選択されているノードを識別します。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR, which causes the job to be requeued for later execution.
戻り値:成功した場合はSLURM_SUCCESS。失敗した場合、プラグインはSLURM_ERRORを返します。これにより、後で実行するためにジョブがキューに再登録されます。

int select_p_job_ready(job_record_t *job_ptr);

Description: Test if resources are configured and ready for job execution.
説明:リソースが構成され、ジョブ実行の準備ができているかどうかをテストします。

Arguments: job_ptr    (input) pointer to the job being initialized. Data in this job record may safely be read.
引数:job_ptr(入力)初期化されるジョブへのポインター。このジョブレコードのデータは安全に読み取られます。
The nodes and node_bitmap fields of this job record identify the nodes which have already been selected for this job to use.
このジョブレコードのnodeおよびnode_bitmapフィールドは、このジョブで使用するためにすでに選択されているノードを識別します。

Returns: 1 if the job may begin execution, 0 otherwise.
戻り値:ジョブが実行を開始する場合は1、それ以外の場合は0。

int select_p_job_fini(job_record_t *job_ptr);

Description: Note the termination of the specified job. This function is called as the termination process for the job begins (prior to killing the tasks).
説明:指定されたジョブの終了に注意してください。この関数は、ジョブの終了プロセスの開始時に呼び出されます(タスクを強制終了する前)。

Arguments: job_ptr    (input) pointer to the job being terminated. Data in this job record may safely be read or written.
引数:job_ptr(入力)終了するジョブへのポインター。このジョブレコードのデータは、安全に読み書きできます。
The nodes and/or node_bitmap fields of this job record identify the nodes which were selected for this job to use.
このジョブレコードのノードおよび/またはnode_bitmapフィールドは、このジョブが使用するために選択されたノードを識別します。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

int select_p_job_signal(job_record_t *job_ptr, int signal);

Description: Signal the specified job.
説明:指定されたジョブを通知します。
This is needed for architectures where the job steps are launched by a mechanism outside of Slurm, for example when ALPS is used on Cray systems.
これは、たとえばALPSがCrayシステムで使用されている場合など、ジョブステップがSlurmの外部のメカニズムによって起動されるアーキテクチャーに必要です。

Arguments:
job_ptr    (input) pointer to the job to be signaled.
job_ptr(入力)通知されるジョブへのポインタ。

signal    (input) signal to be sent to the job.
ジョブに送信されるシグナル(入力)シグナル。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

int select_p_job_mem_confirm(job_record_t *job_ptr);

Description: Confirm that a job's memory allocation is still valid after a node is restarted.
説明:ノードの再起動後も、ジョブのメモリ割り当てが有効であることを確認します。
This is an issue if the job is allocated all of the memory on a node and that node is restarted with a different memory size than at the time it is allocated to the job.
これは、ジョブがノード上のすべてのメモリに割り当てられ、そのノードがジョブに割り当てられたときとは異なるメモリサイズで再起動された場合の問題です。
This would mostly be an issue on an Intel KNL node where the memory size would vary with the MCDRAM cache mode.
これは主に、メモリサイズがMCDRAMキャッシュモードによって異なるIntel KNLノードの問題です。

Arguments:
job_ptr    (input) pointer to the job to be validated.
job_ptr(入力)検証するジョブへのポインター。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

int select_p_job_suspend(job_record_t *job_ptr, bool indf_susp);

Description: Suspend the specified job. Release resources for use by other jobs.
説明:指定されたジョブを一時停止します。他のジョブが使用できるようにリソースを解放します。

Arguments:
job_ptr    (input) pointer to the job being suspended. Data in this job record may safely be read or written. The nodes and/or node_bitmap fields of this job record identify the nodes which were selected for this job to use.
job_ptr(入力)一時停止されているジョブへのポインタ。このジョブレコードのデータは、安全に読み書きできます。このジョブレコードのノードおよび/またはnode_bitmapフィールドは、このジョブが使用するために選択されたノードを識別します。

indf_susp    (input) flag which if set indicates the job is being suspended indefinitely by the user or administrator. If not set, the job is being suspended temporarily for gang scheduling.
indf_susp(入力)フラグ。設定されている場合、ユーザーまたは管理者によってジョブが無期限に中断されていることを示します。設定されていない場合、ギャングスケジューリングのためにジョブが一時的に中断されています。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

int select_p_job_resume(job_record_t *job_ptr, bool indf_susp);

Description: Resume the specified job which was previously suspended.
説明:以前に中断された指定のジョブを再開します。

Arguments:
job_ptr    (input) pointer to the job being resumed. Data in this job record may safely be read or written. The nodes and/or node_bitmap fields of this job record identify the nodes which were selected for this job to use.
job_ptr(入力)再開されるジョブへのポインター。このジョブレコードのデータは、安全に読み書きできます。このジョブレコードのノードおよび/またはnode_bitmapフィールドは、このジョブが使用するために選択されたノードを識別します。

indf_susp    (input) flag which if set indicates the job is being resumed after being suspended indefinitely by the user or administrator. If not set, the job is being resumed after being temporarily suspended for gang scheduling.
indf_susp(入力)フラグ。設定されている場合、ユーザーまたは管理者によって無期限に中断された後、ジョブが再開されていることを示します。設定されていない場合、ギャングスケジューリングのために一時的に中断された後、ジョブが再開されます。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

int select_p_job_expand_allow (void);

Description: Report the ability of this select plugin to expand jobs.
説明:この選択プラグインがジョブを拡張する機能を報告します。

Returns: True if job expansion is supported, otherwise false.
戻り値:ジョブの拡張がサポートされている場合はtrue、それ以外の場合はfalse。

int select_p_job_expand(job_record_t *from_job_ptr, job_record_t *to_job_ptr);

Description: Transfer all resources currently allocated to one job to another job.
説明:あるジョブに現在割り当てられているすべてのリソースを別のジョブに転送します。
One job is left with no allocated resources and the other job is left with the resources previously allocated to both jobs.
1つのジョブにはリソースが割り当てられずに残り、もう1つのジョブには以前に両方のジョブに割り当てられたリソースが残ります。

Arguments:
from_job_ptr    (input) pointer to the job being to have all of its resources removed.
from_job_ptr(入力)リソースをすべて削除するジョブへのポインタ。

to_job_ptr    (input) pointer to the job getting all of the resources previously either job.
to_job_ptr(入力)以前にいずれかのジョブのすべてのリソースを取得するジョブへのポインター。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

int select_p_job_resized(job_record_t *job_ptr, node_record_t *node_ptr);

Description: Remove the specified node from the job's allocation.
説明:指定したノードをジョブの割り当てから削除します。

Arguments:
job_ptr    (input) pointer to the job being decreased in size.
job_ptr(入力)サイズを縮小するジョブへのポインター。

node_ptr    (input) pointer to the node being removed from a job's allocation.
node_ptr(入力)ジョブの割り当てから削除されるノードへのポインター。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return a Slurm error code.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSlurmエラーコードを返します。

Step-Specific Functions

bitstr_t *select_p_step_pick_nodes(job_record_t *job_ptr, select_jobinfo_t *step_jobinfo, uint32_t node_count)

Description: If the select plugin needs to select nodes for a job step, then do so here.
説明:選択プラグインがジョブステップのノードを選択する必要がある場合は、ここで選択します。

NOTE: The logic within the slurmctld daemon directly selects resources for a job step for all other select plugins at present.
注:slurmctldデーモン内のロジックは、現在、他のすべての選択プラグインのジョブステップのリソースを直接選択します。

Arguments:
job_ptr    (input) Pointer to the job which is attempting to allocate a job step.
job_ptr(入力)ジョブステップを割り当てようとしているジョブへのポインター。

step_jobinfo    (input/output) On input, this is a pointer to an empty buffer. On output for a successful job step allocation, this structure is filled in with detailed information about the job step allocation.
step_jobinfo(入力/出力)入力では、これは空のバッファへのポインタです。ジョブステップ割り当てが成功した場合の出力では、この構造にはジョブステップ割り当てに関する詳細情報が入力されます。

node_count    (input) Number of nodes required by the new job step.
node_count(入力)新しいジョブステップで必要なノードの数。

Returns: If successful, then return a bitmap of the nodes allocated to the job step, otherwise return NULL and the logic within the slurmctld daemon will select the nodes to be allocated to the job step.
戻り値:成功した場合は、ジョブステップに割り当てられたノードのビットマップを返します。それ以外の場合はNULLを返します。slurmctldデーモン内のロジックは、ジョブステップに割り当てられるノードを選択します。

int select_p_step_finish(step_record_t *step_ptr, bool killing_step)

Description: Note that a job step is completing execution
説明:ジョブステップが実行を完了していることに注意してください

Arguments:
step_ptr    (input) Pointer to the step which has completed execution.
step_ptr(入力)実行が完了したステップへのポインター。

killing_step    (input) True if we are beginning the termination of the step (for example, when SIGKILL is being sent); False if the termination of the step has completed (all processes have exited).
killing_step(入力)ステップの終了を開始している場合(たとえば、SIGKILLが送信されている場合)はtrue。ステップの終了が完了した場合(すべてのプロセスが終了した場合)はfalse。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

Advanced Reservation Functions

bitstr_t * select_p_resv_test(resv_desc_msg_t *resv_desc_ptr, uint32_t node_cnt, bitstr_t *avail_bitmap, bitstr_t **core_bitmap)

Description: Identify the nodes which best satisfy a reservation request taking system topology into consideration if applicable.
説明:システムトポロジー(該当する場合)を考慮して、予約要求を最も満たすノードを特定します。

Arguments:
resv_desc_ptr    (input/output) the request of the reservation. The node_list could be changed inside of the plugin.
resv_desc_ptr(入力/出力)予約の要求。node_listはプラグイン内で変更できます。

node_cnt    (input) number of nodes required to satisfy the reservation request.
node_cnt(入力)予約要求を満たすために必要なノードの数。

avail_bitmap    (input/output) a bitmap of the nodes which are available for use in creating the reservation.
avail_bitmap(入力/出力)予約の作成に使用できるノードのビットマップ。

core_bitmap    (input/output) cores which can not be used for this reservation IN, and cores to be used in the reservation OUT (flush bitstr then apply only used cores).
この予約INに使用できないcore_bitmap(入力/出力)コア、および予約OUTで使用されるコア(bitstrをフラッシュしてから、使用済みのコアのみを適用)。

Returns: A bitmap of the nodes which should be used for the advanced reservation or NULL if the selected nodes can not be used for an advanced reservation.
戻り値:事前予約に使用する必要があるノードのビットマップ。選択したノードを事前予約に使用できない場合はNULL。

Get Information Functions

int select_p_get_info_from_plugin(enum select_plugindata_info dinfo, job_record_t *job_ptr, void *data);

Description: Get plugin-specific information about a job.
説明:ジョブに関するプラグイン固有の情報を取得します。

Arguments:
info    (input) identifies the type of data to be updated.
info(入力)は、更新するデータのタイプを識別します。

job_ptr    (input) pointer to the job related to the query (if applicable; may be NULL).
クエリに関連するジョブへのjob_ptr(入力)ポインター(該当する場合、NULLの場合があります)。

data    (output) the requested data.
data(出力)要求されたデータ。

Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.
戻り値:成功した場合はSLURM_SUCCESS。失敗すると、プラグインはSLURM_ERRORを返します。

Block Allocator interface

void select_p_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check);

Description: Setup the cluster dims returned by select_p_ba_get_dims().
説明:select_p_ba_get_dims()によって返されるクラスターdimsをセットアップします。

Arguments:
node_info_ptr    (input) Information about the nodes on a system.
node_info_ptr(入力)システム上のノードに関する情報。

sanity_check    (input) if set then validate that the node name suffix values represent coordinates which are within the system's dimension size (see function select_p_ba_get_dims).
sanity_check(入力)設定されている場合は、ノード名のサフィックス値がシステムの次元サイズ内の座標を表すことを検証します(select_p_ba_get_dims関数を参照)。

int *select_p_ba_get_dims(void);

Description: Return an array containing the number of elements in each dimension of the system size. Only used by Cray ALPS at present.
説明:システムサイズの各次元の要素数を含む配列を返します。現在Cray ALPSでのみ使用されます。

Returns: An array containing the number of elements in each dimension of the system size.
戻り値:システムサイズの各次元の要素数を含む配列。

Last modified 23 October 2019