Add Zahak to the config file. Default values mostly.

Assert AVX and POPCNT. Ignore SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, FMA, for now.

Partial progress towards #94
This commit is contained in:
Andrew Grant committed 2021-10-05 13:58:24 -04:00
1 parent c536da0079
commit d52d009c30
1 file changed
+21 -9
+21 -9
View File
@@ -61,6 +61,9 @@ CUSTOM_SETTINGS = {
'Rubichess' : [], 'FabChess' : [],
'Igel' : [], 'Winter' : [],
'Halogen' : [], 'Stash' : [],
'Seer' : [], 'Koivisto' : [],
'Drofa' : [], 'Bit-Genie' : [],
'Berserk' : [], 'Zahak' : [],
};
ERRORS = {
@@ -358,6 +361,22 @@ def server_configure_worker(arguments):
target = url_join(arguments.server, 'clientGetBuildInfo')
data = requests.get(target, timeout=TIMEOUT_HTTP).json()
def get_version(compiler):
# Try to execute the compiler from the command line
# First with `--version`, and again with just `version`
try:
process = Popen([compiler, '--version'], stdout=PIPE, stderr=PIPE)
stdout = process.communicate()[0].decode('utf-8')
return re.search(r'[0-9]+\.[0-9]+\.[0-9]+', stdout).group()
except:
process = Popen([compiler, 'version'], stdout=PIPE, stderr=PIPE)
stdout = process.communicate()[0].decode('utf-8')
return re.search(r'[0-9]+\.[0-9]+\.[0-9]+', stdout).group()
# For each engine, attempt to find a valid compiler
for engine, build_info in data.items():
for compiler in build_info['compilers']:
@@ -367,15 +386,8 @@ def server_configure_worker(arguments):
version = tuple(map(int, version.split('.')))
else: version = (0, 0, 0)
# Try to execute the compiler from the command line
try:
process = Popen([compiler, '--version'], stdout=PIPE)
stdout, stderr = process.communicate()
except OSError: continue
# Parse the version number reported by the compiler
stdout = stdout.decode('utf-8')
match = re.search(r'[0-9]+\.[0-9]+\.[0-9]+', stdout).group()
try: match = get_version(compiler)
except: continue # Unable to execute compiler
# Compiler version was sufficient
if tuple(map(int, match.split('.'))) >= version: