Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/db12/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def single_dirac_benchmark(iterations_num=1, measured_copies=None, correction=Tr
# pylint: disable = too-many-locals
# This number of iterations corresponds to 1kHS2k.seconds, i.e. 250 HS06 seconds

iters = int(1000 * 1000 * 12.5)
calib = 250.0
complexity = 2.0 # This parameter multiplies amount of work that benchmark have to do
iters = int(1000 * 1000 * 12.5 * complexity)
calib = 250.0 * complexity
m_1 = int(0)
m_2 = int(0)
if sys.version_info[0] < 3:
Expand Down Expand Up @@ -70,6 +71,12 @@ def single_dirac_benchmark(iterations_num=1, measured_copies=None, correction=Tr
if not cput:
return None

# Since os.times() is so innacurate (just two numbers after comma) we introduce small randomization.
# More on that here: https://github.com/DIRACGrid/DB12/issues/15
random_factor = 0.01 * random.random() - 0.005
cput = cput + random_factor
wall = wall + random_factor

norm = calib * iterations_num / cput
if correction:
norm = get_norm_correction(norm)
Expand Down Expand Up @@ -194,11 +201,9 @@ def get_norm_correction(norm_computed):
"""
# If python2 is used, then no action is needed
if sys.version_info[0] < 3:
return norm_computed

logging.warning(
"You are executing DB12 using python3, DB12 score is generally higher than it was with python2"
)
logging.warning(
"You are executing DB12 using python2, DB12 score is generally lower than it would be with python3"
)
logging.warning("Trying to apply a correction...")

# Get the dictionary of factors
Expand Down
32 changes: 31 additions & 1 deletion src/db12/factors.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@
"Intel": 0.86,
"AMD": 0.71
}
}
},
"3.10": {
"cpu_brand": {
"Intel": 1.0,
"AMD": 1.0
}
},
"3.11": {
"cpu_brand": {
"Intel": 1.0,
"AMD": 1.0
}
},
"3.12": {
"cpu_brand": {
"Intel": 1.0,
"AMD": 1.0
}
},
"3.13": {
"cpu_brand": {
"Intel": 1.0,
"AMD": 1.0
}
},
"3.14": {
"cpu_brand": {
"Intel": 1.0,
"AMD": 1.0
}
}
}
}
Loading