Georgetown-IR-Lab / OpenNIR

An end-to-end neural ad-hoc ranking pipeline.
https://opennir.net
MIT License
148 stars 25 forks source link

problems when running with single processor #19

Open seanmacavaney opened 4 years ago

seanmacavaney commented 4 years ago

From #18 -- it seems there are several issues when running the pipeline when only a single processor is available.

First, safe_thread_count returns 0, which causes problems downstream. https://github.com/Georgetown-IR-Lab/OpenNIR/blob/master/onir/util/concurrency.py#L11

Then, places that use util.blocking_tee and util.CtxtThread may have some race conditions.

Ideally, a solution that falls back when only one processor is detected. If not, a configuration switch somewhere could help.