Power Management Plugin Programmer Guide
Overview
This document describes the Slurm power management plugins and the APIs that
defines them. It is intended as a resource to programmers wishing to write
their own Slurm power management plugin. This is version 100 of the API.
このドキュメントでは、Slurm電源管理プラグインとそれらを定義するAPIについて説明します。独自のSlurm電源管理プラグインを作成したいプログラマー向けのリソースとして意図されています。これはAPIのバージョン100です。
Slurm power management plugins must conform to the
Slurm Plugin API with the following specifications:
Slurm電源管理プラグインは、次の仕様のSlurm Plugin APIに準拠している必要があります。
const char plugin_name[]="full text name"
A free-formatted ASCII text string that identifies the plugin.
プラグインを識別する自由形式のASCIIテキスト文字列。
const char
plugin_type[]="major/minor"
The major type must be "power".
The minor type can be any suitable name for the type of power management
package.
The following power management plugins are included in the Slurm distribution
主なタイプは「力」でなければなりません。マイナータイプは、電源管理パッケージのタイプに適した名前にすることができます。以下の電源管理プラグインはSlurmディストリビューションに含まれています
- cray_aries — Use Cray XC APIs to provide power management.
cray_aries — Cray XC APIを使用して電源管理を提供します。 - none — Can be configured to log calls to its functions, but
otherwise does nothing.
none —関数への呼び出しを記録するように構成できますが、それ以外の場合は何もしません。
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.
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からプラグインをロードしようとすると、エラーが発生します。指定されていない場合、プラグインはSlurmコマンドとデーモンによって任意のバージョンから読み込まれる可能性がありますが、プラグイン関数の引数の変更やプラグインで使用される他のSlurm関数の変更が原因で障害を診断することが困難になる場合があります。
Slurm can be configured to use multiple power management plugins if desired.
Slurmは、必要に応じて複数の電源管理プラグインを使用するように構成できます。
API Functions
All of the following functions are required. Functions which are not
implemented must 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.
The C run-time system co-opts those symbols for its own initialization.
The system _init() is called before the Slurm
init(), and the Slurm
fini() is called before the system's
_fini().
注:これらのinitおよびfini関数は、dlopen(3)システムライブラリで説明されているものと同じではありません。Cランタイムシステムは、これらのシンボルを独自の初期化用にco-optします。システムの_init()はSlurm init()の前に呼び出され、Slurm fini()はシステムの_fini()の前に呼び出されます。
void power_p_reconfig(void)
Description:
This function is called when updated configuration information should be read.
この関数は、更新された構成情報を読み取る必要があるときに呼び出されます。
void power_p_job_resume(job_record_t *job_ptr)
Description:
Note that a previously suspended job is being resumed.
Called by the slurmctld daemon.
以前に中断されたジョブが再開されていることに注意してください。slurmctldデーモンによって呼び出されます。
Arguments:
job_ptr
(input) pointer to the job record being resumed.
job_ptr(入力)再開されるジョブレコードへのポインタ。
void power_p_job_start(job_record_t *job_ptr)
Description:
Note that a job has been allocated resources and is about to begin execution.
Called by the slurmctld daemon.
ジョブにはリソースが割り当てられており、実行を開始しようとしています。slurmctldデーモンによって呼び出されます。
Arguments:
job_ptr
(input) pointer to the job record being started.
job_ptr(入力)開始されるジョブレコードへのポインタ。
Last modified 23 October 2019