2021-12-09 10:56:07 +00:00
|
|
|
import os
|
2021-12-10 10:07:22 +00:00
|
|
|
|
|
|
|
result = [os.path.join(dp, f) for dp, dn, filenames in os.walk("data") for f in filenames if os.path.splitext(f)[1] == '.opb']
|
2021-12-09 10:56:07 +00:00
|
|
|
|
|
|
|
with open("machines.txt") as file:
|
2021-12-10 10:07:22 +00:00
|
|
|
machines = [machine.rstrip() for machine in file.readlines()]
|
2021-12-09 10:56:07 +00:00
|
|
|
|
2021-12-10 10:07:22 +00:00
|
|
|
# i = 0
|
|
|
|
# while len(result) > 0:
|
|
|
|
# knap = result.pop()[:-4]
|
|
|
|
# victime = machines[i % len(machines)]
|
|
|
|
# i+=1
|
|
|
|
# cmd = f"""ssh lfainsin@{victime} -o "ConnectTimeout 3" -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" "cd 2A/RO/tp2/ && tmux new-session -d 'julia test.jl {knap}.opb > {knap}.stdout_jl'" """
|
|
|
|
# print(cmd)
|
|
|
|
# os.system(cmd)
|
2021-12-09 14:43:05 +00:00
|
|
|
|
2021-12-09 15:43:14 +00:00
|
|
|
# i = 0
|
|
|
|
# while len(result) > 0:
|
|
|
|
# knap = result.pop()[:-4]
|
|
|
|
# victime = machines[i % len(machines)]
|
|
|
|
# i+=1
|
2021-12-10 10:07:22 +00:00
|
|
|
# cmd = f"""ssh lfainsin@{victime} -o "ConnectTimeout 3" -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" "cd 2A/RO/tp2/ && tmux new-session -d 'glpsol --lp {knap}.lp -o {knap}.sol > {knap}.stdout_lp'" """
|
2021-12-09 15:43:14 +00:00
|
|
|
# print(cmd)
|
|
|
|
# os.system(cmd)
|
2021-12-09 14:43:05 +00:00
|
|
|
|
|
|
|
# for machine in machines:
|
2021-12-10 10:07:22 +00:00
|
|
|
# cmd = f"""ssh lfainsin@{machine} -o "ConnectTimeout 3" -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" "tmux kill-server" """
|
|
|
|
# print(cmd)
|
|
|
|
# os.system(cmd)
|