Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92997263
hpc_check
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 11:35
Size
1 KB
Mime Type
text/x-perl
Expires
Wed, Nov 27, 11:35 (2 d)
Engine
blob
Format
Raw Data
Handle
22553303
Attached To
rSLURMACCOUNTS slurm-accounts
hpc_check
View Options
#!/usr/bin/perl -w
use strict;
use FindBin;
use lib "$FindBin::RealBin/../lib/blib";
use ParseAccounts;
use Slurm;
use Cwd 'abs_path';
my $accounts_file = "accounts.yaml";
my $verbose = 0;
# -----------------------------------------------------------------------------
# Command line options
#
my %opt;
sub print_usage() {
print STDERR << "EOF";
Check account definition file $accounts_file
usage: $0 [-hv]
OPTIONS
-v : verbose, print internal hash data structures
-h : this (help) message
example: $0
EOF
exit;
}
sub init()
{
use Getopt::Std;
my $opt_string = 'hv';
getopts("$opt_string", \%opt) or print_usage();
# pathname of logfile
$accounts_file = abs_path("$FindBin::RealBin/../etc/" . $accounts_file);
print_usage() if $opt{h};
print_usage() if (scalar @ARGV > 1);
$verbose = 1 if $opt{v};
}
&init();
ParseAccounts::init(Slurm::get_cluster_name(),$accounts_file);
if ($verbose) {
print "Group:accounts\n";
print "--------------\n";
ParseAccounts::print_groups();
print "Accounts\n";
print "--------\n";
ParseAccounts::print_accounts();
}
Event Timeline
Log In to Comment