1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Merge branch 'develop' into bugfix/ET_go_home

* develop:
  SYCL prep - no sycl just make it compile through DPC++
  dpc++ didn't like rdtsc()
  Make compile if HAVE_LIME=0
  Lime optional
This commit is contained in:
Michael Marshall 2020-05-05 22:35:04 +01:00
commit c1e57d4357
6 changed files with 26 additions and 5 deletions

View File

@ -22,8 +22,18 @@
#undef __CUDACC__
#undef __CUDA_ARCH__
#define __NVCC__REDEFINE__
#endif
/* SYCL save and restore compile environment*/
#ifdef __SYCL_DEVICE_ONLY__
#pragma push
#pragma push_macro("__SYCL_DEVICE_ONLY__")
#undef __SYCL_DEVICE_ONLY__
#undef EIGEN_USE_SYCL
#define EIGEN_DONT_VECTORIZE
#endif
#include <Grid/Eigen/Dense>
#include <Grid/Eigen/unsupported/CXX11/Tensor>
@ -35,7 +45,14 @@
#pragma pop
#endif
/*SYCL restore*/
#ifdef __SYCL__REDEFINE__
#pragma pop_macro("__SYCL_DEVICE_ONLY__")
#pragma pop
#endif
#if defined __GNUC__
#pragma GCC diagnostic pop
#endif

View File

@ -95,7 +95,8 @@ inline uint64_t cyclecount(void){
}
#elif defined __x86_64__
inline uint64_t cyclecount(void){
return __rdtsc();
uint64_t ret = __rdtsc();
return (uint64_t)ret;
}
#else

View File

@ -14,6 +14,7 @@ std::string filestem(const int l)
int main (int argc, char ** argv)
{
#ifdef HAVE_LIME
Grid_init(&argc,&argv);
int64_t threads = GridThread::GetThreads();
@ -42,6 +43,6 @@ int main (int argc, char ** argv)
}
Grid_finalize();
#endif
return EXIT_SUCCESS;
}

View File

@ -2,7 +2,7 @@
#define Benchmark_IO_hpp_
#include <Grid/Grid.h>
#ifdef HAVE_LIME
#define MSG std::cout << GridLogMessage
#define SEP \
"============================================================================="
@ -104,4 +104,5 @@ void readBenchmark(const Coordinate &latt, const std::string filename,
}
#endif //LIME
#endif // Benchmark_IO_hpp_

View File

@ -8,6 +8,7 @@ using namespace Grid;
int main (int argc, char ** argv)
{
#ifdef HAVE_LIME
std::vector<std::string> dir;
unsigned int Ls;
bool rb;
@ -73,6 +74,6 @@ int main (int argc, char ** argv)
}
Grid_finalize();
#endif
return EXIT_SUCCESS;
}

View File

@ -226,7 +226,7 @@ AC_SEARCH_LIBS([fftw_execute], [fftw3],
AC_SEARCH_LIBS([limeCreateReader], [lime],
[AC_DEFINE([HAVE_LIME], [1], [Define to 1 if you have the `LIME' library])]
[have_lime=true],
[AC_MSG_ERROR(LIME library was not found in your system.)])
[AC_MSG_WARN(LIME library was not found in your system.)])
AC_SEARCH_LIBS([SHA256_Init], [crypto],
[AC_DEFINE([HAVE_CRYPTO], [1], [Define to 1 if you have the `OpenSSL' library])]