Commit 17f9aa96 authored by Adam Mercer's avatar Adam Mercer
Browse files

enable CUDA support for LALInspiral

Original: 78d9698381aa4802c236f21dfe3c7121eaff13cd
parent 0a09d639
...@@ -68,6 +68,9 @@ AC_DEFINE_UNQUOTED([LALINSPIRAL_CONFIGURE_ARGS],["$ac_configure_args"], ...@@ -68,6 +68,9 @@ AC_DEFINE_UNQUOTED([LALINSPIRAL_CONFIGURE_ARGS],["$ac_configure_args"],
AC_DEFINE_UNQUOTED([LALINSPIRAL_CONFIGURE_DATE],["$lalinspiral_configure_date"], AC_DEFINE_UNQUOTED([LALINSPIRAL_CONFIGURE_DATE],["$lalinspiral_configure_date"],
[LALInspiral Configure Date]) [LALInspiral Configure Date])
# enable CUDA support
LALSUITE_WITH_CUDA
# enable strict gcc flags # enable strict gcc flags
LALSUITE_ENABLE_GCC_FLAGS LALSUITE_ENABLE_GCC_FLAGS
...@@ -81,6 +84,9 @@ LALSUITE_MULTILIB_LIBTOOL_HACK ...@@ -81,6 +84,9 @@ LALSUITE_MULTILIB_LIBTOOL_HACK
m4_pattern_allow([AC_PROG_CC_C99]) m4_pattern_allow([AC_PROG_CC_C99])
m4_ifdef([AC_PROG_CC_C99],[AC_PROG_CC_C99],[LALSUITE_AC_PROG_CC_C99]) m4_ifdef([AC_PROG_CC_C99],[AC_PROG_CC_C99],[LALSUITE_AC_PROG_CC_C99])
# CUDA requires a c++ compiler
AC_PROG_CXX
# use silent build rules if available # use silent build rules if available
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
...@@ -133,7 +139,12 @@ LALSUITE_CHECK_OPT_LIB([LALFrame],[1.0.3],[LALFrOpen],[lal/LALFrameL.h]) ...@@ -133,7 +139,12 @@ LALSUITE_CHECK_OPT_LIB([LALFrame],[1.0.3],[LALFrOpen],[lal/LALFrameL.h])
# add gcc specific flags # add gcc specific flags
if test "$GCC" = yes; then if test "$GCC" = yes; then
CFLAGS="$CFLAGS $lal_gcc_flags" # don't use gcc flags when cuda is enabled
if test "${cuda}" != "true"; then
CFLAGS="$CFLAGS $lal_gcc_flags"
else
AC_MSG_NOTICE([CUDA support is enabled, disabling GCC flags])
fi
# add mac os x specific flags # add mac os x specific flags
if test "x$MACOSX_VERSION" != "x"; then if test "x$MACOSX_VERSION" != "x"; then
...@@ -141,6 +152,11 @@ if test "$GCC" = yes; then ...@@ -141,6 +152,11 @@ if test "$GCC" = yes; then
fi fi
fi fi
# define if CUDA is enabled
if test "${cuda}" = "true"; then
AC_DEFINE([LALINSPIRAL_CUDA_ENABLED],[1],[Define if using cuda library])
fi
# output # output
LAL_HEADER_LINK=${ac_aux_dir}/header-link.mk LAL_HEADER_LINK=${ac_aux_dir}/header-link.mk
AC_SUBST_FILE([LAL_HEADER_LINK]) AC_SUBST_FILE([LAL_HEADER_LINK])
...@@ -157,4 +173,6 @@ echo " ...@@ -157,4 +173,6 @@ echo "
Now run 'make' to build LALInspiral Now run 'make' to build LALInspiral
and run 'make install' to install LALInspiral and run 'make install' to install LALInspiral
CUDA support is $CUDA_ENABLE_VAL
=================================================================" ================================================================="
EXTRA_DIST = \ EXTRA_DIST = \
config.guess \ config.guess \
config.sub \ config.sub \
cuda.common \
depcomp \ depcomp \
header-link.mk \ header-link.mk \
install-sh \ install-sh \
......
../../gnuscripts/cuda.common
\ No newline at end of file
...@@ -27,4 +27,7 @@ ...@@ -27,4 +27,7 @@
/* Define to 1 if you have the LALFrame library */ /* Define to 1 if you have the LALFrame library */
#undef HAVE_LIBLALFRAME #undef HAVE_LIBLALFRAME
/* Define if using CUDA library */
#undef LALINSPIRAL_CUDA_ENABLED
#endif /* _LALINSPIRALCONFIG_H */ #endif /* _LALINSPIRALCONFIG_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment