schrodinger.autoinstall.slurm_install module¶
- schrodinger.autoinstall.slurm_install.download_slurm(version: str, tmpdir: str, logger)¶
Downloads the SLURM source tarball from schedmd.com.
- Parameters:
version – The version of SLURM to download.
tmpdir – The temporary directory to download the file to.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.compile_slurm(version: str, os_enum: OperatingSystem, os_version_str: str, tmpdir: str, logger)¶
Compiles and installs SLURM from source.
This function unpacks the tarball, installs build dependencies for the detected OS, and runs
/configure,make, andmake install.- Parameters:
version – The version of SLURM being installed.
os_enum – The detected operating system.
os_version_str – The full OS version string (e.g., ‘rocky 8’).
tmpdir – The temporary directory where the source is located.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.create_acc_db(db_pw: str, logger)¶
Creates and configures the MariaDB database for SLURM accounting.
- Parameters:
db_pw – The password for the ‘slurm’ database user.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.write_slurm_conf(hostname: str, ncpu: int, ngpu: int, db_pw_provided: bool, logger)¶
Writes the SLURM configuration files with the given hostname.
Renders
slurm.conffrom the Jinja2 template and, if GPUs are present, rewritesgres.confwith the correctNodeName.- Parameters:
hostname – The hostname of the machine.
ncpu – The number of CPU cores.
ngpu – The number of GPUs.
db_pw_provided – Whether SLURM accounting is configured.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.update_lic_sensor_hostname(hostname: str, logger)¶
Updates the
CLUSTER_DNS_NAME_REGEXin the license sensor script.- Parameters:
hostname – The new hostname.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.config_slurm(os_enum: OperatingSystem, os_version_str: str, hostname: str, ncpu: int, ngpu: int, db_pw: str, logger)¶
Configures SLURM and its dependencies like munge.
This function sets up users, directories, permissions, and creates the
slurm.confandslurmdbd.conffiles from Jinja2 templates.- Parameters:
os_enum – The detected operating system.
os_version_str – The full OS version string (e.g., ‘rocky 8’).
hostname – The hostname of the machine.
ncpu – The number of CPU cores.
ngpu – The number of GPUs.
db_pw – The password for the SLURM database user. Can be
None.logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.setup_lic_checking(vschrod: str, ipath: str, hostname: str, logger)¶
Configures the Schrodinger license sensor for SLURM integration.
- Parameters:
vschrod – The version of the Schrodinger suite.
ipath – The installation path for the Schrodinger suite.
hostname – The hostname of the machine.
logger – A logger instance for logging messages.
- schrodinger.autoinstall.slurm_install.run(vslurm: str, vschrod: str, ipath: str, os_enum: OperatingSystem, os_version_str: str, hostname: str, ncpu: int, ngpu: int, liccheck: bool, tmpdir: str)¶
Main routine to install and configure SLURM and its integration.
- Parameters:
vslurm – The version of SLURM to install.
vschrod – The version of the Schrodinger suite.
ipath – The installation path for the Schrodinger suite.
os_enum – The detected operating system.
os_version_str – The full OS version string (e.g., ‘rocky 8’).
hostname – The hostname of the machine.
ncpu – The number of CPU cores.
ngpu – The number of GPUs.
liccheck – A boolean to enable license checking features.
tmpdir – The temporary directory for downloads and compilation.