Skip to content

Commit

Permalink
Moving for QDP-JIT integration
Browse files Browse the repository at this point in the history
 - QDP-JIT clover term (clover_term_llvm_w.h) copied from Chroma for unit testing
 - clover_term.h file added to type alias to either QDPCloverTermT or LLVMCloverTermT as needed
 - configure.ac allows --enable-qdpjit to tell the build which clover term to use.
 - propageted new CloverTermT to testClovDslashFull and testClovInvertFromFile
 - tidyup: Moved MesField into QPhiX namespace
  • Loading branch information
Balint Joo committed Jun 21, 2016
1 parent 1ff6a05 commit 583a1c6
Show file tree
Hide file tree
Showing 10 changed files with 1,926 additions and 13 deletions.
31 changes: 31 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ AC_ARG_ENABLE(proc,
[ proc="NONE"]
)

AC_ARG_ENABLE(qdpjit,
AC_HELP_STRING(
[ --enable-qdpjit],
[ Indicate that QDP-JIT is being used ]
),
[ qdpjit=${enable_qdpjit} ],
[ qdpjit="no" ]
)




dnl dnl ******************** DONE WITH USER INPUT *********************
dnl dnl *** Now Configuration ****
dnl dnl ***************************************************************
Expand Down Expand Up @@ -432,7 +444,26 @@ QPX|qpx)
;;
esac

build_qdpjit_clover="no"

case ${qdpjit} in
yes|YES)
AC_MSG_NOTICE([Building with QDPJIT])
AC_DEFINE([QPHIX_BUILD_QDPJIT], [1], [ Build wtth QDPJIT ] )
if test "x${build_clover}x" = "xyesx";
then
build_qdpjit_clover="yes"
fi
;;
*)
AC_MSG_NOTICE([Building regular QDP Clover Term])
;;
esac

AM_CONDITIONAL(QPHIX_BUILD_CLOVER, [ test "x${build_clover}x" = "xyesx" ])
AM_CONDITIONAL(QPHIX_BUILD_QDPJIT_CLOVER, [ test "x${build_qdpjit_clover}x" = "xyesx" ])
AM_CONDITIONAL(QPHIX_BUILD_QDP_CLOVER, [ test "x${build_qdpjit_clover}x" = "xnox" ])

AM_CONDITIONAL(QPHIX_BUILD_QPX, [ test "x${build_qpx}x" = "xyesx"])

dnl dnl produce output
Expand Down
3 changes: 3 additions & 0 deletions include/qphix/qphix_config_internal.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/* Build Clover Term */
#undef QPHIX_BUILD_CLOVER

/* Build wtth QDPJIT */
#undef QPHIX_BUILD_QDPJIT

/* Do the actual comms */
#undef QPHIX_DO_COMMS

Expand Down
13 changes: 11 additions & 2 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,22 @@ time_dslash_noqdp_DEPENDENCIES=build_lib
t_minvcg_DEPENDENCIES=build_lib

if QPHIX_BUILD_CLOVER

if QPHIX_BUILD_QDPJIT_CLOVER
CLOVER_SRCS=clover_term_llvm_w.h
endif

if QPHIX_BUILD_QDP_CLOVER
CLOVER_SRCS=clover_term_qdp_w.h
endif

t_clov_dslash_SOURCES = $(FRAMEWORK_SRCS) \
testClovDslashFull.h \
testClovDslashFull.cc \
t_clov_dslash.cc \
mesfield.h \
mesfield.cc \
clover_term_qdp_w.h \
$(CLOVER_SRCS) \
clover_fermact_params_w.h

t_clov_invert_from_file_SOURCES = $(FRAMEWORK_SRCS) \
Expand All @@ -64,7 +73,7 @@ t_clov_invert_from_file_SOURCES = $(FRAMEWORK_SRCS) \
t_clov_invert_from_file.cc \
mesfield.h \
mesfield.cc \
clover_term_qdp_w.h \
$(CLOVER_SRCS) \
clover_fermact_params_w.h

time_clov_noqdp_SOURCES= \
Expand Down
31 changes: 31 additions & 0 deletions tests/clover_term.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef __qphix__test_clover_term_h__
#define __qphix__test_clover_term_h__

#include "qphix/qphix_config.h"

#ifdef QPHIX_BUILD_CLOVER
#ifdef QPHIX_BUILD_QDPJIT
#warning using LLVM Clover Term
namespace QPhix
{

#include "./clover_term_llvm_w.h"
template<typename Phi, typename U>
using CloverTermT = LLVMCloverTermT<Phi,U>;
};
#else
// Using regular cloverTerm
#warning using QDP Clover Term

#include "./clover_term_qdp_w.h"

namespace QPhiX
{
template<typename Phi,typename U>
using CloverTermT = QDPCloverTermT<Phi,U>;
};

#endif // if else defined QDP-JIT
#endif // if else defined BUILD-CLOVER

#endif
Loading

0 comments on commit 583a1c6

Please sign in to comment.