ClusterInfo

버전 1.2.0.1 (3.12 KB) 작성자: Raymond Norris
Used for passing parameters to third party schedulers
다운로드 수: 449
업데이트 날짜: 2016/9/1

라이선스 보기

When submitting jobs to a third party scheduler, if it's necessary to pass additional arguments to the scheduler, rather than modifying the configuration, properties can be stored using the singleton class, ClusterInfo.
For example, if the Sys Admin wants the user to specify the walltime of a job, the user can specify it as such:

>> ClusterInfo.setWallTime('04:00:00');
>> job = batch(@simulation,1,{2,4});

In turn, the integration script used by the configuration will query for the walltime as such:

wt = ClusterInfo.getWallTime();
if isempty(wt)
% Not set, default to 10 minutes
wt = '00:10:00';
end
pn = ClusterInfo.getProjectName();
if isempty(pn)
% Not set, but required, so error out
error('For billing purposes, you must specify the project name')
end
...
% Embedded user options to call
cmd = system(['qsub -A ' pn ' -l walltime=' wt ' ...]);

The properties that can be passed are:

% Arch
% ClusterHost
% EmailAddress
% GpusPerNode
% MemUsage
% PrivateKeyFile
% ProcsPerNode
% ProjectName
% QueueName
% Reservation
% UseGpu
% UserDefinedOptions
% UserNameOnCluster
% WallTime

If an additional property is required, the Admin should create a setter and getter for it in ClusterInfo.m. Alternatively, the user can pass an argument to 'UserDefinedOptions', for instance

>> ClusterInfo.setUserDefinedOptions('-l pvmem=2gb')

The advantage to using ClusterInfo is that it allows the Admin to support a single configuration for their cluster while allowing the user the ability to pass additional arguments, tailoring it to their specific job submission.

Once the property is set, it is persistent between jobs as well as MATLAB sessions for that user. Call ClusterInfo.state to get the state of each property and ClusterInfo.clear to clear all property values.

ClusterInfo can be used by any integration script (i.e. any scheduler).

인용 양식

Raymond Norris (2024). ClusterInfo (https://www.mathworks.com/matlabcentral/fileexchange/32441-clusterinfo), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 MATLAB Parallel Server에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.1

Updated license

1.2.0.0

Added GpusPerNode and PrivateKeyFile.

1.1.0.0

Added the property, UserDefinedOptions, which allows the user to store arguments that are not already in ClusterInfo.

1.0.0.0