Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
grokqcd committed Sep 18, 2019
2 parents 2f8a9dd + 7a0398a commit 92c28e6
Show file tree
Hide file tree
Showing 79 changed files with 1,479 additions and 391 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
*/Makefile.in
Makefile.in
aclocal.m4
configure
*/Makefile.in
autom4te.cache
config/
configure
docs/*.aux
docs/*.log
docs/*.pdf
docs/ref/html
docs/ref/qdptags
docs/ref/warnings
docs/usr/html
docs/usr/warnings
include/qdp_config_internal.h.in
include/qdp_config_internal.h.in~
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "other_libs/libintrin"]
path = other_libs/libintrin
url = git@github.com:usqcd-software/libintrin.git
url = ../libintrin.git
[submodule "other_libs/xpath_reader"]
path = other_libs/xpath_reader
url = git@github.com:usqcd-software/xpath_reader.git
url = ../xpath_reader.git
[submodule "other_libs/qio"]
path = other_libs/qio
url = git@github.com:usqcd-software/qio.git
url = ../qio.git
[submodule "other_libs/filedb"]
path = other_libs/filedb
url = git@github.com:usqcd-software/filedb.git
url = ../filedb.git
87 changes: 87 additions & 0 deletions FindQDPXX.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
set( QDPXX_INSTALL_DIR "@prefix@" )
set( QDPXX_PARALLEL_ARCH "@CONFIG_PARALLEL_ARCH@" )
set( QDPXX_INCLUDE_DIR "@prefix@/include" )
set( QDPXX_LIBDIR "@prefix@/lib")

# Get the Include directories out of the CFLAGS Line if they start with -I
string(STRIP "@HDF5_CXXFLAGS@ @LIBXML2_CXXFLAGS@ @QMP_CFLAGS@ @QMT_CXXFLAGS@" BASE_EXTRA_CXXFLAGS)

# Match all strings which start with -I and keep matching anything until we reach another '-'
# [^-] means match everything other than - and the + means do this one or more times.
#
string(REGEX MATCHALL "\\-\\I[^-]+" BASE_EXTRA_INCLUDES ${BASE_EXTRA_CXXFLAGS})

# Replace "-I" (ie \-\I ) with nothing
string(REGEX REPLACE "\\-\\I" "" EXTRA_INCLUDE_DIRS ${BASE_EXTRA_INCLUDES})
separate_arguments(${EXTRA_INCLUDE_DIRS})

# Find the library we built and add it as an imported target
# with appropriate include dir and location
function(add_qdpxx_lib LIBNAME)
message(STATUS "Libname: ${LIBNAME}")

# This will find the file, whether a .so or a .a appropriately
find_library(LIB_${LIBNAME} NAMES ${LIBNAME} PATHS "${QDPXX_LIBDIR}")

# Set up the library as an imported target
add_library(${LIBNAME} UNKNOWN IMPORTED )

# Explain where it is
set_target_properties(${LIBNAME} PROPERTIES IMPORTED_LOCATION ${LIB_${LIBNAME}})
# Set the include dir
set_target_properties(${LIBNAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${QDPXX_INCLUDE_DIR}")
endfunction()

# Toplevel QDP++ library
add_qdpxx_lib(qdp)
# Add on Extra includes
foreach( INCDIR ${EXTRA_INCLUDE_DIRS})
message(STATUS "Adding ${INCDIR}")
set_target_properties(qdp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INCDIR})
endforeach()



# XML Reader and writer
add_qdpxx_lib(XPathReader)
add_qdpxx_lib(xmlWriter)
target_link_libraries(qdp INTERFACE XPathReader xmlWriter)

# QIO and LIME
add_qdpxx_lib(lime)
add_qdpxx_lib(qio)
target_link_libraries(qio INTERFACE lime)
target_link_libraries(qdp INTERFACE qio)

# Check if using LibIntrin
string(STRIP "@LIBINTRIN_DIR@" QDPXX_LIBINTRIN)
if( QDPXX_LIBINTRIN )
add_qdpxx_lib(intrin)
target_link_libraries(qdp INTERFACE intrin)
endif()

# Check if using FILEDB
string(STRIP "@FILEDB_DIR" QDPXX_FILEDB)
if( QDPXX_FILEDB )
add_qdpxx_lib(filehash)
add_qdpxx_lib(filedb)
target_link_libraries(filedb INTERFACE filehash)
target_link_libraries(qdp INTERFACE filedb)
endif()

# Add other LFlags and libs which we didn't build
string(STRIP "@LDFLAGS@ @HDF5_LDFLAGS@ @QMP_LDFLAGS@ @QMT_LDFLAGS@" QDPXX_LDFLAGS)
string(STRIP "@HDF5_LIBS@ @LIBXML2_LIBS@ @QMP_LIBS@ @LIBS@ @QMT_LIBS@" QDPXX_LIBS)

if( QDPXX_LDFLAGS )
separate_argumnets(${QDPXX_LDFLAGS})
target_link_options(qdp INTERFACE ${QDPXX_LDFLAGS})
endif()

if( QDPXX_LIBS )
separate_arguments(${QDPXX_LIBS})
target_link_libraries(qdp INTERFACE ${QDPXX_LIBS})
endif()

set( QDPXX_FOUND TRUE)

4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================

Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
Expand Down
55 changes: 55 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Jefferson Science Associates LLC Copyright Notice:

Copyright � 2014 Jefferson Science Associates LLC All Rights Reserved.


Redistribution and use in source and binary forms, with or without modification, are permitted as a licensed user provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

This material resulted from work developed under a United States Government
Contract. The Government retains a paid-up, nonexclusive, irrevocable worldwide license in such copyrighted data to reproduce, distribute copies to the public, prepare derivative works, perform publicly and display publicly and to permit others to do so.
THIS SOFTWARE IS PROVIDED BY JEFFERSON SCIENCE ASSOCIATES LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEFFRSON SCIENCE ASSOCIATES, LLC OR THE U.S. GOVERNMENT BE LIABLE TO LICENSEE OR ANY THIRD PARTES FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


COPYRIGHT AND LICENSE

Copyright (c) 1995,1996 Southeastern Universities Research Association
Continuous Electron Beam Accelerator Facility
Thomas Jefferson National Accelerator Facility
12000 Jefferson Avenue, Newport News, VA 23606

This material resulted from work developed under a United States Government
Contract and is subject to the following license:

The Government retains a paid-up, nonexclusive, irrevocable worldwide license
to reproduce, prepare derivative works, perform publicly and display publicly
by or for the Government including the right to distribute to other Government
contractors.


DISCLAIMER AND LIMITATION OF WARRANTY.

ALL SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY. THERE
ARE NO WARRANTIES EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. THERE IS NO WARRANTY THAT USE WILL NOT INFRINGE
ANY PATENT, COPYRIGHT OR TRADEMARK.

In consideration of the use of the software and other materials, user agrees
that neither the Government nor SURA/TJNAF will be liable for any damages with
respect to such use, and user shall hold both the Government and SURA/TJNAF
harmless from and indemnify them against any and all liability for damages
arising out of the use of such software and other materials. In no event shall
the Government or SURA/TJNAF be liable whether arising under contract, tort,
strict liability or otherwise for any incidental, indirect or consequential
loss or damage of any nature arising at any time from any cause whatsoever. In
addition, the Government and SURA/TJNAF assume no obligation for defending
against third party claims or threats of claims arising as a result of user's
use of the software or materials either as delivered to user or as modified by
user.

4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ SUBDIRS = lib examples include other_libs tests
#
bin_SCRIPTS=qdp++-config

dist_data_DATA = FindQDPXX.cmake
#
# Some things that we want in the distribution tarball
#
EXTRA_DIST = PETE/QDPClasses.in PETE/QDPOps.in PETE/Tools docs install_scripts
EXTRA_DIST = PETE/QDPClasses.in PETE/QDPOps.in PETE/Tools docs install_scripts FindQDPXX.cmake.in

8 changes: 8 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
05/10/2017 -- Balint Joo
Updated Memory allocators -- These are allocated using Singleton CreateStatic,
and not destroyed (NoDestroy policy) -- Chroma staggered regressions now pass.
Some Chroma regression tests currently fail with ICC-17 update 2 (parallel studio 2017.2.050)
Tests passed with icc-16 update 3 and gcc versions 5.3.0 and 6.2.0 - so treating this as a compiler bug for now.
BEWARE !!!!!


02/06/2015 -- Balint Joo
Updated submodules, pulled in HDF5 fixes (Thorsten Kurth)
Added Blue Gene Thread binding (orig. developed in QPhiX by Diptorup Deb)
Expand Down
10 changes: 10 additions & 0 deletions PETE/QDPOps.in
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,16 @@ binaryOps
@return (real(trace(adj(l)*r))
@ingroup group1
@relates QDPType */"
-----
TAG = "FnLocalColorInnerProduct"
FUNCTION = "localColorInnerProduct"
EXPR = "return (localColorInnerProduct(a,b));"
COMMENTA = "//! InnerProduct on only color fiber indices"
COMMENTB = "/*! L2 norm only color fiber indices
@sa adj(), trace()
@return (traceColor(adj(l)*r)
@ingroup group1
@relates QDPType */"
-----
TAG = "FnQuarkContract13"
FUNCTION = "quarkContract13"
Expand Down
4 changes: 2 additions & 2 deletions config/missing
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.

scriptversion=2013-10-28.13; # UTC
scriptversion=2012-06-26.16; # UTC

# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
Expand Down Expand Up @@ -160,7 +160,7 @@ give_advice ()
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
echo "the 'automa4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
Expand Down
32 changes: 32 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,26 @@ AC_ARG_ENABLE(bgq-thread-binding,
[ ac_bgq_bind_enabled="no"]
)

AC_ARG_ENABLE(tbb-pool-allocator,
AC_HELP_STRING([--enable-tbb-pool-allocator],
[ Enable Threaded Building Blocks Fixed Pool Allocator]),
[ ac_enable_tbbpool=${enableval} ],
[ ac_enable_tbbpool="no" ]
)

AC_ARG_ENABLE(extramessages,
AC_HELP_STRING(
[--enable-extra-messages],
[Emit extra messages during the compilation that indicate which preprocessor branches are used]
),
[ extra_messages_enabled="yes" ],
[ extra_messages_enabled="no" ]
)

if test "${extra_messages_enabled}" = "yes"; then
AC_MSG_NOTICE([Will emit pragma message ])
AC_DEFINE(QPHIX_EMIT_MESSAGES, [1], [ Emit compilation messages ])
fi

if test "X${ac_bgq_bind_enabled}X" = "XyesX";
then
Expand Down Expand Up @@ -674,6 +694,14 @@ then
AC_DEFINE([QDP_USE_OMP_THREADS], [1], [ Use OpenMP Threads ])
fi

dnl Threaded Building Blocks Pool Allocator
if test "X${ac_enable_tbbpool}X" == "XyesX";
then
AC_MSG_NOTICE([Configuring to use TBB Fixed Pool. Please ensure CXXFLAGS and LDFLAGS are correctly set])
AC_DEFINE([QDP_USE_TBBPOOL_ALLOCATOR],[1], [ Use TBB Fixed Pool Allocator ])
fi


dnl
dnl
dnl Now have all the options... Do some configuration
Expand Down Expand Up @@ -703,6 +731,9 @@ AM_CONDITIONAL(BUILD_WILSON_EXAMPLES,
AM_CONDITIONAL(BUILD_DEFAULT_ALLOCATOR,
[test "X0X" = "X0X"])

AM_CONDITIONAL(BUILD_QDPXX_TBB_ALLOCATOR,
[ test "X${ac_enable_tbbpool}X" == "XyesX" ])

#
# Conditional for use qmt
#
Expand Down Expand Up @@ -786,6 +817,7 @@ fi
#
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(qdp++-config)
AC_CONFIG_FILES(FindQDPXX.cmake)
AC_CONFIG_FILES(lib/Makefile)
AC_CONFIG_FILES(other_libs/Makefile)
AC_CONFIG_FILES(include/Makefile)
Expand Down
35 changes: 32 additions & 3 deletions examples/t_basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ int main(int argc, char *argv[])
LatticeFermion lftmp1;
LatticeFermion lftmp2;
LatticeFermion lftmp3;
LatticeColorVectorSpinMatrix lcvsp1;
LatticeColorVectorSpinMatrix lcvsp2;
LatticeReal R1;
LatticeReal Rtmp;
LatticeComplex c;
Expand Down Expand Up @@ -147,7 +149,7 @@ int main(int argc, char *argv[])
pop(xml_out);


#if 0
#if 1

mu = 0;
nu = 1;
Expand Down Expand Up @@ -181,7 +183,7 @@ int main(int argc, char *argv[])
pop(xml_out);

/* test 5 */
rtmp = real(trace(lctmp1 * u));
LatticeReal rtmp = real(trace(lctmp1 * u));
push(xml_out,"TRACE_MULTIPLY_MATRIX_realpart");
write(xml_out, "rtmp", rtmp);
pop(xml_out);
Expand Down Expand Up @@ -391,7 +393,7 @@ int main(int argc, char *argv[])

/* test 27 */
gaussian(lqtmp1);
r = real(trace(adj(q) * lqtmp1));
LatticeReal r = real(trace(adj(q) * lqtmp1));
push(xml_out,"TRACE_MULT_PROP");
write(xml_out, "r", r);
pop(xml_out);
Expand All @@ -406,6 +408,33 @@ int main(int argc, char *argv[])
write(xml_out, "lqtmp24", quarkContract24(lqtmp1, lqtmp2));
pop(xml_out);

#if 1
/* test 29 */
gaussian(lcvsp1);
gaussian(lcvsp2);
//LatticeSpinMatrix spm = localColorInnerProduct(lcvsp1, lcvsp2);
auto spm = localColorInnerProduct(lcvsp1, lcvsp2);
push(xml_out,"LOCAL_COLOR_INNER_PRODUCT");
write(xml_out, "spm", spm);
pop(xml_out);

/* test 30 */
gaussian(lcvsp1);
gaussian(lcvsp2);
multi1d<SpinMatrixD> fred1 = sumMulti(spm, QDP::rb);
push(xml_out,"SUMMULTI_LOCAL_COLOR_INNER_PRODUCT1");
write(xml_out, "fred1", fred1);
pop(xml_out);

/* test 31 */
gaussian(lcvsp1);
gaussian(lcvsp2);
multi1d<SpinMatrixD> fred2 = sumMulti(localColorInnerProduct(lcvsp1, lcvsp2), QDP::rb);
push(xml_out,"SUMMULTI_LOCAL_COLOR_INNER_PRODUCT2");
write(xml_out, "fred2", fred2);
pop(xml_out);
#endif

#endif


Expand Down
Loading

0 comments on commit 92c28e6

Please sign in to comment.