If you use intel mkl library: export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH export MKL_THREADING_LAYER=sequential