mirror of
https://github.com/paboyle/Grid.git
synced 2026-11-03 18:53:20 +00:00
Compare commits
8
Commits
4e49ca55ab
..
XmlIO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dfe31957d | ||
|
|
5ce1293c54 | ||
|
|
7647576863 | ||
|
|
f11ba18df2 | ||
|
|
cf8587e401 | ||
|
|
7dd35ef749 | ||
|
|
41e570ddce | ||
|
|
a452131b50 |
No files matched your search
@@ -63,12 +63,10 @@ void MemoryManager::PrintBytes(void)
|
|||||||
std::cout << " MemoryManager : "<<(total_device>>20)<<" accelerator Mbytes "<<std::endl;
|
std::cout << " MemoryManager : "<<(total_device>>20)<<" accelerator Mbytes "<<std::endl;
|
||||||
std::cout << " MemoryManager : "<<(total_host>>20) <<" cpu Mbytes "<<std::endl;
|
std::cout << " MemoryManager : "<<(total_host>>20) <<" cpu Mbytes "<<std::endl;
|
||||||
uint64_t cacheBytes;
|
uint64_t cacheBytes;
|
||||||
cacheBytes = CacheBytes[Cpu];
|
cacheBytes = HostCacheBytes();
|
||||||
std::cout << " MemoryManager : "<<(cacheBytes>>20) <<" cpu cache Mbytes "<<std::endl;
|
std::cout << " MemoryManager : "<<(cacheBytes>>20) <<" cpu alloc cache Mbytes "<<std::endl;
|
||||||
cacheBytes = CacheBytes[Acc];
|
cacheBytes = DeviceCacheBytes();
|
||||||
std::cout << " MemoryManager : "<<(cacheBytes>>20) <<" acc cache Mbytes "<<std::endl;
|
std::cout << " MemoryManager : "<<(cacheBytes>>20) <<" acc alloc cache Mbytes "<<std::endl;
|
||||||
cacheBytes = CacheBytes[Shared];
|
|
||||||
std::cout << " MemoryManager : "<<(cacheBytes>>20) <<" shared cache Mbytes "<<std::endl;
|
|
||||||
|
|
||||||
#ifdef GRID_CUDA
|
#ifdef GRID_CUDA
|
||||||
cuda_mem();
|
cuda_mem();
|
||||||
|
|||||||
@@ -438,5 +438,11 @@ inline typename vobj::scalar_object sum_gpu_large(const vobj *lat, Integer osite
|
|||||||
result = sumD_gpu_large(lat,osites);
|
result = sumD_gpu_large(lat,osites);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
template<class Word> Word checksum_gpu(Word *vec,uint64_t L)
|
||||||
|
{
|
||||||
|
Word w;
|
||||||
|
bzero(&w,sizeof(w));
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
NAMESPACE_END(Grid);
|
NAMESPACE_END(Grid);
|
||||||
@@ -51,8 +51,8 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
#endif
|
#endif
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
#ifdef GRID_CUDA
|
#ifdef GRID_CUDA
|
||||||
//accelerator_inline uint64_t __rdtsc(void) { return 0; }
|
accelerator_inline uint64_t __rdtsc(void) { return 0; }
|
||||||
//accelerator_inline uint64_t __rdpmc(int ) { return 0; }
|
accelerator_inline uint64_t __rdpmc(int ) { return 0; }
|
||||||
#else
|
#else
|
||||||
#include <x86intrin.h>
|
#include <x86intrin.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -93,8 +93,7 @@ inline uint64_t cyclecount(void){
|
|||||||
}
|
}
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
inline uint64_t cyclecount(void){
|
inline uint64_t cyclecount(void){
|
||||||
uint64_t ret = __rdtsc();
|
return (uint64_t)0;
|
||||||
return (uint64_t)ret;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
@@ -184,11 +184,29 @@ namespace Grid
|
|||||||
std::cout << GridLogWarning << "XML: cannot open node '" << s << "'";
|
std::cout << GridLogWarning << "XML: cannot open node '" << s << "'";
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
} else {
|
} else {
|
||||||
for(unsigned int i = 0; node_.child("elem"); )
|
// Consumed children are *removed* rather than renamed to "elem-done".
|
||||||
|
//
|
||||||
|
// pugixml's node_.child("elem") scans the child list from the start.
|
||||||
|
// Leaving consumed nodes in place under a new name meant iteration i
|
||||||
|
// had to skip i dead siblings, and the lookup happens three times per
|
||||||
|
// element (loop condition, read, rename) -- so reading an N-element
|
||||||
|
// vector cost O(N^2) node visits. Measured on this reader: 11 s for
|
||||||
|
// 32k elements, 278 s for 131k, i.e. hours for the ~500k elements a
|
||||||
|
// 512x512 complex matrix produces. Removing the node instead keeps
|
||||||
|
// the next "elem" as the first child, making each lookup O(1).
|
||||||
|
//
|
||||||
|
// Counting first also lets the vector be sized once instead of grown
|
||||||
|
// one element at a time.
|
||||||
|
size_t n = 0;
|
||||||
|
for (pugi::xml_node e = node_.child("elem"); e; e = e.next_sibling("elem"))
|
||||||
{
|
{
|
||||||
output.resize(i + 1);
|
n++;
|
||||||
read("elem", output[i++]);
|
}
|
||||||
node_.child("elem").set_name("elem-done");
|
output.resize(n);
|
||||||
|
for (size_t i = 0; i < n; ++i)
|
||||||
|
{
|
||||||
|
read("elem", output[i]);
|
||||||
|
node_.remove_child(node_.child("elem"));
|
||||||
}
|
}
|
||||||
pop();
|
pop();
|
||||||
}
|
}
|
||||||
@@ -225,7 +243,11 @@ namespace Grid
|
|||||||
{
|
{
|
||||||
NumElements--;
|
NumElements--;
|
||||||
read("elem", x);
|
read("elem", x);
|
||||||
node_.child("elem").set_name("elem-done");
|
// Remove rather than rename, for the same O(N^2) reason as the
|
||||||
|
// std::vector reader above. Only "elem" nodes are removed; the
|
||||||
|
// tensor-level renaming below is left alone because push(sName)
|
||||||
|
// relies on it to find the next unvisited tensor block.
|
||||||
|
node_.remove_child(node_.child("elem"));
|
||||||
int i;
|
int i;
|
||||||
for( i = Rank - 1 ; i != -1 && ++MyIndex[i] == dim[i] ; i-- )
|
for( i = Rank - 1 ; i != -1 && ++MyIndex[i] == dim[i] ; i-- )
|
||||||
MyIndex[i] = 0;
|
MyIndex[i] = 0;
|
||||||
|
|||||||
+4
-4
@@ -115,10 +115,10 @@ accelerator_inline ComplexF adj(const ComplexF& r ){ return(conjugate(r)); }
|
|||||||
|
|
||||||
#if defined(GRID_CUDA) || defined(GRID_HIP)
|
#if defined(GRID_CUDA) || defined(GRID_HIP)
|
||||||
//Provide for convenience
|
//Provide for convenience
|
||||||
accelerator_inline std::complex<double> conjugate(const std::complex<double>& r){ return(conj(r)); }
|
inline std::complex<double> conjugate(const std::complex<double>& r){ return(conj(r)); }
|
||||||
accelerator_inline std::complex<float> conjugate(const std::complex<float>& r) { return(conj(r)); }
|
inline std::complex<float> conjugate(const std::complex<float>& r) { return(conj(r)); }
|
||||||
accelerator_inline std::complex<double> adj(const std::complex<double>& r) { return(conj(r)); }
|
inline std::complex<double> adj(const std::complex<double>& r) { return(conj(r)); }
|
||||||
accelerator_inline std::complex<float> adj(const std::complex<float>& r) { return(conj(r)); }
|
inline std::complex<float> adj(const std::complex<float>& r) { return(conj(r)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
accelerator_inline RealF real(const RealF & r){ return r; }
|
accelerator_inline RealF real(const RealF & r){ return r; }
|
||||||
|
|||||||
+1
-1
@@ -174,7 +174,7 @@ esac
|
|||||||
############### fermions
|
############### fermions
|
||||||
AC_ARG_ENABLE([fermion-instantiations],
|
AC_ARG_ENABLE([fermion-instantiations],
|
||||||
[AS_HELP_STRING([--enable-fermion-instantiations=yes|no],[enable fermion instantiations])],
|
[AS_HELP_STRING([--enable-fermion-instantiations=yes|no],[enable fermion instantiations])],
|
||||||
[ac_FERMION_REPS=${enable_fermion_instantiations}], [ac_FERMION_INSTANTIATIONS=yes])
|
[ac_FERMION_INSTANTIATIONS=${enable_fermion_instantiations}], [ac_FERMION_INSTANTIATIONS=yes])
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_FERMION_INSTANTIATIONS, [ test "${ac_FERMION_INSTANTIATIONS}X" == "yesX" ])
|
AM_CONDITIONAL(BUILD_FERMION_INSTANTIATIONS, [ test "${ac_FERMION_INSTANTIATIONS}X" == "yesX" ])
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ LIME=/p/home/jusers/boyle2/juwels/gm2dwf/boyle/
|
|||||||
--disable-gparity \
|
--disable-gparity \
|
||||||
--disable-fermion-reps \
|
--disable-fermion-reps \
|
||||||
--with-lime=$LIME \
|
--with-lime=$LIME \
|
||||||
--enable-accelerator-cshift \
|
|
||||||
--disable-unified \
|
--disable-unified \
|
||||||
CXX=nvcc \
|
CXX=nvcc \
|
||||||
LDFLAGS="-cudart shared " \
|
LDFLAGS="-cudart shared " \
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
echo spack
|
||||||
|
. /autofs/nccs-svm1_home1/paboyle/spack/share/spack/setup-env.sh
|
||||||
|
|
||||||
|
export CLIME=`spack find --paths c-lime | grep ^c-lime | awk '{print $2}' `
|
||||||
|
export MPFR=`spack find --paths mpfr | grep ^mpfr | awk '{print $2}' `
|
||||||
|
export OPENSSL=`spack find --paths openssl | grep openssl | awk '{print $2}' `
|
||||||
|
export GMP=`spack find --paths gmp | grep ^gmp | awk '{print $2}' `
|
||||||
|
|
||||||
|
module load cce/20.0.0
|
||||||
|
module load cpe/25.09
|
||||||
|
module load rocm/6.4.0
|
||||||
|
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
|
||||||
|
export LD_LIBRARY_PATH=/opt/rocm-6.4.0/lib/llvm/lib/:$LD_LIBRARY_PATH
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
echo spack
|
||||||
|
. /autofs/nccs-svm1_home1/paboyle/spack/share/spack/setup-env.sh
|
||||||
|
|
||||||
|
|
||||||
|
module load cce/21.0.0
|
||||||
|
module load cpe/26.03
|
||||||
|
module load rocm/7.0.2
|
||||||
|
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
|
||||||
|
export LD_LIBRARY_PATH=/opt/rocm-7.0.2/lib/llvm/lib/:$LD_LIBRARY_PATH
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
echo spack
|
||||||
|
. /autofs/nccs-svm1_home1/paboyle/spack/share/spack/setup-env.sh
|
||||||
|
|
||||||
|
export CLIME=`spack find --paths c-lime | grep ^c-lime | awk '{print $2}' `
|
||||||
|
export MPFR=`spack find --paths mpfr | grep ^mpfr | awk '{print $2}' `
|
||||||
|
export OPENSSL=`spack find --paths openssl | grep openssl | awk '{print $2}' `
|
||||||
|
export GMP=`spack find --paths gmp | grep ^gmp | awk '{print $2}' `
|
||||||
|
|
||||||
|
module load cce/21.0.0
|
||||||
|
module load cpe/26.03
|
||||||
|
module load rocm/7.2.0
|
||||||
|
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
|
||||||
|
export LD_LIBRARY_PATH=/opt/rocm-7.2.0/lib/llvm/lib/:$LD_LIBRARY_PATH
|
||||||
Reference in new issue
Block a user