Solved path issues
This commit is contained in:
parent
dd46d0ccc4
commit
ceecd79c7a
|
@ -2,6 +2,7 @@ import psutil
|
||||||
import pickle
|
import pickle
|
||||||
import arguments
|
import arguments
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from pathlib import Path
|
||||||
import subprocess as sub
|
import subprocess as sub
|
||||||
from arguments import makeArguments
|
from arguments import makeArguments
|
||||||
|
|
||||||
|
@ -89,15 +90,26 @@ with open("configuration.pkl", "wb") as f:
|
||||||
|
|
||||||
sleep(3)
|
sleep(3)
|
||||||
|
|
||||||
|
cpu_watt = "cpu_watt.sh"
|
||||||
|
ram = "mem_free.sh"
|
||||||
|
gpu = "radeontop.sh"
|
||||||
|
|
||||||
|
path_cpu_watt = Path(cpu_watt)
|
||||||
|
path_ram = Path(ram)
|
||||||
|
path_gpu = Path(gpu)
|
||||||
|
|
||||||
|
path_cpu_watt = str(Path(cpu_watt).absolute()) + '/' + cpu_watt
|
||||||
|
path_ram = str(Path(ram).absolute()) + '/' + ram
|
||||||
|
path_gpu = str(Path(gpu).absolute()) + '/' + gpu
|
||||||
|
|
||||||
if cmd[1] == "main_frequentist.py":
|
if cmd[1] == "main_frequentist.py":
|
||||||
cmd2 = ["./cpu_watt.sh", "freq_{}_cpu_watts".format(wide)]
|
cmd2 = [path_cpu_watt, "freq_{}_cpu_watts".format(wide)]
|
||||||
cmd3 = ["./mem_free.sh", "freq_{}_ram_use".format(wide)]
|
cmd3 = [path_ram, "freq_{}_ram_use".format(wide)]
|
||||||
cmd4 = ["./radeontop.sh", "freq_{}_flop_app".format(wide)]
|
cmd4 = [path_gpu, "freq_{}_flop_app".format(wide)]
|
||||||
elif cmd[1] == "main_bayesian.py":
|
elif cmd[1] == "main_bayesian.py":
|
||||||
cmd2 = ["./cpu_watt.sh", "bayes_{}_cpu_watts".format(wide)]
|
cmd2 = [path_cpu_watt, "bayes_{}_cpu_watts".format(wide)]
|
||||||
cmd3 = ["./mem_free.sh", "bayes_{}_ram_use".format(wide)]
|
cmd3 = [path_ram, "bayes_{}_ram_use".format(wide)]
|
||||||
cmd4 = ["./radeontop.sh", "bayes_{}_flop_app".format(wide)]
|
cmd4 = [path_gpu, "bayes_{}_flop_app".format(wide)]
|
||||||
|
|
||||||
|
|
||||||
path = sub.check_output(['pwd'])
|
path = sub.check_output(['pwd'])
|
||||||
|
|
Loading…
Reference in New Issue