Skip to content

Commit

Permalink
Dedup single file will abort early if merge fails (fixes google-resea…
Browse files Browse the repository at this point in the history
  • Loading branch information
carlini committed Apr 15, 2022
1 parent d584d0c commit 3c209d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/make_suffix_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@

torun = " --suffix-path ".join(files)
print("./target/debug/dedup_dataset merge --output-file %s --suffix-path %s --num-threads %d"%("tmp/out.table.bin", torun, mp.cpu_count()))
os.popen("./target/debug/dedup_dataset merge --output-file %s --suffix-path %s --num-threads %d"%("tmp/out.table.bin", torun, mp.cpu_count())).read()
pipe = os.popen("./target/debug/dedup_dataset merge --output-file %s --suffix-path %s --num-threads %d"%("tmp/out.table.bin", torun, mp.cpu_count()))
output = pipe.read()
if pipe.close() is not None:
print("Something went wrong with merging.")
print("Please check that you ran with ulimit -Sn 100000")
exit(1)
#exit(0)
print("Now merging individual tables")
os.popen("cat tmp/out.table.bin.* > tmp/out.table.bin").read()
Expand Down

0 comments on commit 3c209d0

Please sign in to comment.