Compare commits

...
6 Commits
Author SHA1 Message Date
Peter Boyle b517e88db3 Update README 2025-05-13 16:49:21 -04:00
paboyle bb317aba8d Lattice = for sycl 2025-05-13 12:50:58 +00:00
paboyle 644cc6647e JSON update 2025-05-13 12:50:58 +00:00
paboyle 72397ce23b SYCL interface change 2025-05-13 12:50:58 +00:00
Peter Boyle d60a80c098 Fixes and visualisation 2025-04-29 18:04:23 -04:00
Peter Boyle bb8b6d9d73 Fix 2025-04-29 18:04:04 -04:00
8 changed files with 6359 additions and 2853 deletions

No files matched your search

+4 -4
View File
@@ -122,10 +122,10 @@ void GlobalSharedMemory::SharedMemoryZero(void *dest,size_t bytes)
{ {
acceleratorMemSet(dest,0,bytes); acceleratorMemSet(dest,0,bytes);
} }
void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes) //void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes)
{ //{
acceleratorCopyToDevice(src,dest,bytes); // acceleratorCopyToDevice(src,dest,bytes);
} //}
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
// Global shared functionality finished // Global shared functionality finished
// Now move to per communicator functionality // Now move to per communicator functionality
+6328 -2839
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -236,7 +236,7 @@ public:
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){ template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
vobj vtmp; vobj vtmp;
vtmp = r; vtmp = r;
#if 0 #if 1
deviceVector<vobj> vvtmp(1); deviceVector<vobj> vvtmp(1);
acceleratorPut(vvtmp[0],vtmp); acceleratorPut(vvtmp[0],vtmp);
vobj *vvtmp_p = & vvtmp[0]; vobj *vvtmp_p = & vvtmp[0];
+2 -2
View File
@@ -251,7 +251,7 @@ inline void acceleratorCopyToDevice(const void *from,void *to,size_t bytes) { c
inline void acceleratorCopyFromDevice(const void *from,void *to,size_t bytes){ cudaMemcpy(to,from,bytes, cudaMemcpyDeviceToHost);} inline void acceleratorCopyFromDevice(const void *from,void *to,size_t bytes){ cudaMemcpy(to,from,bytes, cudaMemcpyDeviceToHost);}
inline void acceleratorMemSet(void *base,int value,size_t bytes) { cudaMemset(base,value,bytes);} inline void acceleratorMemSet(void *base,int value,size_t bytes) { cudaMemset(base,value,bytes);}
inline acceleratorEvent_t acceleratorCopyToDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) { inline acceleratorEvent_t acceleratorCopyToDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
acceleratorCopyToDevice(to,from,bytes, cudaMemcpyHostToDevice); acceleratorCopyToDevice(from,to,bytes);
return 0; return 0;
} }
inline acceleratorEvent_t acceleratorCopyFromDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) { inline acceleratorEvent_t acceleratorCopyFromDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
@@ -337,7 +337,7 @@ accelerator_inline int acceleratorSIMTlane(int Nsimd) {
cgh.parallel_for( \ cgh.parallel_for( \
sycl::nd_range<3>(global,local), \ sycl::nd_range<3>(global,local), \
[=] (sycl::nd_item<3> item) /*mutable*/ \ [=] (sycl::nd_item<3> item) /*mutable*/ \
[[intel::reqd_sub_group_size(16)]] \ [[sycl::reqd_sub_group_size(16)]] \
{ \ { \
auto iter1 = item.get_global_id(0); \ auto iter1 = item.get_global_id(0); \
auto iter2 = item.get_global_id(1); \ auto iter2 = item.get_global_id(1); \
-2
View File
@@ -7,8 +7,6 @@ CXX=mpicxx ../../configure \
--enable-unified=yes \ --enable-unified=yes \
--prefix /Users/peterboyle/QCD/vtk/Grid/install \ --prefix /Users/peterboyle/QCD/vtk/Grid/install \
--with-lime=$CLIME \ --with-lime=$CLIME \
--with-hdf5=$HDF5 \
--with-fftw=$FFTW \
--with-openssl=$OPENSSL \ --with-openssl=$OPENSSL \
--with-gmp=$GMP \ --with-gmp=$GMP \
--with-mpfr=$MPFR \ --with-mpfr=$MPFR \
+7 -4
View File
@@ -48,15 +48,14 @@ typedef vtkMarchingCubes isosurface;
int mpeg = 0 ; int mpeg = 0 ;
int xlate = 0 ; int xlate = 0 ;
int framerate = 10;
template <class T> void readFile(T& out, std::string const fname){ template <class T> void readFile(T& out, std::string const fname){
#ifdef HAVE_LIME
Grid::emptyUserRecord record; Grid::emptyUserRecord record;
Grid::ScidacReader RD; Grid::ScidacReader RD;
RD.open(fname); RD.open(fname);
RD.readScidacFieldRecord(out,record); RD.readScidacFieldRecord(out,record);
RD.close(); RD.close();
#endif
} }
using namespace Grid; using namespace Grid;
@@ -208,6 +207,10 @@ int main(int argc, char* argv[])
xlate = 1; xlate = 1;
} }
if( GridCmdOptionExists(argv,argv+argc,"--fps") ){
arg=GridCmdOptionPayload(argv,argv+argc,"--fps");
GridCmdOptionInt(arg,framerate);
}
if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){ if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){
arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface"); arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface");
GridCmdOptionFloat(arg,default_contour); GridCmdOptionFloat(arg,default_contour);
@@ -420,7 +423,7 @@ int main(int argc, char* argv[])
vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New(); vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New();
writer->SetFileName("movie.avi"); writer->SetFileName("movie.avi");
writer->SetRate(1); writer->SetRate(framerate);
writer->SetInputConnection(imageFilter->GetOutputPort()); writer->SetInputConnection(imageFilter->GetOutputPort());
writer->Start(); writer->Start();
@@ -477,7 +480,7 @@ int main(int argc, char* argv[])
slidercallback->fu_list = fu_list; slidercallback->fu_list = fu_list;
sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback); sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback);
int timerId = iren->CreateRepeatingTimer(300); int timerId = iren->CreateRepeatingTimer(1000/framerate);
std::cout << "timerId: " << timerId << std::endl; std::cout << "timerId: " << timerId << std::endl;
// Start the interaction and timer // Start the interaction and timer
+15
View File
@@ -73,6 +73,21 @@ each to:
VTK really should make it easier to pick up the flags required for FFMPEG linkage, especially as they are very quirky on MacOS. VTK really should make it easier to pick up the flags required for FFMPEG linkage, especially as they are very quirky on MacOS.
========================================
Aurora compilation:
========================================
module load ffmpeg
download & untar: VTK-7.0.2
mkdir build
cd build
ccmake ../
"t"
Enable: VTK_MODULE_ENABLE_VTK_IOFFMPEG YES
"configure" ; should "discover" the installed ffmpeg module
Still need an "X" connection to make the MPEG files.
======================================== ========================================
Grid: Grid:
+2 -1
View File
@@ -2,8 +2,9 @@ libs=`grid-config --libs`
ldflags=`grid-config --ldflags` ldflags=`grid-config --ldflags`
cxxflags=`grid-config --cxxflags` cxxflags=`grid-config --cxxflags`
cxx=`grid-config --cxx` cxx=`grid-config --cxx`
cc=clang
mkdir build mkdir build
cd build cd build
LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_C_COMPILER=$cc -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags