if (NOT compile_threaded)
  string(APPEND FFLAGS " -heap-arrays")
endif()
if (MPILIB STREQUAL mpich)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mpich2)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mpt)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL openmpi)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mvapich)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL impi)
  string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mpi-serial)
  string(APPEND SLIBS " -mkl")
endif()
