Skip to content
Snippets Groups Projects
Commit 1f53867e authored by Kurt A. O'Hearn's avatar Kurt A. O'Hearn
Browse files

sPuReMD: add checks for GNU scientific library (GSL) for use during energy minimization.

parent de86239e
No related branches found
No related tags found
No related merge requests found
......@@ -75,13 +75,13 @@ sPuReMD_lib_libspuremd_la_SOURCES = sPuReMD/src/allocate.c \
sPuReMD_lib_libspuremd_la_CFLAGS = @DFT_CFLAGS@ @CFLAGS_EXTRA@ @OMP_CFLAGS@
sPuReMD_lib_libspuremd_la_CPPFLAGS = -I sPuReMD/src @CPPFLAGS_EXTRA@
sPuReMD_lib_libspuremd_la_LDFLAGS = -version-info 1:0:0
sPuReMD_lib_libspuremd_la_LIBADD = @OMP_LIBS@ @L_LIBS@ @T_LIBS@
sPuReMD_lib_libspuremd_la_LIBADD = @OMP_LIBS@ @L_LIBS@ @T_LIBS@ @G_LIBS@
bin_PROGRAMS = sPuReMD/bin/spuremd
sPuReMD_bin_spuremd_SOURCES = sPuReMD/src/driver.c
sPuReMD_bin_spuremd_CFLAGS = @DFT_CFLAGS@ @CFLAGS_EXTRA@ @OMP_CFLAGS@
sPuReMD_bin_spuremd_CPPFLAGS = -I sPuReMD/src @CPPFLAGS_EXTRA@
sPuReMD_bin_spuremd_LDADD = sPuReMD/lib/libspuremd.la @OMP_LIBS@ @L_LIBS@ @T_LIBS@
sPuReMD_bin_spuremd_LDADD = sPuReMD/lib/libspuremd.la @OMP_LIBS@ @L_LIBS@ @T_LIBS@ @G_LIBS@
check_PROGRAMS =
TESTS =
......
......@@ -290,6 +290,35 @@ if test "x${pack_serial_enabled}" = "xyes" || test "x${pack_openmp_enabled}" = "
fi
AC_SUBST([T_LIBS], ["${TENSORFLOW_LIBS}"])
# Check for GNU Scientific Library (for energy minimization)
GSL_LIBS=
AC_CHECK_HEADERS([gsl/gsl_sf_bessel.h], [GSL_FOUND_HEADERS="yes"])
if test "x${GSL_FOUND_HEADERS}" = "xyes"; then
# BUG: AC_SEARCH_LIBS fails to reset LIBS when nested in conditional statements, so do it manually
save_LIBS="${LIBS}"
AC_SEARCH_LIBS([gsl_sf_bessel_J0], [gsl],
[GSL_FOUND_LIBS="yes"], [GSL_FOUND_LIBS="no"],
[-lgslcblas -m])
LIBS="${save_LIBS}"
AS_IF([test "x${GSL_FOUND_LIBS}" != "xyes"],
[AC_MSG_WARN([
----------------------------------------------------
Unable to find GNU scientific library (GSL) on this system.
Disabling support for dependent methods.
----------------------------------------------------])])
if test "x${GSL_FOUND_HEADERS}" = "xyes" && test "x${GSL_FOUND_LIBS}" = "xyes"; then
GSL_LIBS="-lgsl -lgslcblas -m"
fi
AC_DEFINE([HAVE_GSL], [1], [Define to 1 if you have GNU scientific library (GSL) support enabled.])
else
AC_MSG_WARN([
--------------------------------------------------
Unable to find GNU scientific library (GSL) headers on this system.
Disabling support for dependent methods.
--------------------------------------------------])
fi
AC_SUBST([G_LIBS], ["${GSL_LIBS}"])
AC_LANG_POP([C])
fi
AM_CONDITIONAL([BUILD_S_OMP], [test "x${pack_serial_enabled}" = "xyes" || test "x${pack_openmp_enabled}" = "xyes"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment