Node Features Plugin Programmer Guide

Overview

This document describes the node features plugin that is responsible for managing a node's active features.
このドキュメントでは、ノードのアクティブな機能の管理を担当するノード機能プラグインについて説明します。
This is typically used for changing a node's characteristics at boot time.
これは通常、起動時にノードの特性を変更するために使用されます。
For example, an Intel Knights Landing (KNL) processor can be booted in various MCDRAM and NUMA modes.
たとえば、Intel Knights Landing(KNL)プロセッサは、さまざまなMCDRAMおよびNUMAモードで起動できます。
This document is intended as a resource to programmers wishing to write their own node features plugin.
このドキュメントは、独自のノード機能プラグインを作成したいプログラマー向けのリソースとして意図されています。

const char plugin_name[]="launch Slurm plugin"

const char plugin_type[]="node_features/[knl_cray]"

  • knl_cray — Use Cray's capmc command to manage an Intel KNL processor.
    knl_cray — Crayのcapmcコマンドを使用して、IntelKNLプロセッサを管理します。
  • knl_generic — Use Intel commands to manage KNL processor.
    knl_generic —Intelコマンドを使用してKNLプロセッサを管理します。

const uint32_t plugin_version=SLURM_VERSION_NUMBER
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関数の変更により、障害の診断が困難になる可能性があります。

The programmer is urged to study src/plugins/node_features/knl_cray/node_features_knl_cray.c for a sample implementation of a Slurm node features plugin.
プログラマーは、Slurmノード機能プラグインのサンプル実装についてsrc / plugins / node_features / knl_cray /node_features_knl_cray.cを調べることをお勧めします。

API Functions

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.

int fini (void)

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

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

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ランタイムシステムは、独自の初期化のためにこれらのシンボルを採用します。
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()の前に呼び出されます。

bool node_features_p_changeable_feature(char *feature)

Description:
Determine if this (one) specified node feature is under the control of this plugin.
この(1つの)指定されたノード機能がこのプラグインの制御下にあるかどうかを判別します。
The feature must be in a node's available features in order for the node to be reconfigured and the feature become active.
ノードを再構成して機能をアクティブにするには、機能がノードの使用可能な機能に含まれている必要があります。

Arguments:
feature: One node feature.
機能:1ノード機能。

Returns:
true this feature can be set by this plugin
trueこの機能はこのプラグインで設定できます

false this feature can not be et this plugin.
falseこの機能をこのプラグインに設定することはできません。

int node_features_p_reconfig(void)

Description:
Note that the configuration has changed, read configuration parameters again.
構成が変更されていることに注意してください。構成パラメーターを再度読み取ります。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

uint32_t node_features_p_boot_time(void)

Description:
Return the estimated node reboot time in units of seconds.
推定ノード再起動時間を秒単位で返します。
Used as a basis for optimizing scheduling decisions.
スケジューリングの決定を最適化するための基礎として使用されます。

Returns:
Estimated boot time in seconds.
推定起動時間(秒単位)。

int node_features_p_get_node(char *node_list)

Description:
Update active and available features on specified nodes.
指定されたノードでアクティブで利用可能な機能を更新します。
Executed from the slurmctld daemon only and directly updates internal node data structures.
slurmctldデーモンからのみ実行され、内部ノードのデータ構造を直接更新します。

Arguments:
node_list: Regular expression identifying the nodes to be updated. Update information about all nodes is value is NULL.
node_list:更新するノードを識別する正規表現。すべてのノードに関する更新情報は、値がNULLです。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

int node_features_p_job_valid(char *job_features)

Description:
Determine of the user's job constraint string is valid.
ユーザーのジョブ制約文字列の判別が有効です。
This may be used to limit the type of operators supported (Slurm's active feature logic only supports the AND operator) and prevent illegal combinations of node features (e.g. multiple NUMA modes).
これは、サポートされる演算子のタイプを制限し(Slurmのアクティブな機能ロジックはAND演算子のみをサポートします)、ノード機能の不正な組み合わせ(複数のNUMAモードなど)を防ぐために使用できます。
Executed from the slurmctld daemon only when either the job submit or modify operation is invoked.
ジョブの送信または変更操作が呼び出された場合にのみ、slurmctldデーモンから実行されます。

Arguments:
job_features: Job constraints specified by the user (-c/--constraint options).
job_features:ユーザーが指定したジョブ制約(-c / -constraintオプション)。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

char *node_features_p_job_xlate(char *job_features)

Description:
Translate a job's feature request to the node features needed at boot time.
ジョブの機能要求を、起動時に必要なノード機能に変換します。
Job features not required by this plugin (e.g. rack number) will not be returned.
このプラグインに必要のないジョブ機能(ラック番号など)は返されません。
For example, a user requested features may be "cache&quad&knl&rack1".
たとえば、ユーザーが要求した機能は「cache&quad&knl&rack1」である可能性があります。
Since the "knl" and "rack1" represent physical characteristics of the node and are not used by the node features plugin to boot the node, this function's return value will be "cache,quad".
「knl」と「rack1」はノードの物理的特性を表し、ノード機能プラグインがノードを起動するために使用しないため、この関数の戻り値は「cache、quad」になります。
Executed from the slurmctld daemon only.
slurmctldデーモンからのみ実行されます。

Arguments:
job_features: Job constraints specified by the user (-c/--constraint options).
job_features:ユーザーが指定したジョブ制約(-c / -constraintオプション)。

Returns:
Node features used by this plugin when configuring or booting a node.
ノードを構成または起動するときにこのプラグインによって使用されるノード機能。
A string with its memory allocated by xmalloc (i.e. the return value must be released using Slurm's xfree function).
xmallocによってメモリが割り当てられた文字列(つまり、戻り値はSlurmのxfree関数を使用して解放する必要があります)。

bitstr_t *node_features_g_get_node_bitmap(void)

Description:
Return a bitmap of the nodes under this plugin's control.
このプラグインの制御下にあるノードのビットマップを返します。
This may be a subset of the nodes on a cluster of heterogeneous nodes (e.g. some KNL and some Haswell nodes on the same cluster).
これは、異種ノードのクラスター上のノードのサブセットである可能性があります(たとえば、同じクラスター上のいくつかのKNLノードといくつかのHaswellノード)。

Returns:
Bitmap of the nodes under this plugin's control.
このプラグインの制御下にあるノードのビットマップ。
If no NodeFeatures plugins configured this may be NULL.
NodeFeaturesプラグインが構成されていない場合、これはNULLになる可能性があります。
Use FREE_NULL_BITMAP() function to release returned memory.
FREE_NULL_BITMAP()関数を使用して、返されたメモリを解放します。

bool node_features_p_node_power(void)

Description:
Report if the PowerSave mode is required to boot nodes.
ノードの起動にPowerSaveモードが必要かどうかを報告します。
Executed from the slurmctld daemon only.
slurmctldデーモンからのみ実行されます。

Returns:
True if the plugin requires PowerSave mode for booting nodes.
プラグインがノードの起動にPowerSaveモードを必要とする場合はTrue。

void node_features_p_node_state(char **avail_modes, char **current_mode)

Description:
Get this node's available and current features (e.g. MCDRAM and NUMA settings from BIOS for a KNL processor, for example avail_modes="cache,flat,equal,a2a,quad,hemi,snc2,snc4" and current_mode="cache,quad").
このノードの利用可能な現在の機能を取得します(たとえば、KNLプロセッサのBIOSからMCDRAMおよびNUMA設定、たとえばavail_modes = "cache、flat、equal、a2a、quad、hemi、snc2、snc4"およびcurrent_mode = "cache、quad") 。
Executed from the slurmd daemon only.
slurmdデーモンからのみ実行されます。

Arguments:
avail_modes: Nodes state features which are available.
avail_modes:ノードは利用可能な機能を示します。
Value is allocated or appended to as appropriate with xmalloc functions.
値は、xmalloc関数を使用して必要に応じて割り当てまたは追加されます。

current_modes: Nodes state features which are currently in effect.
current_modes:ノードは現在有効な機能を示します。
Value is allocated or appended to as appropriate with xmalloc functions.
値は、xmalloc関数を使用して必要に応じて割り当てまたは追加されます。

bool node_features_g_node_update_valid(void *node_ptr, update_node_msg_t *update_node_msg)

Description:
Determine if this node update request is valid.
このノード更新要求が有効かどうかを判別します。
For example, validate that a non-KNL node does not include any MCDRAM or NUMA modes that are KNL specific.
たとえば、非KNLノードにKNL固有のMCDRAMまたはNUMAモードが含まれていないことを検証します。

Arguments:
node_ptr: Pointer to node_record_t record being updated.
node_ptr:更新されるnode_record_tレコードへのポインター。

update_node_msg: Node update request.
update_node_msg:ノード更新リクエスト。

Returns:
True if the update request is valid, otherwise false.
更新要求が有効な場合はtrue、それ以外の場合はfalse。

uint32_t node_features_g_reboot_weight(void)

Description:
Return the node "weight" field if reboot required to change mode.
モードを変更するために再起動が必要な場合は、ノードの「重み」フィールドを返します。

Returns:
Node "weight" field if reboot required to change mode.
モードを変更するために再起動が必要な場合は、ノードの「重み」フィールド。

char *node_features_p_node_xlate(char *new_features, char *orig_features, char *avail_features, int node_inx)

Description:
Translate a node's new active feature specification as needed to preserve any original features (i.e. features outside of the domain of this plugin).
元の機能(つまり、このプラグインのドメイン外の機能)を保持するために、必要に応じてノードの新しいアクティブな機能仕様を変換します。
Also validate that the new features are a subset of available features.
また、新しい機能が利用可能な機能のサブセットであることを確認します。
For example, a node's new features may be "cache,quad", while its original features may have been "knl,rack1,flat,hemi".
たとえば、ノードの新機能は「cache、quad」であるのに対し、元の機能は「knl、rack1、flat、hemi」である可能性があります。
The original plugin-specific features are "flat,hemi", while features configured outside of the domain of this plugin are "knl,rack1".
元のプラグイン固有の機能は「flat、hemi」ですが、このプラグインのドメイン外で構成された機能は「knl、rack1」です。
In this case, this function's return value will be "knl,rack1,cache,quad".
この場合、この関数の戻り値は「knl、rack1、cache、quad」になります。
This function may also be used to ensure a specific ordering of features (e.g. on a KNL node, always put the MCDRAM mode before the NUMA mode).
この関数は、機能の特定の順序を保証するためにも使用できます(たとえば、KNLノードでは、常にMCDRAMモードをNUMAモードの前に置きます)。
Executed from the slurmctld daemon only.
slurmctldデーモンからのみ実行されます。

Arguments:
new_features: Node's new active features.
new_features:ノードの新しいアクティブな機能。

orig_features: Node's previous active feature state.
orig_features:ノードの以前のアクティブな機能の状態。

avail_features: Node's available features.
avail_features:ノードで利用可能な機能。

node_inx: Node's index in the slurmctld daemon's node record table.
node_inx:slurmctldデーモンのノードレコードテーブル内のノードのインデックス。

Returns:
Node's currently active features, validate and sorted.
ノードの現在アクティブな機能、検証およびソート。
A string with its memory allocated by xmalloc (i.e. the return value must be released using Slurm's xfree function).
xmallocによってメモリが割り当てられた文字列(つまり、戻り値はSlurmのxfree関数を使用して解放する必要があります)。

char *node_features_p_node_xlate2(char *new_features)

Description:
Translate a node's newly configured available feature specification as needed to order the entries as desired.
必要に応じて、ノードの新しく構成された使用可能な機能仕様を変換して、必要に応じてエントリを並べ替えます。
For example on a KNL node, always put the MCDRAM mode before the NUMA mode (i.e. an input of "hemi,flat" is translated to "flat,hemi").
たとえば、KNLノードでは、常にMCDRAMモードをNUMAモードの前に置きます(つまり、「hemi、flat」の入力は「flat、hemi」に変換されます)。
Executed from the slurmctld daemon only.
slurmctldデーモンからのみ実行されます。

Arguments:
new_features: Node's newly configured features.
new_features:ノードの新しく構成された機能。

Returns:
Node's currently available features, validate and sorted.
ノードの現在利用可能な機能、検証およびソート。
A string with its memory allocated by xmalloc (i.e. the return value must be released using Slurm's xfree function).
xmallocによってメモリが割り当てられた文字列(つまり、戻り値はSlurmのxfree関数を使用して解放する必要があります)。

void node_features_p_step_config(bool mem_sort, bitstr_t *numa_bitmap)

Description:
Perform any desired initialization operations prior to launching a job step.
ジョブステップを開始する前に、必要な初期化操作を実行します。

Arguments:
mem_sort: If true, run zonesort before launching a job step.
mem_sort:trueの場合、ジョブステップを起動する前にzonesortを実行します。

numa_bitmap: Identify NUMA nodes on which to execute zonesort.
numa_bitmap:zonesortを実行するNUMAノードを特定します。
If NULL, then execute zonesort on all NUMA nodes
NULLの場合、すべてのNUMAノードでzonesortを実行します

char *node_features_p_user_update(uid_t uid)

Description:
Determine if the specified user can modify the currently available node features.
指定されたユーザーが現在使用可能なノード機能を変更できるかどうかを判別します。

Arguments:
uid: User ID of user making request.
uid:要求を行っているユーザーのユーザーID。

Returns:
True if user can change node active features to other available features.
ユーザーがノードのアクティブな機能を他の利用可能な機能に変更できる場合はTrue。

Last modified 23 October 2019