diff --git a/benchmarks/Benchmark_dwf_ntpf b/benchmarks/Benchmark_dwf_ntpf new file mode 100755 index 00000000..ab9999c9 Binary files /dev/null and b/benchmarks/Benchmark_dwf_ntpf differ diff --git a/benchmarks/Benchmark_zmm b/benchmarks/Benchmark_zmm new file mode 100755 index 00000000..c7eebe18 Binary files /dev/null and b/benchmarks/Benchmark_zmm differ diff --git a/configure b/configure index 1ab3998e..7b484b67 100755 --- a/configure +++ b/configure @@ -721,6 +721,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -802,6 +803,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1054,6 +1056,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1191,7 +1202,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1344,6 +1355,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2569,7 +2581,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2741,8 +2753,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2761,7 +2773,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3089,8 +3101,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -3149,6 +3161,7 @@ END fi + ac_config_headers="$ac_config_headers lib/Config.h" # Check whether --enable-silent-rules was given. diff --git a/lib/.dirstamp b/lib/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/Init.cc b/lib/Init.cc index 1d3fe642..1757e519 100644 --- a/lib/Init.cc +++ b/lib/Init.cc @@ -237,24 +237,33 @@ void Grid_init(int *argc,char ***argv) std::cout< #include namespace Grid { - -GridStopWatch Logger::StopWatch; -std::ostream Logger::devnull(0); -std::string Logger::BLACK("\033[30m"); -std::string Logger::RED("\033[31m"); -std::string Logger::GREEN("\033[32m"); -std::string Logger::YELLOW("\033[33m"); -std::string Logger::BLUE("\033[34m"); -std::string Logger::PURPLE("\033[35m"); -std::string Logger::CYAN("\033[36m"); -std::string Logger::WHITE("\033[37m"); -std::string Logger::NORMAL("\033[0;39m"); - - GridLogger GridLogError (1,"Error",Logger::RED); - GridLogger GridLogWarning (1,"Warning",Logger::YELLOW); - GridLogger GridLogMessage (1,"Message",Logger::BLACK); - GridLogger GridLogDebug (1,"Debug",Logger::PURPLE); - GridLogger GridLogPerformance(1,"Performance",Logger::GREEN); - GridLogger GridLogIterative (1,"Iterative",Logger::BLUE); - GridLogger GridLogIntegrator (1,"Integrator",Logger::BLUE); + + GridStopWatch Logger::StopWatch; + std::ostream Logger::devnull(0); + + Colours GridLogColours (0); + GridLogger GridLogError (1,"Error",GridLogColours, "RED"); + GridLogger GridLogWarning (1,"Warning",GridLogColours, "YELLOW"); + GridLogger GridLogMessage (1,"Message",GridLogColours, "NORMAL"); + GridLogger GridLogDebug (1,"Debug",GridLogColours, "PURPLE"); + GridLogger GridLogPerformance(1,"Performance",GridLogColours, "GREEN"); + GridLogger GridLogIterative (1,"Iterative",GridLogColours, "BLUE"); + GridLogger GridLogIntegrator (1,"Integrator",GridLogColours, "BLUE"); void GridLogConfigure(std::vector &logstreams) { @@ -61,6 +53,7 @@ void GridLogConfigure(std::vector &logstreams) GridLogDebug.Active(0); GridLogPerformance.Active(0); GridLogIntegrator.Active(0); + GridLogColours.Active(0); for(int i=0;i &logstreams) if ( logstreams[i]== std::string("Debug") ) GridLogDebug.Active(1); if ( logstreams[i]== std::string("Performance") ) GridLogPerformance.Active(1); if ( logstreams[i]== std::string("Integrator" ) ) GridLogIntegrator.Active(1); + if ( logstreams[i]== std::string("Colours" ) ) GridLogColours.Active(1); + } } diff --git a/lib/Log.h b/lib/Log.h index 9119cc4f..9f721d33 100644 --- a/lib/Log.h +++ b/lib/Log.h @@ -27,45 +27,94 @@ Author: Peter Boyle See the full license in the file "LICENSE" in the top level distribution directory *************************************************************************************/ /* END LEGAL */ + +#include + #ifndef GRID_LOG_H #define GRID_LOG_H namespace Grid { - -// Dress the output; use std::chrono for time stamping via the StopWatch class + + // Dress the output; use std::chrono for time stamping via the StopWatch class -class Logger { -protected: + class Colours{ + protected: + bool is_active; + public: + std::map colour; + + + Colours(bool activate=false){ + Active(activate); + }; + + + void Active(bool activate){ + is_active=activate; + + if (is_active){ + colour["BLACK"] ="\033[30m"; + colour["RED"] ="\033[31m"; + colour["GREEN"] ="\033[32m"; + colour["YELLOW"] ="\033[33m"; + colour["BLUE"] ="\033[34m"; + colour["PURPLE"] ="\033[35m"; + colour["CYAN"] ="\033[36m"; + colour["WHITE"] ="\033[37m"; + colour["NORMAL"] ="\033[0;39m"; + } else { + std::cout << "Switching off colours\n"; + colour["BLACK"] =""; + colour["RED"] =""; + colour["GREEN"] =""; + colour["YELLOW"]=""; + colour["BLUE"] =""; + colour["PURPLE"]=""; + colour["CYAN"] =""; + colour["WHITE"] =""; + colour["NORMAL"]=""; + } + + + }; + + }; + + + class Logger { + protected: + Colours &Painter; int active; - std::string name, topName, COLOUR; -public: + std::string name, topName; + std::string COLOUR; + + public: static GridStopWatch StopWatch; static std::ostream devnull; - - static std::string BLACK; - static std::string RED ; - static std::string GREEN; - static std::string YELLOW; - static std::string BLUE ; - static std::string PURPLE; - static std::string CYAN ; - static std::string WHITE ; - static std::string NORMAL; - Logger(std::string topNm, int on, std::string nm,std::string col) - : active(on), name(nm), topName(topNm), COLOUR(col) {}; + std::string background() {return Painter.colour["NORMAL"];} + std::string evidence() {return Painter.colour["YELLOW"];} + std::string colour() {return Painter.colour[COLOUR];} - void Active(int on) {active = on;}; - int isActive(void) {return active;}; - - friend std::ostream& operator<< (std::ostream& stream, const Logger& log){ - if ( log.active ) { + Logger(std::string topNm, int on, std::string nm, Colours& col_class, std::string col) + : active(on), + name(nm), + topName(topNm), + Painter(col_class), + COLOUR(col){} ; + + void Active(int on) {active = on;}; + int isActive(void) {return active;}; + + friend std::ostream& operator<< (std::ostream& stream, Logger& log){ + + if ( log.active ) { StopWatch.Stop(); GridTime now = StopWatch.Elapsed(); StopWatch.Start(); - stream << BLACK<< log.topName << BLACK<< " : "; - stream << log.COLOUR < &logstreams); -extern GridLogger GridLogError; -extern GridLogger GridLogWarning; -extern GridLogger GridLogMessage; -extern GridLogger GridLogDebug ; -extern GridLogger GridLogPerformance; -extern GridLogger GridLogIterative ; -extern GridLogger GridLogIntegrator ; + extern GridLogger GridLogError; + extern GridLogger GridLogWarning; + extern GridLogger GridLogMessage; + extern GridLogger GridLogDebug ; + extern GridLogger GridLogPerformance; + extern GridLogger GridLogIterative ; + extern GridLogger GridLogIntegrator ; + extern Colours GridLogColours; + } #endif diff --git a/lib/algorithms/approx/.dirstamp b/lib/algorithms/approx/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/communicator/.dirstamp b/lib/communicator/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/pugixml/.dirstamp b/lib/pugixml/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/qcd/action/fermion/.dirstamp b/lib/qcd/action/fermion/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/qcd/action/fermion/FermionOperatorImpl.h b/lib/qcd/action/fermion/FermionOperatorImpl.h index 312a8e41..d4a6557b 100644 --- a/lib/qcd/action/fermion/FermionOperatorImpl.h +++ b/lib/qcd/action/fermion/FermionOperatorImpl.h @@ -99,7 +99,7 @@ namespace Grid { typedef typename Impl::SiteSpinor SiteSpinor; \ typedef typename Impl::SiteHalfSpinor SiteHalfSpinor; \ typedef typename Impl::Compressor Compressor; \ - typedef typename Impl::StencilImpl StencilImpl; \ + typedef typename Impl::StencilImpl StencilImpl; \ typedef typename Impl::ImplParams ImplParams; #define INHERIT_IMPL_TYPES(Base) \ diff --git a/lib/qcd/hmc/.dirstamp b/lib/qcd/hmc/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/qcd/spin/.dirstamp b/lib/qcd/spin/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/qcd/utils/.dirstamp b/lib/qcd/utils/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/serialisation/.dirstamp b/lib/serialisation/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/stamp-h1 b/lib/stamp-h1 deleted file mode 100644 index 1b3b5f4c..00000000 --- a/lib/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for lib/Config.h diff --git a/lib/stencil/.dirstamp b/lib/stencil/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Test_main.cc b/tests/Test_main.cc index 9236fae1..3cbe5229 100644 --- a/tests/Test_main.cc +++ b/tests/Test_main.cc @@ -607,7 +607,7 @@ int main (int argc, char ** argv) } // loop for omp - + /* // Testing Smearing routine compilation, separate in a different file GridCartesian Fine(latt_size,simd_layout,mpi_layout); Smear_APE< PeriodicGimplR > APEsmearing; // periodic gauge implemetation @@ -615,6 +615,6 @@ int main (int argc, char ** argv) SmearedConfiguration< PeriodicGimplR > SmartConf(&Fine, 3, StoutSmearing); std::cout<