예제 #1
0
 def __init__(self):
     self.host = os.environ.get("HOST")
     self.hostname = os.environ.get("HOSTNAME")
     self.computername = os.environ.get("COMPUTERNAME")
     self.hosttype = os.environ.get("HOSTTYPE")
     self.processor_architecture = os.environ.get("PROCESSOR_ARCHITECTURE")
     self.machtype = os.environ.get("MACHTYPE")
     self.ostype = os.environ.get("OSTYPE")
     self.vendor = os.environ.get("VENDOR")
     self.user = os.environ.get("USER")
     self.username = os.environ.get("USERNAME")
     self.homedir = None
     if (os.name == "nt"):
         homedrive = os.environ.get("HOMEDRIVE")
         homepath = os.environ.get("HOMEPATH")
         if (not None in [homedrive, homepath]):
             self.homedir = os.path.join(homedrive, homepath)
     else:
         self.homedir = os.environ.get("HOME")
     getpid = getattr(os, "getpid", None)
     if (getpid is None):
         self.pid = None
     else:
         self.pid = getpid()
     self.sge_info = sge_utils.info()
     self.pbs_info = pbs_utils.chunk_info()
예제 #2
0
파일: utils.py 프로젝트: hickerson/bbn
 def __init__(self):
   self.host = os.environ.get("HOST")
   self.hostname = os.environ.get("HOSTNAME")
   self.computername = os.environ.get("COMPUTERNAME")
   self.hosttype = os.environ.get("HOSTTYPE")
   self.processor_architecture = os.environ.get("PROCESSOR_ARCHITECTURE")
   self.machtype = os.environ.get("MACHTYPE")
   self.ostype = os.environ.get("OSTYPE")
   self.vendor = os.environ.get("VENDOR")
   self.user = os.environ.get("USER")
   self.username = os.environ.get("USERNAME")
   self.homedir = None
   if (os.name == "nt") :
     homedrive = os.environ.get("HOMEDRIVE")
     homepath = os.environ.get("HOMEPATH")
     if (not None in [homedrive, homepath]) :
       self.homedir = os.path.join(homedrive, homepath)
   else :
     self.homedir = os.environ.get("HOME")
   getpid = getattr(os, "getpid", None)
   if (getpid is None):
     self.pid = None
   else:
     self.pid = getpid()
   self.sge_info = sge_utils.info()
   self.pbs_info = pbs_utils.chunk_info()
예제 #3
0
 def queuing_system_overrides_chunk(O):
   from libtbx.queuing_system_utils import pbs_utils, sge_utils
   pbs_info = pbs_utils.chunk_info()
   sge_info = sge_utils.info()
   assert [pbs_info, sge_info].count(None) <= 1
   if (pbs_info.have_array()):
     O.queuing_system_info = pbs_info
     n, i = pbs_info.as_n_i_pair()
     O.n = max(O.n, n)
     O.i = i
   elif (sge_info.have_array()):
     O.queuing_system_info = sge_info
     O.n = max(O.n, sge_info.last)
     O.i = sge_info.id - 1
   return O
예제 #4
0
파일: __init__.py 프로젝트: hickerson/bbn
 def queuing_system_overrides_chunk(O):
     from libtbx.queuing_system_utils import pbs_utils, sge_utils
     pbs_info = pbs_utils.chunk_info()
     sge_info = sge_utils.info()
     assert [pbs_info, sge_info].count(None) <= 1
     if (pbs_info.have_array()):
         O.queuing_system_info = pbs_info
         n, i = pbs_info.as_n_i_pair()
         O.n = max(O.n, n)
         O.i = i
     elif (sge_info.have_array()):
         O.queuing_system_info = sge_info
         O.n = max(O.n, sge_info.last)
         O.i = sge_info.id - 1
     return O