Initial support for Demolito
Attempt to make the updated Client.py not care about trailing/leading /s in URLs
This commit is contained in:
1 parent
02ea5b92d9
commit
c671041480
2 files changed
+30
-9
No files matched your search
+17
-9
@@ -14,6 +14,7 @@ COMPILATION_FLAGS = {
|
|||||||
'ETHEREAL' : [], # Custom makefile flags for Ethereal
|
'ETHEREAL' : [], # Custom makefile flags for Ethereal
|
||||||
'LASER' : [], # Custom makefile flags for Laser
|
'LASER' : [], # Custom makefile flags for Laser
|
||||||
'WEISS' : [], # Custom makefile flags for Weiss
|
'WEISS' : [], # Custom makefile flags for Weiss
|
||||||
|
'DEMOLITO' : [], # Custom makefile flags for Demolito
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -21,6 +22,13 @@ COMPILATION_FLAGS = {
|
|||||||
IS_WINDOWS = platform.system() == 'Windows'
|
IS_WINDOWS = platform.system() == 'Windows'
|
||||||
IS_LINUX = platform.system() != 'Windows'
|
IS_LINUX = platform.system() != 'Windows'
|
||||||
|
|
||||||
|
def urljoin(*args):
|
||||||
|
|
||||||
|
# Join a set of URL paths while maintaining the correct
|
||||||
|
# format of "/"'s between each part of the URL's pathway
|
||||||
|
|
||||||
|
args = [f.lstrip("/").rstrip("/") for f in args]
|
||||||
|
return "/".join(args) + "/"
|
||||||
|
|
||||||
def killCutechess(cutechess):
|
def killCutechess(cutechess):
|
||||||
|
|
||||||
@@ -66,7 +74,7 @@ def getCutechess(server):
|
|||||||
|
|
||||||
# Ask the server where the core files are saved
|
# Ask the server where the core files are saved
|
||||||
source = requests.get(
|
source = requests.get(
|
||||||
'{0}/getFiles/'.format(server),
|
urljoin(server, 'getFiles'),
|
||||||
timeout=HTTP_TIMEOUT).content.decode('utf-8')
|
timeout=HTTP_TIMEOUT).content.decode('utf-8')
|
||||||
|
|
||||||
# Windows workers need the cutechess.exe and the Qt5Core dll.
|
# Windows workers need the cutechess.exe and the Qt5Core dll.
|
||||||
@@ -74,17 +82,17 @@ def getCutechess(server):
|
|||||||
# Make sure Linux binaries are set to be executable.
|
# Make sure Linux binaries are set to be executable.
|
||||||
|
|
||||||
if IS_WINDOWS and not os.path.isfile('cutechess.exe'):
|
if IS_WINDOWS and not os.path.isfile('cutechess.exe'):
|
||||||
getFile('{0}cutechess-windows.exe'.format(source), 'cutechess.exe')
|
getFile(urljoin(source, 'cutechess-windows.exe'), 'cutechess.exe')
|
||||||
|
|
||||||
if IS_WINDOWS and not os.path.isfile('Qt5Core.dll'):
|
if IS_WINDOWS and not os.path.isfile('Qt5Core.dll'):
|
||||||
getFile('{0}cutechess-qt5core.dll'.format(source), 'Qt5Core.dll')
|
getFile(urljoin(source, 'cutechess-qt5core.dll'), 'Qt5Core.dll')
|
||||||
|
|
||||||
if IS_LINUX and not os.path.isfile('cutechess'):
|
if IS_LINUX and not os.path.isfile('cutechess'):
|
||||||
getFile('{0}cutechess-linux'.format(source), 'cutechess')
|
getFile(urljoin(source, 'cutechess-linux'), 'cutechess')
|
||||||
os.system('chmod 777 cutechess')
|
os.system('chmod 777 cutechess')
|
||||||
|
|
||||||
if IS_LINUX and not os.path.isfile('libcutechess.so.1'):
|
if IS_LINUX and not os.path.isfile('libcutechess.so.1'):
|
||||||
getFile('{0}libcutechess.so.1'.format(source), 'libcutechess.so.1')
|
getFile(urljoin(source, 'libcutechess.so.1'), 'libcutechess.so.1')
|
||||||
|
|
||||||
def getMachineID():
|
def getMachineID():
|
||||||
|
|
||||||
@@ -325,7 +333,7 @@ def reportWrongBenchmark(arguments, data, engine):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Hit the server with information about wrong benchmark
|
# Hit the server with information about wrong benchmark
|
||||||
url = '{0}/wrongBench/'.format(arguments.server)
|
url = urljoin(arguments.server, 'wrongBench')
|
||||||
return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
||||||
|
|
||||||
def reportNodesPerSecond(arguments, data, nps):
|
def reportNodesPerSecond(arguments, data, nps):
|
||||||
@@ -340,7 +348,7 @@ def reportNodesPerSecond(arguments, data, nps):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Hit the server with information about nps
|
# Hit the server with information about nps
|
||||||
url = '{0}/submitNPS/'.format(arguments.server)
|
url = urljoin(arguments.server, 'submitNPS')
|
||||||
return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
||||||
|
|
||||||
def reportResults(arguments, data, wins, losses, draws, crashes, timelosses):
|
def reportResults(arguments, data, wins, losses, draws, crashes, timelosses):
|
||||||
@@ -356,7 +364,7 @@ def reportResults(arguments, data, wins, losses, draws, crashes, timelosses):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Hit the server with the updated test results
|
# Hit the server with the updated test results
|
||||||
url = '{0}/submitResults/'.format(arguments.server)
|
url = urljoin(arguments.server, 'submitResults')
|
||||||
try: return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
try: return requests.post(url, data=data, timeout=HTTP_TIMEOUT).text
|
||||||
except: print('[NOTE] Unable To Reach Server'); return "Unable"
|
except: print('[NOTE] Unable To Reach Server'); return "Unable"
|
||||||
|
|
||||||
@@ -425,7 +433,7 @@ def completeWorkload(workRequestData, arguments):
|
|||||||
|
|
||||||
# Get the next workload
|
# Get the next workload
|
||||||
data = requests.post(
|
data = requests.post(
|
||||||
'{0}/getWorkload/'.format(arguments.server),
|
urljoin(arguments.server, 'getWorkload'),
|
||||||
data=workRequestData, timeout=HTTP_TIMEOUT).content.decode('utf-8')
|
data=workRequestData, timeout=HTTP_TIMEOUT).content.decode('utf-8')
|
||||||
|
|
||||||
# Check for an empty workload
|
# Check for an empty workload
|
||||||
|
|||||||
@@ -64,6 +64,19 @@ FRAMEWORK_DEFAULTS = {
|
|||||||
'smpltc' : { 'threads' : 8, 'hash' : 512, 'timecontrol' : '20.0+0.2' },
|
'smpltc' : { 'threads' : 8, 'hash' : 512, 'timecontrol' : '20.0+0.2' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'Demolito' : {
|
||||||
|
'proto' : 'uci',
|
||||||
|
'nps' : 1375000,
|
||||||
|
'name' : 'Demolito',
|
||||||
|
'source' : 'https://github.com/lucasart/Demolito',
|
||||||
|
'testmodes' : {
|
||||||
|
'stc' : { 'threads' : 1, 'hash' : 8, 'timecontrol' : '10.0+0.1' },
|
||||||
|
'ltc' : { 'threads' : 1, 'hash' : 64, 'timecontrol' : '60.0+0.6' },
|
||||||
|
'smpstc' : { 'threads' : 8, 'hash' : 64, 'timecontrol' : '5.0+0.05' },
|
||||||
|
'smpltc' : { 'threads' : 8, 'hash' : 256, 'timecontrol' : '20.0+0.2' },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
# Book confgiruation. When addding a book, follow the provided template.
|
# Book confgiruation. When addding a book, follow the provided template.
|
||||||
|
|||||||
Reference in new issue
Block a user