fix: initialize sem_cores correctly

(cherry picked from commit fc412a66edca885f4769640fcfb4639995b20785)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>