Burst Buffer Plugin Programmer Guide

Overview

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

Slurm burst buffer plugins must conform to the Slurm Plugin API with the following specifications:
Slurmバーストバッファプラグインは、Slurmプラグイン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 "burst_buffer". The minor type can be any suitable name for the type of burst buffer package. The following burst buffer plugins are included in the Slurm distribution
主なタイプは「burst_buffer」でなければなりません。マイナータイプは、バーストバッファパッケージのタイプに適した名前にすることができます。以下のバーストバッファプラグインはSlurmディストリビューションに含まれています

  • datawrap — Use Cray APIs to provide burst buffer.
    datawrap — Cray APIを使用してバーストバッファを提供します。
  • generic — Use generic burst buffer plugin.
    汎用—汎用バーストバッファプラグインを使用します。

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

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

int bb_p_load_state(bool init_config)

Description:
This function loads the current state of the burst buffer.
この関数は、バーストバッファの現在の状態をロードします。

Arguments:
init_config (input) true if called as part of slurmctld initialization.
init_config(入力)slurmctld初期化の一部として呼び出された場合はtrue。

Returns:
A Slurm errno

int bb_p_state_pack(uid_t uid, Buf buffer, uint16_t protocol_version)

Description:
Pack current burst buffer state information for network transmission.
現在のバーストバッファの状態情報をネットワーク送信用にパックします。

Arguments:
uid (input) Owning user ID.
uid(入力)所有ユーザーID。

buffer (input) buffer that will be packed.
パックされるバッファ(入力)バッファ。

protocol_version (input) Version number of the data packing mechanism.
protocol_version(入力)データパッキングメカニズムのバージョン番号。

Returns:
A Slurm errno

int bb_p_reconfig(void)

Description:
Reread the burst buffer config file when it is updated.
バーストバッファー構成ファイルが更新されたときに再度読み取ります。

Returns:
A Slurm errno

uint64_t bb_p_get_system_size(char *name)

Description:
Get the total burst buffer size in MB of a given plugin name.
指定されたプラグイン名の合計バーストバッファサイズをMB単位で取得します。

Arguments:
name (input) Plugin name of the burst buffer. If name is NULL, return the total space of all burst buffer plugins.
name(入力)バーストバッファのプラグイン名。nameがNULLの場合、すべてのバーストバッファプラグインの合計スペースを返します。

Returns:
The size of the burst buffer in MB.
バーストバッファーのサイズ(MB単位)。

int bb_p_job_validate(job_desc_msg_t *job_desc, uid_t submit_uid)

Description:
Validation of a job submit request with respect to burst buffer option.
バーストバッファオプションに関するジョブサブミット要求の検証。

Arguments:
job_desc (input) Job submission request.
job_desc(入力)ジョブ送信要求。

submit_uid (input) ID of the user submitting the job.
submit_uid(入力)ジョブを送信するユーザーのID。

Returns:
A Slurm errno.

int bb_p_job_validate2(job_record_t *job_ptr, char **err_msg)

Description:
Validation of a job submit request with respect to burst buffer option.
バーストバッファオプションに関するジョブサブミット要求の検証。

Arguments:
job_ptr (input) Job record for the job request with respect to burst buffer.
job_ptr(入力)バーストバッファーに関するジョブ要求のジョブレコード。

err_msg (output) Error message, sent directlt to job submission command
err_msg(出力)エラーメッセージ、directltをジョブ送信コマンドに送信

Returns:
A Slurm errno.

void bb_p_job_set_tres_cnt(job_record_t *job_ptr, uint64_t *tres_cnt, bool locked);

Description:
Set the tres count in the job recored.
再コアされたジョブのtresカウントを設定します。

Arguments:
job_ptr (input) Job record to be set.
job_ptr(入力)設定するジョブレコード。

tres_cnt (input/output) Fill in this already allocated array with tres_cnts
tres_cnt(入力/出力)この割り当て済みの配列にtres_cntsを入力します

locked (input) If tres read lock is locked or not.
locked(入力)トレス読み取りロックがロックされているかどうか。

Returns:
None

time_t bb_p_job_get_est_start(job_record_t *job_ptr)

Description:
Get an estimation of when a job can start.
ジョブを開始できる時期の見積もりを取得します。

Arguments:
job_ptr (input) Start time of this job.
job_ptr(入力)このジョブの開始時刻。

Returns:
Estimated start time of job_ptr.
job_ptrの推定開始時刻。

int bb_p_job_try_stage_in(void)

Description:
Allocate burst buffers to jobs expected to start soonest.
バーストバッファーを、最も早く開始することが予想されるジョブに割り当てます。

Returns:
A Slurm errno

int bb_p_job_test_stage_in(job_record_t *job_ptr, bool test_only)

Description:
Determine if a job's burst buffer stage-in is complete.
ジョブのバーストバッファのステージインが完了しているかどうかを確認します。

Arguments:
job_ptr (input) Job record to test.
job_ptr(入力)テストするジョブレコード。

test_only (input) If false, then attempt to load burst buffer if possible.
test_only(入力)falseの場合、可能であればバーストバッファのロードを試みます。

Returns:
0 stage-in is underway
0ステージインが進行中

1 stage-in complete
1つのステージイン完了

-1 state-in not started or burst buffer in some unexpeced state.
-1ステートインが開始されていないか、予期せぬ状態でバッファをバーストしています。

int bb_p_job_begin(job_record_t *job_ptr)

Description:
Attempt to claim burst buffer resources.
バーストバッファリソースを要求しようとします。

Arguments:
job_ptr (input) Job record to test.
job_ptr(入力)テストするジョブレコード。

Returns:
A Slurm errno

int bb_p_job_revoke_alloc(job_record_t *job_ptr)

Description:
Revoke allocation, but do not release resources. Executed after bb_g_job_begin if there was an allocation failure. Does not release previously allocated resources.
割り当てを取り消しますが、リソースは解放しません。割り当てに失敗した場合、bb_g_job_beginの後に実行されます。以前に割り当てられたリソースを解放しません。

Arguments:
job_ptr (input) Job record to test.
job_ptr(入力)テストするジョブレコード。

Returns:
A Slurm errno

int bb_p_job_start_stage_out(job_record_t *job_ptr)

Description:
Trigger a job's burst buffer stage out to begin.
ジョブのバーストバッファーステージをトリガーして開始します。

Arguments:
job_ptr (input) Job to stage out.
job_ptr(入力)ステージアウトするジョブ。

Returns:
A Slurm errno

int bb_p_job_test_post_run(job_record_t *job_ptr)

Description:
Determine of jobs's post run operation is complete.
ジョブのポストラン操作の決定が完了しました。

Arguments:
job_ptr (input) Job to check if post run operation is complete.
job_ptr(入力)実行後操作が完了したかどうかを確認するジョブ。

Returns:
0 - post run operation is underway
0-ポストラン操作が進行中です

1 - post run operation complete
1-実行後の操作​​が完了しました

-1 - fatal error
-1-致命的なエラー

int bb_p_job_test_stage_out(job_record_t *job_ptr)

Description:
Determine of jobs's stage out is complete.
ジョブの段階的なアウトの決定が完了しました。

Arguments:
job_ptr (input) Job to check if stage out is complete.
job_ptr(入力)ステージアウトが完了したかどうかを確認するジョブ。

Returns:
0 - stage-out is underway
0-ステージアウトが進行中です

1 - stage-out complete
1-ステージアウト完了

-1 - fatal error
-1-致命的なエラー

int bb_p_job_cancel(job_record_t *job_ptr)

Description:
Terminate any file staging and release burst buffer resources.
ファイルのステージングを終了し、バーストバッファリソースを解放します。

Arguments:
job_ptr (input) Job to cancel.
job_ptr(入力)キャンセルするジョブ。

Returns:
A Slurm errno

char *bb_p_xlate_bb_2_tres_str(char *burst_buffer)

Description:
Translate burst buffer string to TRES string.
バーストバッファ文字列をTRES文字列に変換します。

Arguments:
burst_buffer (input) Burst buffer to translate to TRES string
burst_buffer(入力)TRES文字列に変換するバーストバッファー

Returns:
The TRES string of the given burst buffer (Note: User must xfree the return value).
指定されたバーストバッファーのTRES文字列(注:ユーザーは戻り値をxfreeする必要があります)。

Last modified 23 October 2019