Burst Buffer Plugin Programmer Guide

Overview

This document describes the Slurm burst buffer plugins and the APIs that defines them.
このドキュメントでは、Slurmバーストバッファプラグインとそれらを定義するAPIについて説明します。
It is intended as a resource to programmers wishing to write their own Slurm burst buffer plugin.
これは、独自の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.
メジャータイプは「burst_buffer」である必要があります。マイナータイプは、バーストバッファパッケージのタイプに適した名前にすることができます。
The following burst buffer plugins are included in the Slurm distribution
以下のバーストバッファープラグインがSlurmディストリビューションに含まれています

  • datawrap — Use Cray APIs to provide burst buffer.
    datawrap — CrayAPIを使用してバーストバッファを提供します。
  • 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.
指定されている場合、このプラグインのビルドに使用された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

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

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.
buffer(入力)パックされるバッファー。

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.
name(入力)バーストバッファのプラグイン名。
If name is NULL, return the total space of all burst buffer plugins.
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(出力)エラーメッセージ、直接ジョブ送信コマンドに送信されました。

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.
記録されたジョブのトレスカウントを設定します。

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.
ロック(入力)トレス読み取りロックがロックされているかどうか。

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.
割り当てに失敗した場合、bb_g_job_beginの後に実行されます。
Does not release previously allocated resources.
以前に割り当てられたリソースを解放しません。

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