cloudmesh_client.cloud.hpc package

Submodules

cloudmesh_client.cloud.hpc.BatchProvider module

cloudmesh_client.cloud.hpc.BatchProvider.BatchProvider(name, user=None)[source]

Returns a provider for a given batch system that is defined in the cloudmesh.yaml file. Here you find a section such as:

hpc:
    active:
    - india
    clusters:
      india:
        cm_heading: India HPC CLuster
        cm_host: india
        cm_label: indiahpc
        cm_type: slurm
        cm_type_version: 14.11.9
        credentials:
          username: TBD
          project: None
        default:
          queue: delta
          experiment_dir: /N/u/{username}/experiment
          prefix:
            username: null

You can define a new resource by copying this section under india and give it a name according to your cluster. Fill out the username, and if appropirate define a project, which is the account this queue is charged under

Ussage:

provider = BatchProvider("india")

Additional functions are defined as it inherits from BatchProviderBase and the provider type which is in the above example slurm

Parameters:
  • name – name of the cluster in the cloudmesh yaml file
  • user – cloudmesh user name associated with this queue.
Returns:

the provider

cloudmesh_client.cloud.hpc.BatchProviderBase module

class cloudmesh_client.cloud.hpc.BatchProviderBase.BatchProviderBase[source]

Bases: object

classmethod counter()[source]
classmethod create_remote_dir(cluster, directory)[source]
classmethod delete(**kwargs)[source]
classmethod incr()[source]
jobid = 0
classmethod jobname(counter=None)[source]
prefix = 'job'
classmethod queue(**kwargs)[source]
classmethod read_config(cluster)[source]

reads in the cluster config from the yaml file and returns the specific cluster information

newhpc:
experiment:
name: gregor-00000

active: - comet - juliet clusters:

india:

cm_heading: India HPC CLuster cm_host: india cm_label: indiahpc cm_type: slurm cm_type_version: 14.11.9 credentials:

username: gregor project: None
default:
queue: delta experiment_dir: ./experiment
Parameters:
  • cls
  • cluster
Returns:

classmethod run(**kwargs)[source]

Module contents

This module is used to interface with classical HPC queuing systems.