Commit e1e1abff authored by ext-neveu_n's avatar ext-neveu_n
Browse files

chaning the way hostname is found

parent 5109425e
......@@ -111,10 +111,9 @@ class Simulation:
print( ' :::: ' + s + ' = ' + str(value))
if not doNobatch:
p = subprocess.Popen(['hostname'], stdout=subprocess.PIPE)
hostname, err = p.communicate()
#hostname = commands.getoutput("hostname")
print("On host ",hostname)
hostname = subprocess.check_output('hostname')
print("On host ",hostname.strip())
if os.getenv("SGE_TIME"):
print( "You use deprecated environment variable SGE_TIME. Please use in the future TIME")
......@@ -149,7 +148,7 @@ class Simulation:
runfile = 'run.blues'
self.WritePBSBlues(opalexe, oinpFile, CORES, time, ram, info, queue)
elif (hostname.startswith(b"bebop")):
elif (hostname.startswith(b"bebop") or hostname.startswith(b"bdw") or hostname.startswith(b"knl")):
batchsys = 'SLURM'
runfile = 'run.bebop'
self.WriteBebop(opalexe, oinpFile, CORES, time, ram, info, runfile, queue, hypert)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment