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

Module hosts

source code

List of cluster computers. Each host must be accessible via ssh w/o password:
 nodes_* .. lists with one entry per computer
 cpus_*  .. lists with one entry per CPU (usually 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] getHosts(section, option)
Get a list of hosts from the host list using ConfigParser.
dict getDict(section, option)
Get a dictionary with host as key.

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 a list of hosts from the host list using ConfigParser.
Parameters:
  • section (str) - ConfigParser section in ~/.biskit/hosts.dat
  • option (str) - ConfigParser option in ~/.biskit/hosts.dat
Returns: [str]
a list of hosts

getDict(section, option)

source code 

Get a dictionary with host as key.
Parameters:
  • section (str) - ConfigParser section in ~/.biskit/hosts.dat
  • option (str) - ConfigParser option in ~/.biskit/hosts.dat
Returns: dict
a dictionary with host as key and (nice) value as 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