Slurm Priority Site Factor Plugin API

Overview

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

Slurm site_factor plugins are Slurm plugins that implement the Slurm site_factor API described herein. They are designed to provide the site a way to build a custom multifactor priority factor, and will only be loaded and operation alongside
Slurm site_factorプラグインは、ここで説明するSlurm site_factor APIを実装するSlurmプラグインです。これらは、カスタムの多要素優先度要素を構築する方法をサイトに提供するように設計されており、同時に読み込まれ、同時に動作します
PriorityType=priority/multifactor.

The plugins are meant to set and update the site_factor value in the job_record_t corresponding to a given job.
プラグインは、特定のジョブに対応するjob_record_tのsite_factor値を設定および更新するためのものです。
Note that the site_factor itself is an unsigned integer, but uses NICE_OFFSET as an offset to allow the value to be positive or negative. The plugin itself must add NICE_OFFSET to the value stored to site_factor for proper operation, otherwise the value itself will be extremely negative, and the job priority will likely drop to 1. (The lowest value that does not correspond to a held job.)
site_factor自体は符号なし整数ですが、値が正または負になるようにオフセットとしてNICE_OFFSETを使用することに注意してください。プラグイン自体は、適切な操作のためにsite_factorに格納された値にNICE_OFFSETを追加する必要があります。そうしないと、値自体が非常に負になり、ジョブの優先度が1に低下する可能性があります(保留中のジョブに対応しない最低値)。

Plugins must conform to the Slurm Plugin API with the following specifications:
プラグインは、次の仕様のSlurm Plugin APIに準拠している必要があります。

const char plugin_type[]="major/minor"
The major type must be "site_factor" The minor type can be any recognizable abbreviation for the specific plugin.
メジャータイプは「site_factor」である必要があります。マイナータイプは、特定のプラグインの認識可能な省略形にすることができます。

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 must be stubbed, or the plugin will fail to load.
次の関数が表示されます。実装されていない関数はスタブする必要があります。そうしないと、プラグインのロードに失敗します。

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

void site_factor_p_reconfig(void)

Description: Refresh the plugin's configuration. Called whenever slurmctld is reconfigured.
説明:プラグインの構成を更新します。slurmctldが再構成されるたびに呼び出されます。

Returns: void

void site_factor_p_set(job_record_t *job_ptr)

Description: Sets the site_priority of the job, if desired.
説明:必要に応じて、ジョブのsite_priorityを設定します。

Arguments:
job_ptr (input) pointer to the job record.
job_ptr(入力)ジョブレコードへのポインタ。

Returns: void

void site_factor_p_update(void)

Description: Handle periodic updates to all site_priority values in the job_list. Called every
説明:job_listのすべてのsite_priority値に対する定期的な更新を処理します。毎回呼ばれる

Returns: void

Parameters

These parameters can be used in the slurm.conf to configure the plugin and the frequency at which to gather information about running jobs.
これらのパラメーターをslurm.confで使用して、実行中のジョブに関する情報を収集するプラグインと頻度を構成できます。

PrioritySiteFactorParameters
Optional parameters for the site_factor plugin. Interpretation of any value is left to the site_factor plugin itself.
site_factorプラグインのオプションのパラメーター。値の解釈は、site_factorプラグイン自体に任されています。
PrioritySiteFactorPlugin
Specifies which plugin should be used.
使用するプラグインを指定します。
PriorityCalcPeriod
Interval between calls to site_factor_p_update()
site_factor_p_update()の呼び出し間隔

Last modified 23 October 2019