alex-retrieval/graph/collect.py

22 lines
1.2 KiB
Python
Raw Permalink Normal View History

2019-12-06 10:42:21 +00:00
import subprocess
def simple_collect():
2019-12-06 10:42:21 +00:00
for num_servers in [2]:
for block_size in [1]:
for database_size in [2, 4, 8, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384, 32_768, 65_536, 131_072, 262_144, 524_288, 1_048_576, 2_097_152, 4_194_304, 8_388_608]:
subprocess.run(["java", "dk.au.pir.Driver", "-Xmx250G", str(num_servers), str(database_size), str(block_size)])
def smarter_but_still_not_very_smart_collect():
combinations = set()
for block_size in [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384, 32_768, 65_536, 131_072, 262_144, 524_288, 1_048_576]:
for database_size in [2, 4, 8, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384, 32_768, 65_536, 131_072, 262_144, 524_288, 1_048_576, 2_097_152, 4_194_304, 8_388_608, 16_777_216, 33_554_432, 67_108_864, 134_217_728, 268_435_456, 536_870_912]:
combinations.add((block_size, database_size))
for block_size, database_size in sorted(combinations, key=lambda c: c[0] * c[1]):
subprocess.run(["java", "dk.au.pir.Driver", "-Xmx250G", "2", str(database_size), str(block_size)])
2019-12-06 10:42:21 +00:00
if __name__ == '__main__':
smarter_but_still_not_very_smart_collect()