num_thread percore pointer needs to be initialized in func simulation