Add threading support to the solving mechanism (with openMP)