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 |
---|---|---|---|---|---|---|---|
Marenostrum5 | ✅ | 🕓 | ✅ | ✅ | ✅ | ✅ | ✅ |
Marenostrum4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
CTE-POWER | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
CTE-ARM | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
CTE-AMD | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ |
Nord3v2 | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ |
MinoTauro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
Starlife | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ |
Huawei | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
HSM Compute | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
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:
To list the currently available accounts:
source 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
SCRATCH: Currently active /gpfs/scratch directory
GPROJECTS: Currently active /gpfs/projects directory