From d60a80c098d7565f5d28f8e2272035ec2b716955 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 29 Apr 2025 18:04:23 -0400 Subject: [PATCH] Fixes and visualisation --- Grid/communicator/SharedMemoryNone.cc | 8 ++++---- systems/mac-arm/config-command-mpi | 2 -- visualisation/FieldDensityAnimate.cxx | 11 +++++++---- visualisation/cmake-command | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Grid/communicator/SharedMemoryNone.cc b/Grid/communicator/SharedMemoryNone.cc index 198a59d2..dc8274f3 100644 --- a/Grid/communicator/SharedMemoryNone.cc +++ b/Grid/communicator/SharedMemoryNone.cc @@ -122,10 +122,10 @@ void GlobalSharedMemory::SharedMemoryZero(void *dest,size_t bytes) { acceleratorMemSet(dest,0,bytes); } -void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes) -{ - acceleratorCopyToDevice(src,dest,bytes); -} +//void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes) +//{ +// acceleratorCopyToDevice(src,dest,bytes); +//} //////////////////////////////////////////////////////// // Global shared functionality finished // Now move to per communicator functionality diff --git a/systems/mac-arm/config-command-mpi b/systems/mac-arm/config-command-mpi index 34f4229b..bb261fe6 100644 --- a/systems/mac-arm/config-command-mpi +++ b/systems/mac-arm/config-command-mpi @@ -7,8 +7,6 @@ CXX=mpicxx ../../configure \ --enable-unified=yes \ --prefix /Users/peterboyle/QCD/vtk/Grid/install \ --with-lime=$CLIME \ - --with-hdf5=$HDF5 \ - --with-fftw=$FFTW \ --with-openssl=$OPENSSL \ --with-gmp=$GMP \ --with-mpfr=$MPFR \ diff --git a/visualisation/FieldDensityAnimate.cxx b/visualisation/FieldDensityAnimate.cxx index 825bb626..544a6f4e 100644 --- a/visualisation/FieldDensityAnimate.cxx +++ b/visualisation/FieldDensityAnimate.cxx @@ -48,15 +48,14 @@ typedef vtkMarchingCubes isosurface; int mpeg = 0 ; int xlate = 0 ; +int framerate = 10; template void readFile(T& out, std::string const fname){ -#ifdef HAVE_LIME Grid::emptyUserRecord record; Grid::ScidacReader RD; RD.open(fname); RD.readScidacFieldRecord(out,record); RD.close(); -#endif } using namespace Grid; @@ -208,6 +207,10 @@ int main(int argc, char* argv[]) xlate = 1; } + if( GridCmdOptionExists(argv,argv+argc,"--fps") ){ + arg=GridCmdOptionPayload(argv,argv+argc,"--fps"); + GridCmdOptionInt(arg,framerate); + } if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){ arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface"); GridCmdOptionFloat(arg,default_contour); @@ -420,7 +423,7 @@ int main(int argc, char* argv[]) vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New(); writer->SetFileName("movie.avi"); - writer->SetRate(1); + writer->SetRate(framerate); writer->SetInputConnection(imageFilter->GetOutputPort()); writer->Start(); @@ -477,7 +480,7 @@ int main(int argc, char* argv[]) slidercallback->fu_list = fu_list; sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback); - int timerId = iren->CreateRepeatingTimer(300); + int timerId = iren->CreateRepeatingTimer(1000/framerate); std::cout << "timerId: " << timerId << std::endl; // Start the interaction and timer diff --git a/visualisation/cmake-command b/visualisation/cmake-command index d19afbad..40c2d4f6 100644 --- a/visualisation/cmake-command +++ b/visualisation/cmake-command @@ -2,8 +2,9 @@ libs=`grid-config --libs` ldflags=`grid-config --ldflags` cxxflags=`grid-config --cxxflags` cxx=`grid-config --cxx` +cc=clang mkdir 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