set up threads build_statmap and host