string(APPEND CFLAGS " -xCORE-AVX2")
string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
  string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND CPPDEFS " -DARCH_MIC_KNL")
string(APPEND FFLAGS " -fp-model consistent -fimf-use-svml")
if (NOT DEBUG)
  string(APPEND FFLAGS " -qno-opt-dynamic-align")
endif()
string(APPEND FFLAGS " -xCORE-AVX2")
set(HDF5_PATH "$ENV{TACC_HDF5_DIR}")
set(MPI_LIB_NAME "impi")
if (MPILIB STREQUAL impi)
  set(NETCDF_PATH "$ENV{TACC_NETCDF_DIR}")
endif()
if (MPILIB STREQUAL mpi-serial)
  set(NETCDF_PATH "$ENV{TACC_NETCDF_DIR}")
endif()
set(PETSC_PATH "$ENV{PETSC_DIR}")
if (MPILIB STREQUAL impi)
  set(PNETCDF_PATH "$ENV{TACC_PNETCDF_DIR}")
  string(APPEND SLIBS " -L${NETCDF_PATH} -lnetcdff -Wl,--as-needed,-L${NETCDF_PATH}/lib -lnetcdff -lnetcdf")
endif()
if (MPILIB STREQUAL mpi-serial)
  string(APPEND SLIBS " -L${NETCDF_PATH} -lnetcdff -Wl,--as-needed,-L${NETCDF_PATH}/lib -lnetcdff -lnetcdf")
endif()
string(APPEND SLIBS " -mkl -lpthread")
