According to Ceres installation documentation: ... one needs to be careful to turn off the threading inside OpenBLAS as it conflicts with use of threads in Ceres. math/openblas exposes single-threaded (USE_THREAD=0) version as -lopenblas while multi-threaded (NUM_THREADS=8) version as -lopenblasp (p suffix).