create bern_thread_half.cpp