Make the Client use multiprocessed 'make' commands for engines that support it (#86)

This commit is contained in:
mhouppin authored and GitHub committed 2021-02-06 15:24:28 -05:00
1 parent a52e91b0f9
commit 00afb8abe2
1 file changed
+5 -2
+5 -2
View File
@@ -211,7 +211,7 @@ def getMachineID():
print('[NOTE] Machine Is Unregistered')
return 'None'
def getEngine(data, engine, network):
def getEngine(arguments, data, engine, network):
print('Engine {0}'.format(data['test']['engine']))
print('Branch {0}'.format(engine['name']))
@@ -241,6 +241,9 @@ def getEngine(data, engine, network):
if data['test']['engine'] in CUSTOM_SETTINGS:
command.extend(CUSTOM_SETTINGS[data['test']['engine']]['args'])
# Allow for multiprocessed build up to the number of requested threads
command.append('-j' + arguments.threads)
# Build the engine. If something goes wrong with the
# compilation process, we will figure this out later on
subprocess.Popen(command, cwd=pathway).wait(); print("")
@@ -494,7 +497,7 @@ def verifyEngine(arguments, data, engine, network):
# Download the engine if we do not already have it
name = savedEngineName(engine['sha'], network)
pathway = addExtension(pathjoin('Engines', name).rstrip('/'))
if not os.path.isfile(pathway): getEngine(data, engine, network)
if not os.path.isfile(pathway): getEngine(arguments, data, engine, network)
# Run a group of benchmarks in parallel in order to better scale NPS
# values for this worker. We obtain a bench and average NPS value