Package Biskit :: Module default_hosts
[hide private]
[frames] | no frames]

Module default_hosts

source code

List of cluster computers.

Each host must be accessible via ssh w/o password.

List and dictionaries describing avaliable hosts:
 nodes_* .. lists with one entry per computer
 cpus_*  .. lists with one entry per CPU (usuallly that's the one used)

 nodes/cpus_own   .. computers reserved for own use, highest priority
 nodes/cpus_shared.. computers shared with others, medium priority
 nodes/cpus_other .. computers mainly used by others, lowest priority

 nodes/cpus_all   .. all computers in descending priority
 nice_dic         .. nice value for each host


Classes [hide private]
  Test
Mock test, hosts only contains data

Functions [hide private]
str OR None getHosts(section, option)
Get host names from the config file hosts.dat specified bythe section and option parameters.
dict getDict(section, option)
Get host dictionaries from the config file hosts.dat specified by the section and option parameters.

Variables [hide private]
  conf = ConfigParser.ConfigParser()
  dual = []
  nodes_own = __dual+ __single
  cpus_own = __dual* 2+ __single
  nodes_shared = __dual+ __single
  cpus_shared = __dual* 2+ __single
  __dual = getHosts('others_hosts', 'dual')
  __single = getHosts('others_hosts', 'single')
  nodes_other = __dual+ __single
  cpus_other = __dual* 2+ __single
  nodes_all = nodes_own+ nodes_shared+ nodes_other
  cpus_all = cpus_own+ cpus_shared+ cpus_other
  nice_dic = {'default': 19}
  own_nice = getDict('own_hosts', 'nice')
  shared_nice = getDict('shared_hosts', 'nice')
  others_nice = getDict('others_hosts', 'nice')
  own_ram = getDict('own_hosts', 'ram')
  shared_ram = getDict('shared_hosts', 'ram')
  others_ram = getDict('others_hosts', 'ram')
  ram_dic = {'default': 0.5}
  nodes_exclude = []
  REMOVE = 1

Function Details [hide private]

getHosts(section, option)

source code 

Get host names from the config file hosts.dat specified bythe section and option parameters.
Parameters:
  • section (str) - ConfigParser section in ~/.biskit/hosts.dat
  • option (str) - ConfigParser option in ~/.biskit/hosts.dat
Returns: str OR None
host name taken from hosts.dat or None

getDict(section, option)

source code 

Get host dictionaries from the config file hosts.dat specified by the section and option parameters. The dictionary has the host as key and the values can be availiable RAM or a nice value.
Parameters:
  • section (str) - ConfigParser section in ~/.biskit/hosts.dat
  • option (str) - ConfigParser option in ~/.biskit/hosts.dat
Returns: dict
dictionary with host:value

Variables Details [hide private]

conf

Value:
ConfigParser.ConfigParser()                                            
      

dual

Value:
[]                                                                     
      

nodes_own

Value:
__dual+ __single                                                       
      

cpus_own

Value:
__dual* 2+ __single                                                    
      

nodes_shared

Value:
__dual+ __single                                                       
      

cpus_shared

Value:
__dual* 2+ __single                                                    
      

__dual

Value:
getHosts('others_hosts', 'dual')                                       
      

__single

Value:
getHosts('others_hosts', 'single')                                     
      

nodes_other

Value:
__dual+ __single                                                       
      

cpus_other

Value:
__dual* 2+ __single                                                    
      

nodes_all

Value:
nodes_own+ nodes_shared+ nodes_other                                   
      

cpus_all

Value:
cpus_own+ cpus_shared+ cpus_other                                      
      

nice_dic

Value:
{'default': 19}                                                        
      

own_nice

Value:
getDict('own_hosts', 'nice')                                           
      

shared_nice

Value:
getDict('shared_hosts', 'nice')                                        
      

others_nice

Value:
getDict('others_hosts', 'nice')                                        
      

own_ram

Value:
getDict('own_hosts', 'ram')                                            
      

shared_ram

Value:
getDict('shared_hosts', 'ram')                                         
      

others_ram

Value:
getDict('others_hosts', 'ram')                                         
      

ram_dic

Value:
{'default': 0.5}                                                       
      

nodes_exclude

Value:
[]                                                                     
      

REMOVE

Value:
1