BSC Commands
BSC Commands
The Support team at BSC has provided some commands useful for user's awareness and ease of use in our HPC machines. A short summary of these commands follows:
- bsc_queues: Show the queues the user has access to and their time/resources limits.
- bsc_quota: Show a comprehensible quota usage summary for all accessible filesystems.
- bsc_acct: Displays accounting information on the project's allocation usage.
- bsc_load: Displays job load information across all related computing nodes.
- bsc_py_packages: Searches for python packages installed. See bsc_py_packages section for more information.
- bsc_R_packages: Searches for R packages installed. See bsc_R_packages section for more information.
- bsc_project: Displays available HPC accounts and switches to one of them. See bsc_project section for more information.
Most available commands have a dedicated manpage (not all commands are available for all machines). You can check more information about these commands checking their respective manpage:
man <bsc_command>
For example:
man bsc_quota
Commands Available per machine
Machine | bsc_queues | bsc_quota | bsc_acct | bsc_load | bsc_py_packages | bsc_R_packages | bsc_project |
---|---|---|---|---|---|---|---|
Marenostrum 5 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Nord4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
CTE-AMD | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
Huawei | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
NG-Grace | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
bsc_quota
The bsc_quota command gives information about the disk usage and quota for the different filesets of the user/group.
Filesystem Type Usage Quota Limit In doubt Grace | Files In doubt
gpfs_home USR 57.32 GB 80.00 GB 84.00 GB 545.49 MB None | 287160 945
gpfs_projects GRP 182.54 TB 1.03 PB 1.08 PB 147.96 GB None | 272549058 25004
gpfs_scratch GRP 12.76 TB 83.28 TB 87.15 TB 8.24 GB None | 3958929 1188
The user's home has a fixed quota of 80 GB, accessible only by the same user, hence the 'USR' type. The /gpfs/projects/GROUP and /gpfs/scratch/GROUP quota is shared among all members of the same project, hence the 'GRP' type. The different fields of the output are as follows:
- Usage: Disk space in use.
- Quota: The soft limit of the given fileset, meaning surpassing this limit by less than 5% won't instantly block the fileset, but it will past a grace period of a week.
- Limit: The hard limit of the given fileset, going over this limit will block any further attempts at writing data.
- In doubt: Disk usage not accounted for, this may be due to ongoing operations, exceeded quotas, or errors during write operations.
- Grace: Remaining time until the fileset is blocked due to having exceeded the soft limit (but not the hard limit). Default initial value is 7 days.
- Files: Number of files existing in the given fileset.
- In doubt: Same as above, but applied to the number of files.
When run from a Storage5 node (transfer[1..4].bsc.es), the command will also output information regarding the Tapes usage:
Filesystem Type Files Migrated Usage Total Size
gpfs_tapes USR 1865 0 532.0 MB 526.6 MB
gpfs_tapes GRP 65829112 0 189.2 TB 270.6 TB
Both columns contain the same information, the first one including the disk and file usage for the user running the command, and the second one the group's:
- Usage: Disk usage in /gpfs/tapes for the given user/group.
- Files: Number of files stored in the /gpfs/tapes disk space.
- Migrated: Number of files stored in the tapes.
- Total Size: Combined space used in the disk and physical tapes.
This command can be run for any of the user's projects using the --group (-g) option:
bsc_quota -g test01
It can also write the output on a given unit, ranging from MB to PB, using the --unit (-u) option:
bsc_quota -u GB
bsc_quota also has a color-less mode, for terminals that don't support ANSI colors, with the --no-color option.
bsc_py_packages
The bsc_py_packages is a command designed to search through the python packages already installed in the machine so that you can find the module(s) that best suits your needs. This command is case non-sensitive.
The command has different options:
You can specify the name of the packages in the command line:
bsc_py_packages -n name_package [name_package ...]
bsc_py_packages --name name_package [name_package ...]
Or if you prefer you can pass a requirements file as your list of packages to search:
bsc_py_packages -f [FILENAME]
bsc_py_packages --filename [FILENAME]
You can either specify the name of the file or leave it blank. If no file name is specified, it looks for requirements.txt in the directory you are currently standing.
You can save all of the results in a CSV table:
bsc_py_packages -c [CSV]
bsc_py_packages --csv [CSV]
You can either specify the name of the csv or leave it blank. If no name is specified, results will be saved to 'py_packages.csv'.
The command will print the first 5 results. If you want to print more or less results, you can specify it with the following option:
bsc_py_packages -N [NUMBER]
bsc_py_packages --number [NUMBER]
To print the help message:
bsc_py_packages -h
bsc_py_packages --help
bsc_R_packages
The bsc_R_packages is a command that allows you to search for R packages installed on machines. This way, you can find the version(s) of R for the installed packages. This command is case non-sensitive.
The command has different options:
You can specify the name of the packages in the command line:
bsc_R_packages -n name_package [name_package ...]
bsc_R_packages --name name_package [name_package ...]
Or if you prefer you can pass a requirements file as your list of packages to search:
bsc_R_packages -f [FILENAME]
bsc_R_packages --filename [FILENAME]
You can either specify the name of the file or leave it blank. If no file name is specified, it looks for requirements.txt in the directory you are currently standing.
You can save all of the results in a CSV table:
bsc_R_packages -c [CSV]
bsc_R_packages --csv [CSV]
You can either specify the name of the csv or leave it blank. If no name is specified, results will be saved to 'R_packages.csv'.
The command will print the first 5 results. If you want to print more or less results, you can specify it with the following option:
bsc_R_packages -N [NUMBER]
bsc_R_packages --number [NUMBER]
To print the help message:
bsc_R_packages -h
bsc_R_packages --help
bsc_project
The bsc_project command allows for a given user to switch between their slurm accounts, and set some environment variables. Due to this, the command must be run using 'source' instead of running it bare-bone like the other bsc_commands, although available accounts can still be listed without using source:
To list the currently available accounts:
bsc_project list
To switch to an account:
source bsc_project ACCOUNT
The environment variables set by this command are the following:
ACCOUNT: Currently active slurm account
GSCRATCH: Currently active /gpfs/scratch directory
GPROJECTS: Currently active /gpfs/projects directory