-
Notifications
You must be signed in to change notification settings - Fork 0
/
evaluate_v3.py
51 lines (41 loc) · 2.03 KB
/
evaluate_v3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/python3
"""
maxNumGenCC = min(numCores - 1, 4)
"""
# import logging.config
import os
import time
# logging.config.fileConfig('logging.conf')
cards = ["16", "8", "4", "2", "1"] #
# lmaxs = ["0"] # , "1", "2", "3", "4", "5"]
cores = ["2", "4", "6", "8"] #
numScenarios = 10
solver_path = "solver_apps/org.sat4j.core.jar"
start_time = time.time()
modelPath = "./data/linux/linux.cnf"
for card in cards:
for i in range(numScenarios):
reqPath = "./data/linux/prod_{}_{}.cnf".format(card, i + 1)
# print(
# "python3 ./fastdiag.py " + modelPath + " " + reqPath + " " + solver_path)
# os.system(
# "python3 ./fastdiag.py " + modelPath + " " + reqPath + " " + solver_path + " >>" + " resultFastDiag.csv")
for core in cores:
# print(
# "python3 ./fastdiagp_v1_1.py " + modelPath + " " + reqPath + " " + solver_path + " " + core)
# os.system(
# "python3 ./fastdiagp_v1_1.py " + modelPath + " " + reqPath + " " + solver_path + " " + core + " >>" + " resultFastDiagPV1_1.csv")
print(
"python3 ./fastdiagp_v2_2.py " + modelPath + " " + reqPath + " " + solver_path + " " + core)
os.system(
"python3 ./fastdiagp_v2_2.py " + modelPath + " " + reqPath + " " + solver_path + " " + core + " >>" + " resultFastDiagPV2_2.csv")
# print(
# "python3 ./fastdiagp_v3_1.py " + modelPath + " " + reqPath + " " + solver_path + " " + core)
# os.system(
# "python3 ./fastdiagp_v3_1.py " + modelPath + " " + reqPath + " " + solver_path + " " + core + " >>" + " resultFastDiagPV3_1_1.csv")
print(
"python3 ./fastdiagp_v4_2.py " + modelPath + " " + reqPath + " " + solver_path + " " + core)
os.system(
"python3 ./fastdiagp_v4_2.py " + modelPath + " " + reqPath + " " + solver_path + " " + core + " >>" + " resultFastDiagPV4_2.csv")
total_time = time.time() - start_time
print("Sat4j time: " + str(total_time))