mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-10-31 20:14:32 +00:00 
			
		
		
		
	Compare commits
	
		
			161 Commits
		
	
	
		
			feature/ha
			...
			feature/np
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | ac1d655de8 | ||
| 3023287fd9 | |||
| b3d6805638 | |||
| 291bc2a1f0 | |||
| 2f368c33fc | |||
| 9592115341 | |||
|  | 24c07694bc | ||
|  | f0229025e2 | ||
|  | 6de9a45a09 | ||
|  | 03c3d495a2 | ||
|  | 49f25e08e8 | ||
| efc0c65056 | |||
| 936eaac8e1 | |||
| fe6a372f75 | |||
| 148fc052bd | |||
| c073341a10 | |||
| 78299daaac | |||
| 866449c804 | |||
| d69a52079f | |||
| 9f4f8a14a3 | |||
| f6593dc881 | |||
|  | b46d31d4b6 | ||
| 58567fc650 | |||
|  | 7c57cac670 | ||
| d0b21bf1ff | |||
| a1825d1f59 | |||
| 5a3e83ff7b | |||
| 52569d98d8 | |||
| b351103c29 | |||
| 118cca4681 | |||
| 44de727cd2 | |||
| 888ebc3cf9 | |||
| 6c031a1b81 | |||
| 02aa4bd762 | |||
| 9aafa8ee60 | |||
| 430b98b354 | |||
| 84189867ef | |||
| 4ab8cfbe2a | |||
| aadd9f4468 | |||
| 8fbb27ce13 | |||
| 21bba95909 | |||
| 6448fe7121 | |||
| 2458a11d1d | |||
| d0ca7c3fe6 | |||
| 57f899d79c | |||
| e881a0c157 | |||
| f411657118 | |||
|  | 7458c6174b | ||
|  | 21b269d0f9 | ||
|  | 083af92ac2 | ||
|  | 2c162577b5 | ||
|  | b1c4e96382 | ||
|  | a55c6f34f3 | ||
|  | beed527ea3 | ||
| eaa633cf69 | |||
| c632455129 | |||
| c012899ed5 | |||
|  | 8bab544c2f | ||
|  | 76fc06a5dc | ||
| 4af6c7e7aa | |||
| f60fbcfc4d | |||
| 464c81706e | |||
| 408130b808 | |||
| 375edd1370 | |||
| 6d912f6c67 | |||
| 6d1d28955e | |||
| 920b471761 | |||
| 63c21767ba | |||
| 7b6b712565 | |||
| 35abd05ee9 | |||
| dd36e60f6a | |||
| cb6c548e21 | |||
| 02c4ccf621 | |||
| fd24588212 | |||
| b800bb3ecb | |||
| f8abd0978b | |||
| 12c7c493bf | |||
|  | c7c9072313 | ||
| 2bf3be5fae | |||
| 3a40e4fc69 | |||
| 2e69e03f6f | |||
| a09f9bb528 | |||
| f0e341d726 | |||
| 6f09df0daf | |||
| 26cee605b8 | |||
| b3fa18c229 | |||
| 2940c9bcfd | |||
| 0bb532f72b | |||
| fada2aa0f7 | |||
| c193e4e675 | |||
| 3ee682f676 | |||
| d85ec3bac2 | |||
| b52d8eb1e3 | |||
| ee630d2e8b | |||
| 2f0af79869 | |||
| 1b7fb79ec0 | |||
| 2db1a4628c | |||
| 6aa047d842 | |||
| 8779c32ae1 | |||
| c527dc3358 | |||
| 6b42577b6b | |||
| fb3596f968 | |||
| f3a0158213 | |||
| 0250aa9347 | |||
| 3df6743396 | |||
| fb7d021b9d | |||
| 5f206df775 | |||
| 7727e81113 | |||
| c4115544a5 | |||
| 08c47328ba | |||
| 09001aedca | |||
| 2c67304716 | |||
| dc6d8686de | |||
| cc2780bea3 | |||
| 6e5a2b7922 | |||
| f4878d3a13 | |||
| 89d2fac92e | |||
| f2d3e41cf2 | |||
| 3c27bb36d4 | |||
| 603d59f389 | |||
| 07a0ef3f95 | |||
| 503259f9c9 | |||
| 5be6a51044 | |||
| ac69f042b1 | |||
| 133d5c2e34 | |||
| 2a94244890 | |||
| a15a2dfd29 | |||
| 093bb02633 | |||
| 99a85116f8 | |||
|  | 27cdb79063 | ||
| f4cbfd63ff | |||
| 2b794b6aa7 | |||
| d0244a059f | |||
| dcdd891d7d | |||
| 6d2df9de79 | |||
| 41d4e37bae | |||
| ee5c0cc9b6 | |||
| 0a4020eb4d | |||
| b2de26589b | |||
| 0677adb4dd | |||
| 231cc95be6 | |||
| 639f9cab82 | |||
| 4eac4e575e | |||
| 3f0f92cda6 | |||
| d2650e89bd | |||
| 2962123cba | |||
| 830168ec37 | |||
| 584c921ca0 | |||
| 81347b4d16 | |||
| 2cfa0b0e6b | |||
|  | fa5dee76b1 | ||
|  | 8d1679c6b8 | ||
|  | 891ad66eab | ||
|  | ad6c1c0c4e | ||
| bf71162b97 | |||
| 299e828d83 | |||
| ef5452cddf | |||
| 80de748737 | |||
| 00f31ae83f | |||
|  | 1a2613086a | ||
|  | 4f110c09a5 | 
							
								
								
									
										26
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -83,6 +83,7 @@ ltmain.sh | |||||||
| .Trashes | .Trashes | ||||||
| ehthumbs.db | ehthumbs.db | ||||||
| Thumbs.db | Thumbs.db | ||||||
|  | .dirstamp | ||||||
|  |  | ||||||
| # build directory # | # build directory # | ||||||
| ################### | ################### | ||||||
| @@ -97,11 +98,8 @@ build.sh | |||||||
|  |  | ||||||
| # Eigen source # | # Eigen source # | ||||||
| ################ | ################ | ||||||
| lib/Eigen/* | Grid/Eigen | ||||||
|  | Eigen/* | ||||||
| # FFTW source # |  | ||||||
| ################ |  | ||||||
| lib/fftw/* |  | ||||||
|  |  | ||||||
| # libtool macros # | # libtool macros # | ||||||
| ################## | ################## | ||||||
| @@ -112,21 +110,7 @@ m4/libtool.m4 | |||||||
| ################ | ################ | ||||||
| gh-pages/ | gh-pages/ | ||||||
|  |  | ||||||
| # Buck files # |  | ||||||
| ############## |  | ||||||
| .buck* |  | ||||||
| buck-out |  | ||||||
| BUCK |  | ||||||
| make-bin-BUCK.sh |  | ||||||
|  |  | ||||||
| # generated sources # | # generated sources # | ||||||
| ##################### | ##################### | ||||||
| lib/qcd/spin/gamma-gen/*.h | Grid/qcd/spin/gamma-gen/*.h | ||||||
| lib/qcd/spin/gamma-gen/*.cc | Grid/qcd/spin/gamma-gen/*.cc | ||||||
| lib/version.h |  | ||||||
|  |  | ||||||
| # vs code editor files # |  | ||||||
| ######################## |  | ||||||
| .vscode/ |  | ||||||
| .vscode/settings.json |  | ||||||
| settings.json |  | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -9,6 +9,11 @@ matrix: | |||||||
|     - os:        osx |     - os:        osx | ||||||
|       osx_image: xcode8.3 |       osx_image: xcode8.3 | ||||||
|       compiler: clang |       compiler: clang | ||||||
|  |       env: PREC=single | ||||||
|  |     - os:        osx | ||||||
|  |       osx_image: xcode8.3 | ||||||
|  |       compiler: clang | ||||||
|  |       env: PREC=double | ||||||
|        |        | ||||||
| before_install: | before_install: | ||||||
|     - export GRIDDIR=`pwd` |     - export GRIDDIR=`pwd` | ||||||
| @@ -16,7 +21,7 @@ before_install: | |||||||
|     - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "clang" ]]; then export PATH="${GRIDDIR}/clang/bin:${PATH}"; fi |     - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "clang" ]]; then export PATH="${GRIDDIR}/clang/bin:${PATH}"; fi | ||||||
|     - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "clang" ]]; then export LD_LIBRARY_PATH="${GRIDDIR}/clang/lib:${LD_LIBRARY_PATH}"; fi |     - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "clang" ]]; then export LD_LIBRARY_PATH="${GRIDDIR}/clang/lib:${LD_LIBRARY_PATH}"; fi | ||||||
|     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi |     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi | ||||||
|     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libmpc; fi |     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libmpc openssl; fi | ||||||
|      |      | ||||||
| install: | install: | ||||||
|     - export CWD=`pwd` |     - export CWD=`pwd` | ||||||
| @@ -33,6 +38,7 @@ install: | |||||||
|     - which $CXX |     - which $CXX | ||||||
|     - $CXX --version |     - $CXX --version | ||||||
|     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LDFLAGS='-L/usr/local/lib'; fi |     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LDFLAGS='-L/usr/local/lib'; fi | ||||||
|  |     - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export EXTRACONF='--with-openssl=/usr/local/opt/openssl'; fi | ||||||
|      |      | ||||||
| script: | script: | ||||||
|     - ./bootstrap.sh |     - ./bootstrap.sh | ||||||
| @@ -49,12 +55,7 @@ script: | |||||||
|     - make -j4 |     - make -j4 | ||||||
|     - make install |     - make install | ||||||
|     - cd $CWD/build |     - cd $CWD/build | ||||||
|     - ../configure --enable-precision=single --enable-simd=SSE4 --enable-comms=none --with-lime=$CWD/build/lime/install |     - ../configure --enable-precision=$PREC --enable-simd=SSE4 --enable-comms=none --with-lime=$CWD/build/lime/install ${EXTRACONF} | ||||||
|     - make -j4  |  | ||||||
|     - ./benchmarks/Benchmark_dwf --threads 1 --debug-signals |  | ||||||
|     - echo make clean |  | ||||||
|     - ../configure --enable-precision=double --enable-simd=SSE4 --enable-comms=none --with-lime=$CWD/build/lime/install |  | ||||||
|     - make -j4  |     - make -j4  | ||||||
|     - ./benchmarks/Benchmark_dwf --threads 1 --debug-signals |     - ./benchmarks/Benchmark_dwf --threads 1 --debug-signals | ||||||
|     - make check |     - make check | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,6 +48,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk> | |||||||
| #include <Grid/serialisation/Serialisation.h> | #include <Grid/serialisation/Serialisation.h> | ||||||
| #include <Grid/threads/Threads.h> | #include <Grid/threads/Threads.h> | ||||||
| #include <Grid/util/Util.h> | #include <Grid/util/Util.h> | ||||||
|  | #include <Grid/util/Sha.h> | ||||||
| #include <Grid/communicator/Communicator.h>  | #include <Grid/communicator/Communicator.h>  | ||||||
| #include <Grid/cartesian/Cartesian.h>     | #include <Grid/cartesian/Cartesian.h>     | ||||||
| #include <Grid/tensors/Tensors.h>       | #include <Grid/tensors/Tensors.h>       | ||||||
| @@ -1,10 +1,14 @@ | |||||||
| #pragma once | #pragma once | ||||||
|  | // Force Eigen to use MKL if Grid has been configured with --enable-mkl
 | ||||||
|  | #ifdef USE_MKL | ||||||
| #define EIGEN_USE_MKL_ALL | #define EIGEN_USE_MKL_ALL | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #if defined __GNUC__ | #if defined __GNUC__ | ||||||
| #pragma GCC diagnostic push | #pragma GCC diagnostic push | ||||||
| #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||||||
| #endif | #endif | ||||||
| #include <Eigen/Dense> | #include <Grid/Eigen/Dense> | ||||||
| #if defined __GNUC__ | #if defined __GNUC__ | ||||||
| #pragma GCC diagnostic pop | #pragma GCC diagnostic pop | ||||||
| #endif | #endif | ||||||
| @@ -21,6 +21,32 @@ if BUILD_HDF5 | |||||||
|   extra_headers+=serialisation/Hdf5Type.h |   extra_headers+=serialisation/Hdf5Type.h | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
|  | all: version-cache | ||||||
|  | 
 | ||||||
|  | version-cache: | ||||||
|  | 	@if [ `git status --porcelain | grep -v '??' | wc -l` -gt 0 ]; then\
 | ||||||
|  | 		a="uncommited changes";\
 | ||||||
|  | 	else\
 | ||||||
|  | 		a="clean";\
 | ||||||
|  | 	fi;\
 | ||||||
|  | 	echo "`git log -n 1 --format=format:"#define GITHASH \\"%H:%d $$a\\"%n" HEAD`" > vertmp;\ | ||||||
|  | 	if [ -e version-cache ]; then\
 | ||||||
|  | 		d=`diff vertmp version-cache`;\
 | ||||||
|  | 		if [ "$${d}" != "" ]; then\
 | ||||||
|  | 			mv vertmp version-cache;\
 | ||||||
|  | 			rm -f Version.h;\
 | ||||||
|  | 		fi;\
 | ||||||
|  | 	else\
 | ||||||
|  | 		mv vertmp version-cache;\
 | ||||||
|  | 		rm -f Version.h;\
 | ||||||
|  | 	fi;\
 | ||||||
|  | 	rm -f vertmp | ||||||
|  | 
 | ||||||
|  | Version.h: | ||||||
|  | 	cp version-cache Version.h | ||||||
|  | 
 | ||||||
|  | .PHONY: version-cache | ||||||
|  | 
 | ||||||
| #
 | #
 | ||||||
| # Libraries
 | # Libraries
 | ||||||
| #
 | #
 | ||||||
| @@ -30,8 +56,8 @@ include Eigen.inc | |||||||
| lib_LIBRARIES = libGrid.a | lib_LIBRARIES = libGrid.a | ||||||
| 
 | 
 | ||||||
| CCFILES += $(extra_sources) | CCFILES += $(extra_sources) | ||||||
| HFILES  += $(extra_headers) | HFILES  += $(extra_headers) Config.h Version.h | ||||||
| 
 | 
 | ||||||
| libGrid_a_SOURCES              = $(CCFILES) | libGrid_a_SOURCES              = $(CCFILES) | ||||||
| libGrid_adir                   = $(pkgincludedir) | libGrid_adir                   = $(includedir)/Grid | ||||||
| nobase_dist_pkginclude_HEADERS = $(HFILES) $(eigen_files) $(eigen_unsupp_files) Config.h | nobase_dist_pkginclude_HEADERS = $(HFILES) $(eigen_files) $(eigen_unsupp_files) | ||||||
| @@ -150,13 +150,13 @@ class ConjugateGradient : public OperatorFunction<Field> { | |||||||
| 	std::cout << GridLogMessage << "\tTrue residual " << true_residual<<std::endl; | 	std::cout << GridLogMessage << "\tTrue residual " << true_residual<<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tTarget " << Tolerance << std::endl; | 	std::cout << GridLogMessage << "\tTarget " << Tolerance << std::endl; | ||||||
| 
 | 
 | ||||||
|         std::cout << GridLogMessage << "Time breakdown "<<std::endl; |         std::cout << GridLogPerformance << "Time breakdown "<<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tElapsed    " << SolverTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tElapsed    " << SolverTimer.Elapsed() <<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tMatrix     " << MatrixTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tMatrix     " << MatrixTimer.Elapsed() <<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tLinalg     " << LinalgTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tLinalg     " << LinalgTimer.Elapsed() <<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tInner      " << InnerTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tInner      " << InnerTimer.Elapsed() <<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tAxpyNorm   " << AxpyNormTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tAxpyNorm   " << AxpyNormTimer.Elapsed() <<std::endl; | ||||||
| 	std::cout << GridLogMessage << "\tLinearComb " << LinearCombTimer.Elapsed() <<std::endl; | 	std::cout << GridLogPerformance << "\tLinearComb " << LinearCombTimer.Elapsed() <<std::endl; | ||||||
| 
 | 
 | ||||||
|         if (ErrorOnNoConverge) assert(true_residual / Tolerance < 10000.0); |         if (ErrorOnNoConverge) assert(true_residual / Tolerance < 10000.0); | ||||||
| 
 | 
 | ||||||
| @@ -31,21 +31,13 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk> | |||||||
| namespace Grid {  | namespace Grid {  | ||||||
| 
 | 
 | ||||||
| template<class Field> | template<class Field> | ||||||
| class Guesser { | class ZeroGuesser: public LinearFunction<Field> { | ||||||
| public: |  | ||||||
|   Guesser(void) = default; |  | ||||||
|   virtual ~Guesser(void) = default; |  | ||||||
|   virtual void operator()(const Field &src, Field &guess) = 0; |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| template<class Field> |  | ||||||
| class ZeroGuesser: public Guesser<Field> { |  | ||||||
| public: | public: | ||||||
|   virtual void operator()(const Field &src, Field &guess) { guess = zero; }; |   virtual void operator()(const Field &src, Field &guess) { guess = zero; }; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| template<class Field> | template<class Field> | ||||||
| class SourceGuesser: public Guesser<Field> { | class SourceGuesser: public LinearFunction<Field> { | ||||||
| public: | public: | ||||||
|   virtual void operator()(const Field &src, Field &guess) { guess = src; }; |   virtual void operator()(const Field &src, Field &guess) { guess = src; }; | ||||||
| }; | }; | ||||||
| @@ -54,7 +46,7 @@ public: | |||||||
| // Fine grid deflation
 | // Fine grid deflation
 | ||||||
| ////////////////////////////////
 | ////////////////////////////////
 | ||||||
| template<class Field> | template<class Field> | ||||||
| class DeflatedGuesser: public Guesser<Field> { | class DeflatedGuesser: public LinearFunction<Field> { | ||||||
| private: | private: | ||||||
|   const std::vector<Field> &evec; |   const std::vector<Field> &evec; | ||||||
|   const std::vector<RealD> &eval; |   const std::vector<RealD> &eval; | ||||||
| @@ -76,7 +68,7 @@ public: | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| template<class FineField, class CoarseField> | template<class FineField, class CoarseField> | ||||||
| class LocalCoherenceDeflatedGuesser: public Guesser<FineField> { | class LocalCoherenceDeflatedGuesser: public LinearFunction<FineField> { | ||||||
| private: | private: | ||||||
|   const std::vector<FineField>   &subspace; |   const std::vector<FineField>   &subspace; | ||||||
|   const std::vector<CoarseField> &evec_coarse; |   const std::vector<CoarseField> &evec_coarse; | ||||||
| @@ -132,7 +132,6 @@ int Log2Size(int TwoToPower,int MAXLOG2) | |||||||
| } | } | ||||||
| void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,Grid_MPI_Comm & optimal_comm) | void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,Grid_MPI_Comm & optimal_comm) | ||||||
| { | { | ||||||
| #undef HYPERCUBE  |  | ||||||
| #ifdef HYPERCUBE | #ifdef HYPERCUBE | ||||||
|   ////////////////////////////////////////////////////////////////
 |   ////////////////////////////////////////////////////////////////
 | ||||||
|   // Assert power of two shm_size.
 |   // Assert power of two shm_size.
 | ||||||
| @@ -175,7 +174,7 @@ void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors, | |||||||
| 
 | 
 | ||||||
|   std::string hname(name); |   std::string hname(name); | ||||||
|   std::cout << "hostname "<<hname<<std::endl; |   std::cout << "hostname "<<hname<<std::endl; | ||||||
|   std::cout << "R " << R << " I " << I << " N "<< N<< |   std::cout << "R " << R << " I " << I << " N "<< N | ||||||
|             << " hypercoor 0x"<<std::hex<<hypercoor<<std::dec<<std::endl; |             << " hypercoor 0x"<<std::hex<<hypercoor<<std::dec<<std::endl; | ||||||
| 
 | 
 | ||||||
|   //////////////////////////////////////////////////////////////////
 |   //////////////////////////////////////////////////////////////////
 | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -317,6 +317,19 @@ namespace Grid { | |||||||
|       std::seed_seq src(seeds.begin(),seeds.end()); |       std::seed_seq src(seeds.begin(),seeds.end()); | ||||||
|       Seed(src,0); |       Seed(src,0); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     void SeedUniqueString(const std::string &s){ | ||||||
|  |       std::vector<int> seeds; | ||||||
|  |       std::stringstream sha; | ||||||
|  |       seeds = GridChecksum::sha256_seeds(s); | ||||||
|  |       for(int i=0;i<seeds.size();i++) {  | ||||||
|  |         sha << std::hex << seeds[i]; | ||||||
|  |       } | ||||||
|  |       std::cout << GridLogMessage << "Intialising serial RNG with unique string '"  | ||||||
|  |                 << s << "'" << std::endl; | ||||||
|  |       std::cout << GridLogMessage << "Seed SHA256: " << sha.str() << std::endl; | ||||||
|  |       SeedFixedIntegers(seeds); | ||||||
|  |     } | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   class GridParallelRNG : public GridRNGbase { |   class GridParallelRNG : public GridRNGbase { | ||||||
| @@ -377,6 +390,14 @@ namespace Grid { | |||||||
|       _time_counter += usecond()- inner_time_counter; |       _time_counter += usecond()- inner_time_counter; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     void SeedUniqueString(const std::string &s){ | ||||||
|  |       std::vector<int> seeds; | ||||||
|  |       seeds = GridChecksum::sha256_seeds(s); | ||||||
|  |       std::cout << GridLogMessage << "Intialising parallel RNG with unique string '"  | ||||||
|  |                 << s << "'" << std::endl; | ||||||
|  |       std::cout << GridLogMessage << "Seed SHA256: " << GridChecksum::sha256_string(seeds) << std::endl; | ||||||
|  |       SeedFixedIntegers(seeds); | ||||||
|  |     } | ||||||
|     void SeedFixedIntegers(const std::vector<int> &seeds){ |     void SeedFixedIntegers(const std::vector<int> &seeds){ | ||||||
| 
 | 
 | ||||||
|       // Everyone generates the same seed_seq based on input seeds
 |       // Everyone generates the same seed_seq based on input seeds
 | ||||||
| @@ -485,7 +485,7 @@ void InsertSliceLocal(const Lattice<vobj> &lowDim, Lattice<vobj> & higherDim,int | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| template<class vobj> | template<class vobj> | ||||||
| void ExtractSliceLocal(Lattice<vobj> &lowDim, Lattice<vobj> & higherDim,int slice_lo,int slice_hi, int orthog) | void ExtractSliceLocal(Lattice<vobj> &lowDim, const Lattice<vobj> & higherDim,int slice_lo,int slice_hi, int orthog) | ||||||
| { | { | ||||||
|   typedef typename vobj::scalar_object sobj; |   typedef typename vobj::scalar_object sobj; | ||||||
| 
 | 
 | ||||||
| @@ -520,7 +520,7 @@ void ExtractSliceLocal(Lattice<vobj> &lowDim, Lattice<vobj> & higherDim,int slic | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| template<class vobj> | template<class vobj> | ||||||
| void Replicate(Lattice<vobj> &coarse,Lattice<vobj> & fine) | void Replicate(const Lattice<vobj> &coarse,Lattice<vobj> & fine) | ||||||
| { | { | ||||||
|   typedef typename vobj::scalar_object sobj; |   typedef typename vobj::scalar_object sobj; | ||||||
| 
 | 
 | ||||||
| @@ -250,8 +250,7 @@ class GridLimeReader : public BinaryIO { | |||||||
|   ////////////////////////////////////////////
 |   ////////////////////////////////////////////
 | ||||||
|   // Read a generic serialisable object
 |   // Read a generic serialisable object
 | ||||||
|   ////////////////////////////////////////////
 |   ////////////////////////////////////////////
 | ||||||
|   template<class serialisable_object> |   void readLimeObject(std::string &xmlstring,std::string record_name) | ||||||
|   void readLimeObject(serialisable_object &object,std::string object_name,std::string record_name) |  | ||||||
|   { |   { | ||||||
|     // should this be a do while; can we miss a first record??
 |     // should this be a do while; can we miss a first record??
 | ||||||
|     while ( limeReaderNextRecord(LimeR) == LIME_SUCCESS ) {  |     while ( limeReaderNextRecord(LimeR) == LIME_SUCCESS ) {  | ||||||
| @@ -266,15 +265,23 @@ class GridLimeReader : public BinaryIO { | |||||||
| 	limeReaderReadData((void *)&xmlc[0], &nbytes, LimeR);     | 	limeReaderReadData((void *)&xmlc[0], &nbytes, LimeR);     | ||||||
| 	//	std::cout << GridLogMessage<< " readLimeObject matches XML " << &xmlc[0] <<std::endl;
 | 	//	std::cout << GridLogMessage<< " readLimeObject matches XML " << &xmlc[0] <<std::endl;
 | ||||||
| 
 | 
 | ||||||
|   std::string xmlstring(&xmlc[0]); |    xmlstring = std::string(&xmlc[0]); | ||||||
| 	XmlReader RD(xmlstring, true, ""); |  | ||||||
| 	read(RD,object_name,object); |  | ||||||
| 	return; | 	return; | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|     }   |     }   | ||||||
|     assert(0); |     assert(0); | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|  |   template<class serialisable_object> | ||||||
|  |   void readLimeObject(serialisable_object &object,std::string object_name,std::string record_name) | ||||||
|  |   { | ||||||
|  |     std::string xmlstring; | ||||||
|  | 
 | ||||||
|  |     readLimeObject(xmlstring, record_name); | ||||||
|  | 	  XmlReader RD(xmlstring, true, ""); | ||||||
|  | 	  read(RD,object_name,object); | ||||||
|  |   } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class GridLimeWriter : public BinaryIO  | class GridLimeWriter : public BinaryIO  | ||||||
| @@ -102,6 +102,9 @@ public: | |||||||
|     assert(running == false); |     assert(running == false); | ||||||
|     return (uint64_t) accumulator.count(); |     return (uint64_t) accumulator.count(); | ||||||
|   } |   } | ||||||
|  |   bool isRunning(void){ | ||||||
|  |     return running; | ||||||
|  |   } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| @@ -90,6 +90,7 @@ namespace QCD { | |||||||
|     // That probably makes for GridRedBlack4dCartesian grid.
 |     // That probably makes for GridRedBlack4dCartesian grid.
 | ||||||
| 
 | 
 | ||||||
|     // s,sp,c,spc,lc
 |     // s,sp,c,spc,lc
 | ||||||
|  | 
 | ||||||
|     template<typename vtype> using iSinglet                     = iScalar<iScalar<iScalar<vtype> > >; |     template<typename vtype> using iSinglet                     = iScalar<iScalar<iScalar<vtype> > >; | ||||||
|     template<typename vtype> using iSpinMatrix                  = iScalar<iMatrix<iScalar<vtype>, Ns> >; |     template<typename vtype> using iSpinMatrix                  = iScalar<iMatrix<iScalar<vtype>, Ns> >; | ||||||
|     template<typename vtype> using iColourMatrix                = iScalar<iScalar<iMatrix<vtype, Nc> > > ; |     template<typename vtype> using iColourMatrix                = iScalar<iScalar<iMatrix<vtype, Nc> > > ; | ||||||
| @@ -101,6 +102,8 @@ namespace QCD { | |||||||
|     template<typename vtype> using iSpinColourVector            = iScalar<iVector<iVector<vtype, Nc>, Ns> >; |     template<typename vtype> using iSpinColourVector            = iScalar<iVector<iVector<vtype, Nc>, Ns> >; | ||||||
|     template<typename vtype> using iHalfSpinVector              = iScalar<iVector<iScalar<vtype>, Nhs> >; |     template<typename vtype> using iHalfSpinVector              = iScalar<iVector<iScalar<vtype>, Nhs> >; | ||||||
|     template<typename vtype> using iHalfSpinColourVector        = iScalar<iVector<iVector<vtype, Nc>, Nhs> >; |     template<typename vtype> using iHalfSpinColourVector        = iScalar<iVector<iVector<vtype, Nc>, Nhs> >; | ||||||
|  |     template<typename vtype> using iSpinColourSpinColourMatrix  = iScalar<iMatrix<iMatrix<iMatrix<iMatrix<vtype, Nc>, Ns>, Nc>, Ns> >; | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     template<typename vtype> using iGparitySpinColourVector       = iVector<iVector<iVector<vtype, Nc>, Ns>, Ngp >; |     template<typename vtype> using iGparitySpinColourVector       = iVector<iVector<iVector<vtype, Nc>, Ns>, Ngp >; | ||||||
|     template<typename vtype> using iGparityHalfSpinColourVector   = iVector<iVector<iVector<vtype, Nc>, Nhs>, Ngp >; |     template<typename vtype> using iGparityHalfSpinColourVector   = iVector<iVector<iVector<vtype, Nc>, Nhs>, Ngp >; | ||||||
| @@ -132,6 +135,24 @@ namespace QCD { | |||||||
|     typedef iSpinColourMatrix<vComplexF>    vSpinColourMatrixF; |     typedef iSpinColourMatrix<vComplexF>    vSpinColourMatrixF; | ||||||
|     typedef iSpinColourMatrix<vComplexD>    vSpinColourMatrixD; |     typedef iSpinColourMatrix<vComplexD>    vSpinColourMatrixD; | ||||||
|      |      | ||||||
|  |     // SpinColourSpinColour matrix
 | ||||||
|  |     typedef iSpinColourSpinColourMatrix<Complex  >    SpinColourSpinColourMatrix; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<ComplexF >    SpinColourSpinColourMatrixF; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<ComplexD >    SpinColourSpinColourMatrixD; | ||||||
|  | 
 | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplex >    vSpinColourSpinColourMatrix; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplexF>    vSpinColourSpinColourMatrixF; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplexD>    vSpinColourSpinColourMatrixD; | ||||||
|  | 
 | ||||||
|  |     // SpinColourSpinColour matrix
 | ||||||
|  |     typedef iSpinColourSpinColourMatrix<Complex  >    SpinColourSpinColourMatrix; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<ComplexF >    SpinColourSpinColourMatrixF; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<ComplexD >    SpinColourSpinColourMatrixD; | ||||||
|  | 
 | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplex >    vSpinColourSpinColourMatrix; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplexF>    vSpinColourSpinColourMatrixF; | ||||||
|  |     typedef iSpinColourSpinColourMatrix<vComplexD>    vSpinColourSpinColourMatrixD; | ||||||
|  | 
 | ||||||
|     // LorentzColour
 |     // LorentzColour
 | ||||||
|     typedef iLorentzColourMatrix<Complex  > LorentzColourMatrix; |     typedef iLorentzColourMatrix<Complex  > LorentzColourMatrix; | ||||||
|     typedef iLorentzColourMatrix<ComplexF > LorentzColourMatrixF; |     typedef iLorentzColourMatrix<ComplexF > LorentzColourMatrixF; | ||||||
| @@ -229,6 +250,9 @@ namespace QCD { | |||||||
|     typedef Lattice<vSpinColourMatrixF>     LatticeSpinColourMatrixF; |     typedef Lattice<vSpinColourMatrixF>     LatticeSpinColourMatrixF; | ||||||
|     typedef Lattice<vSpinColourMatrixD>     LatticeSpinColourMatrixD; |     typedef Lattice<vSpinColourMatrixD>     LatticeSpinColourMatrixD; | ||||||
| 
 | 
 | ||||||
|  |     typedef Lattice<vSpinColourSpinColourMatrix>      LatticeSpinColourSpinColourMatrix; | ||||||
|  |     typedef Lattice<vSpinColourSpinColourMatrixF>     LatticeSpinColourSpinColourMatrixF; | ||||||
|  |     typedef Lattice<vSpinColourSpinColourMatrixD>     LatticeSpinColourSpinColourMatrixD; | ||||||
| 
 | 
 | ||||||
|     typedef Lattice<vLorentzColourMatrix>  LatticeLorentzColourMatrix; |     typedef Lattice<vLorentzColourMatrix>  LatticeLorentzColourMatrix; | ||||||
|     typedef Lattice<vLorentzColourMatrixF> LatticeLorentzColourMatrixF; |     typedef Lattice<vLorentzColourMatrixF> LatticeLorentzColourMatrixF; | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user