From fc897512a029cee3a57b299c9dd4b93ab6bbff02 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Wed, 6 Dec 2023 11:13:34 -0500 Subject: [PATCH 01/89] Initial conversion of all FFT_ settings in the KOKKOS subdirectory to FFT_KOKKOS_ --- src/KOKKOS/fft3d_kokkos.cpp | 84 ++++++++++++++++++------------------ src/KOKKOS/fft3d_kokkos.h | 10 ++--- src/KOKKOS/fftdata_kokkos.h | 86 ++++++++++++++++++------------------- src/KOKKOS/pppm_kokkos.cpp | 4 +- src/KOKKOS/pppm_kokkos.h | 32 +++++++------- 5 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 82e4140f77..ca3d18e11a 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -44,20 +44,20 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int int ngpus = lmp->kokkos->ngpus; ExecutionSpace execution_space = ExecutionSpaceFromDevice::space; -#if defined(FFT_MKL) +#if defined(FFT_KOKKOS_MKL) if (ngpus > 0 && execution_space == Device) lmp->error->all(FLERR,"Cannot use the MKL library with Kokkos on GPUs"); -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) if (ngpus > 0 && execution_space == Device) lmp->error->all(FLERR,"Cannot use the FFTW library with Kokkos on GPUs"); -#elif defined(FFT_CUFFT) +#elif defined(FFT_KOKKOS_CUFFT) if (ngpus > 0 && execution_space == Host) lmp->error->all(FLERR,"Cannot use the cuFFT library with Kokkos on the host CPUs"); -#elif defined(FFT_HIPFFT) +#elif defined(FFT_KOKKOS_HIPFFT) if (ngpus > 0 && execution_space == Host) lmp->error->all(FLERR,"Cannot use the hipFFT library with Kokkos on the host CPUs"); -#elif defined(FFT_KISSFFT) +#elif defined(FFT_KOKKOS_KISSFFT) // The compiler can't statically determine the stack size needed for // recursive function calls in KISS FFT and the default per-thread // stack size on GPUs needs to be increased to prevent stack overflows @@ -149,20 +149,20 @@ public: KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { -#if defined(FFT_FFTW3) || defined(FFT_CUFFT) || defined(FFT_HIPFFT) +#if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT) FFT_SCALAR* out_ptr = (FFT_SCALAR *)(d_out.data()+i); *(out_ptr++) *= norm; *(out_ptr++) *= norm; -#elif defined(FFT_MKL) +#elif defined(FFT_KOKKOS_MKL) d_out(i) *= norm; -#else // FFT_KISS +#else // FFT_KOKKOS_KISS d_out(i).re *= norm; d_out(i).im *= norm; #endif } }; -#ifdef FFT_KISSFFT +#ifdef FFT_KOKKOS_KISSFFT template struct kiss_fft_functor { public: @@ -219,19 +219,19 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, total = plan->total1; length = plan->length1; - #if defined(FFT_MKL) + #if defined(FFT_KOKKOS_MKL) if (flag == 1) DftiComputeForward(plan->handle_fast,d_data.data()); else DftiComputeBackward(plan->handle_fast,d_data.data()); - #elif defined(FFT_FFTW3) + #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); else FFTW_API(execute_dft)(plan->plan_fast_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - #elif defined(FFT_CUFFT) + #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); - #elif defined(FFT_HIPFFT) + #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); #else typename FFT_AT::t_FFT_DATA_1d d_tmp = @@ -265,19 +265,19 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, total = plan->total2; length = plan->length2; - #if defined(FFT_MKL) + #if defined(FFT_KOKKOS_MKL) if (flag == 1) DftiComputeForward(plan->handle_mid,d_data.data()); else DftiComputeBackward(plan->handle_mid,d_data.data()); - #elif defined(FFT_FFTW3) + #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); else FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - #elif defined(FFT_CUFFT) + #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); - #elif defined(FFT_HIPFFT) + #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); #else d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); @@ -309,19 +309,19 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, total = plan->total3; length = plan->length3; - #if defined(FFT_MKL) + #if defined(FFT_KOKKOS_MKL) if (flag == 1) DftiComputeForward(plan->handle_slow,d_data.data()); else DftiComputeBackward(plan->handle_slow,d_data.data()); - #elif defined(FFT_FFTW3) + #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); else FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - #elif defined(FFT_CUFFT) + #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); - #elif defined(FFT_HIPFFT) + #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); @@ -609,46 +609,46 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl // system specific pre-computation of 1d FFT coeffs // and scaling normalization -#if defined(FFT_MKL) - DftiCreateDescriptor( &(plan->handle_fast), FFT_MKL_PREC, DFTI_COMPLEX, 1, +#if defined(FFT_KOKKOS_MKL) + DftiCreateDescriptor( &(plan->handle_fast), FFT_KOKKOS_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nfast); DftiSetValue(plan->handle_fast, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total1/nfast); DftiSetValue(plan->handle_fast, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_fast, DFTI_INPUT_DISTANCE, (MKL_LONG)nfast); DftiSetValue(plan->handle_fast, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nfast); -#if defined(FFT_MKL_THREADS) +#if defined(FFT_KOKKOS_MKL_THREADS) DftiSetValue(plan->handle_fast, DFTI_NUMBER_OF_USER_THREADS, nthreads); #endif DftiCommitDescriptor(plan->handle_fast); - DftiCreateDescriptor( &(plan->handle_mid), FFT_MKL_PREC, DFTI_COMPLEX, 1, + DftiCreateDescriptor( &(plan->handle_mid), FFT_KOKKOS_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nmid); DftiSetValue(plan->handle_mid, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total2/nmid); DftiSetValue(plan->handle_mid, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_mid, DFTI_INPUT_DISTANCE, (MKL_LONG)nmid); DftiSetValue(plan->handle_mid, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nmid); -#if defined(FFT_MKL_THREADS) +#if defined(FFT_KOKKOS_MKL_THREADS) DftiSetValue(plan->handle_mid, DFTI_NUMBER_OF_USER_THREADS, nthreads); #endif DftiCommitDescriptor(plan->handle_mid); - DftiCreateDescriptor( &(plan->handle_slow), FFT_MKL_PREC, DFTI_COMPLEX, 1, + DftiCreateDescriptor( &(plan->handle_slow), FFT_KOKKOS_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nslow); DftiSetValue(plan->handle_slow, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total3/nslow); DftiSetValue(plan->handle_slow, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_slow, DFTI_INPUT_DISTANCE, (MKL_LONG)nslow); DftiSetValue(plan->handle_slow, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nslow); -#if defined(FFT_MKL_THREADS) +#if defined(FFT_KOKKOS_MKL_THREADS) DftiSetValue(plan->handle_slow, DFTI_NUMBER_OF_USER_THREADS, nthreads); #endif DftiCommitDescriptor(plan->handle_slow); -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) -#if defined (FFT_FFTW_THREADS) +#if defined (FFT_KOKKOS_FFTW_THREADS) if (nthreads > 1) { FFTW_API(init_threads)(); FFTW_API(plan_with_nthreads)(nthreads); @@ -692,7 +692,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl nullptr,&nslow,1,plan->length3, FFTW_BACKWARD,FFTW_ESTIMATE); -#elif defined(FFT_CUFFT) +#elif defined(FFT_KOKKOS_CUFFT) cufftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, @@ -709,7 +709,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl &nslow,1,plan->length3, CUFFT_TYPE,plan->total3/plan->length3); -#elif defined(FFT_HIPFFT) +#elif defined(FFT_KOKKOS_HIPFFT) hipfftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, @@ -726,7 +726,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl &nslow,1,plan->length3, HIPFFT_TYPE,plan->total3/plan->length3); -#else /* FFT_KISS */ +#else /* FFT_KOKKOS_KISS */ kissfftKK = new KissFFTKokkos(); @@ -781,11 +781,11 @@ void FFT3dKokkos::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk if (plan->mid2_plan) remapKK->remap_3d_destroy_plan_kokkos(plan->mid2_plan); if (plan->post_plan) remapKK->remap_3d_destroy_plan_kokkos(plan->post_plan); -#if defined(FFT_MKL) +#if defined(FFT_KOKKOS_MKL) DftiFreeDescriptor(&(plan->handle_fast)); DftiFreeDescriptor(&(plan->handle_mid)); DftiFreeDescriptor(&(plan->handle_slow)); -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) FFTW_API(destroy_plan)(plan->plan_slow_forward); FFTW_API(destroy_plan)(plan->plan_slow_backward); FFTW_API(destroy_plan)(plan->plan_mid_forward); @@ -793,11 +793,11 @@ void FFT3dKokkos::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk FFTW_API(destroy_plan)(plan->plan_fast_forward); FFTW_API(destroy_plan)(plan->plan_fast_backward); -#if defined (FFT_FFTW_THREADS) +#if defined (FFT_KOKKOS_FFTW_THREADS) FFTW_API(cleanup_threads)(); #endif -#elif defined (FFT_KISSFFT) +#elif defined (FFT_KOKKOS_KISSFFT) delete kissfftKK; #endif @@ -855,7 +855,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ // fftw3 and Dfti in MKL encode the number of transforms // into the plan, so we cannot operate on a smaller data set -#if defined(FFT_MKL) || defined(FFT_FFTW3) +#if defined(FFT_KOKKOS_MKL) || defined(FFT_KOKKOS_FFTW3) if ((total1 > nsize) || (total2 > nsize) || (total3 > nsize)) return; #endif @@ -866,7 +866,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ // perform 1d FFTs in each of 3 dimensions // data is just an array of 0.0 -#if defined(FFT_MKL) +#if defined(FFT_KOKKOS_MKL) if (flag == -1) { DftiComputeForward(plan->handle_fast,d_data.data()); DftiComputeForward(plan->handle_mid,d_data.data()); @@ -876,7 +876,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ DftiComputeBackward(plan->handle_mid,d_data.data()); DftiComputeBackward(plan->handle_slow,d_data.data()); } -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) if (flag == -1) { FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); @@ -886,11 +886,11 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); } -#elif defined(FFT_CUFFT) +#elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); cufftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); cufftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); -#elif defined(FFT_HIPFFT) +#elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); hipfftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index a0489f69bb..ed49c4b1ee 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -45,22 +45,22 @@ struct fft_plan_3d_kokkos { double norm; // normalization factor for rescaling // system specific 1d FFT info -#if defined(FFT_MKL) +#if defined(FFT_KOKKOS_MKL) DFTI_DESCRIPTOR *handle_fast; DFTI_DESCRIPTOR *handle_mid; DFTI_DESCRIPTOR *handle_slow; -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) FFTW_API(plan) plan_fast_forward; FFTW_API(plan) plan_fast_backward; FFTW_API(plan) plan_mid_forward; FFTW_API(plan) plan_mid_backward; FFTW_API(plan) plan_slow_forward; FFTW_API(plan) plan_slow_backward; -#elif defined(FFT_CUFFT) +#elif defined(FFT_KOKKOS_CUFFT) cufftHandle plan_fast; cufftHandle plan_mid; cufftHandle plan_slow; -#elif defined(FFT_HIPFFT) +#elif defined(FFT_KOKKOS_HIPFFT) hipfftHandle plan_fast; hipfftHandle plan_mid; hipfftHandle plan_slow; @@ -92,7 +92,7 @@ class FFT3dKokkos : protected Pointers { struct fft_plan_3d_kokkos *plan; RemapKokkos *remapKK; -#ifdef FFT_KISSFFT +#ifdef FFT_KOKKOS_KISSFFT KissFFTKokkos *kissfftKK; #endif diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index a3812a1cf0..bed2c7faf0 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -29,10 +29,10 @@ // Data types for single-precision complex -#if FFT_PRECISION == 1 -#elif FFT_PRECISION == 2 +#if FFT_KOKKOS_PRECISION == 1 +#elif FFT_KOKKOS_PRECISION == 2 #else -#error "FFT_PRECISION needs to be either 1 (=single) or 2 (=double)" +#error "FFT_KOKKOS_PRECISION needs to be either 1 (=single) or 2 (=double)" #endif @@ -41,70 +41,70 @@ // FFTs here, since they may be valid in fft3d.cpp #ifdef KOKKOS_ENABLE_CUDA -# if defined(FFT_FFTW) -# undef FFT_FFTW +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW # endif -# if defined(FFT_FFTW3) -# undef FFT_FFTW3 +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 # endif -# if defined(FFT_MKL) -# undef FFT_MKL +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_CUFFT) && !defined(FFT_KISSFFT) -# define FFT_KISSFFT +# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT # endif #elif defined(KOKKOS_ENABLE_HIP) -# if defined(FFT_FFTW) -# undef FFT_FFTW +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW # endif -# if defined(FFT_FFTW3) -# undef FFT_FFTW3 +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 # endif -# if defined(FFT_MKL) -# undef FFT_MKL +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_HIPFFT) && !defined(FFT_KISSFFT) -# define FFT_KISSFFT +# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT # endif #else -# if defined(FFT_CUFFT) -# error "Must enable CUDA with KOKKOS to use -DFFT_CUFFT" +# if defined(FFT_KOKKOS_CUFFT) +# error "Must enable CUDA with KOKKOS to use -DFFT_KOKKOS_CUFFT" # endif -# if defined(FFT_HIPFFT) -# error "Must enable HIP with KOKKOS to use -DFFT_HIPFFT" +# if defined(FFT_KOKKOS_HIPFFT) +# error "Must enable HIP with KOKKOS to use -DFFT_KOKKOS_HIPFFT" # endif // if user set FFTW, it means FFTW3 -# ifdef FFT_FFTW -# define FFT_FFTW3 +# ifdef FFT_KOKKOS_FFTW +# define FFT_KOKKOS_FFTW3 # endif -# ifdef FFT_FFTW_THREADS -# if !defined(FFT_FFTW3) -# error "Must use -DFFT_FFTW3 with -DFFT_FFTW_THREADS" +# ifdef FFT_KOKKOS_FFTW_THREADS +# if !defined(FFT_KOKKOS_FFTW3) +# error "Must use -DFFT_KOKKOS_FFTW3 with -DFFT_KOKKOS_FFTW_THREADS" # endif # endif #endif -#if defined(FFT_MKL) +#if defined(FFT_KOKKOS_MKL) #include "mkl_dfti.h" - #if defined(FFT_SINGLE) + #if defined(FFT_KOKKOS_SINGLE) typedef float _Complex FFT_DATA; - #define FFT_MKL_PREC DFTI_SINGLE + #define FFT_KOKKOS_MKL_PREC DFTI_SINGLE #else typedef double _Complex FFT_DATA; - #define FFT_MKL_PREC DFTI_DOUBLE + #define FFT_KOKKOS_MKL_PREC DFTI_DOUBLE #endif -#elif defined(FFT_FFTW3) +#elif defined(FFT_KOKKOS_FFTW3) #include "fftw3.h" - #if defined(FFT_SINGLE) + #if defined(FFT_KOKKOS_SINGLE) typedef fftwf_complex FFT_DATA; #define FFTW_API(function) fftwf_ ## function #else typedef fftw_complex FFT_DATA; #define FFTW_API(function) fftw_ ## function #endif -#elif defined(FFT_CUFFT) +#elif defined(FFT_KOKKOS_CUFFT) #include "cufft.h" - #if defined(FFT_SINGLE) + #if defined(FFT_KOKKOS_SINGLE) #define cufftExec cufftExecC2C #define CUFFT_TYPE CUFFT_C2C typedef cufftComplex FFT_DATA; @@ -113,9 +113,9 @@ #define CUFFT_TYPE CUFFT_Z2Z typedef cufftDoubleComplex FFT_DATA; #endif -#elif defined(FFT_HIPFFT) +#elif defined(FFT_KOKKOS_HIPFFT) #include - #if defined(FFT_SINGLE) + #if defined(FFT_KOKKOS_SINGLE) #define hipfftExec hipfftExecC2C #define HIPFFT_TYPE HIPFFT_C2C typedef hipfftComplex FFT_DATA; @@ -125,7 +125,7 @@ typedef hipfftDoubleComplex FFT_DATA; #endif #else - #if defined(FFT_SINGLE) + #if defined(FFT_KOKKOS_SINGLE) #define kiss_fft_scalar float #else #define kiss_fft_scalar double @@ -134,13 +134,13 @@ kiss_fft_scalar re; kiss_fft_scalar im; } FFT_DATA; - #ifndef FFT_KISSFFT - #define FFT_KISSFFT + #ifndef FFT_KOKKOS_KISSFFT + #define FFT_KOKKOS_KISSFFT #endif #endif // (double[2]*) is not a 1D pointer -#if defined(FFT_FFTW3) +#if defined(FFT_KOKKOS_FFTW3) typedef FFT_SCALAR* FFT_DATA_POINTER; #else typedef FFT_DATA* FFT_DATA_POINTER; @@ -216,7 +216,7 @@ typedef struct FFTArrayTypes FFT_DAT; typedef struct FFTArrayTypes FFT_HAT; -#if defined(FFT_KISSFFT) +#if defined(FFT_KOKKOS_KISSFFT) #include "kissfft_kokkos.h" // uses t_FFT_DATA_1d, needs to come last #endif diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 912ae36f6f..17a9c82bdb 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -48,7 +48,7 @@ using namespace MathSpecialKokkos; enum{REVERSE_RHO}; enum{FORWARD_IK,FORWARD_IK_PERATOM}; -#ifdef FFT_SINGLE +#ifdef FFT_KOKKOS_SINGLE #define ZEROF 0.0f #define ONEF 1.0f #else @@ -2390,7 +2390,7 @@ void PPPMKokkos::compute_rho_coeff() s = 0.0; for (l = 0; l < j; l++) { a[l+1][k+order] = (a[l][k+1+order]-a[l][k-1+order]) / (l+1); -#ifdef FFT_SINGLE +#ifdef FFT_KOKKOS_SINGLE s += powf(0.5,(float) l+1) * (a[l][k-1+order] + powf(-1.0,(float) l) * a[l][k+1+order]) / (l+1); #else diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index d621313873..14d4670dbd 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -36,30 +36,30 @@ KSpaceStyle(pppm/kk/host,PPPMKokkos); // fix up FFT defines for KOKKOS with CUDA and HIP #ifdef KOKKOS_ENABLE_CUDA -# if defined(FFT_FFTW) -# undef FFT_FFTW +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW # endif -# if defined(FFT_FFTW3) -# undef FFT_FFTW3 +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 # endif -# if defined(FFT_MKL) -# undef FFT_MKL +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_CUFFT) && !defined(FFT_KISSFFT) -# define FFT_KISSFFT +# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT # endif #elif defined(KOKKOS_ENABLE_HIP) -# if defined(FFT_FFTW) -# undef FFT_FFTW +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW # endif -# if defined(FFT_FFTW3) -# undef FFT_FFTW3 +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 # endif -# if defined(FFT_MKL) -# undef FFT_MKL +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_HIPFFT) && !defined(FFT_KISSFFT) -# define FFT_KISSFFT +# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT # endif #endif From 0e98e706c69881f5562ce12285f80687ac8baf6c Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Wed, 6 Dec 2023 11:49:54 -0500 Subject: [PATCH 02/89] Added LMPFFT settings for Kokkos-specific FFTs --- src/KOKKOS/lmpfftsettings_kokkos.h | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/KOKKOS/lmpfftsettings_kokkos.h diff --git a/src/KOKKOS/lmpfftsettings_kokkos.h b/src/KOKKOS/lmpfftsettings_kokkos.h new file mode 100644 index 0000000000..148e001de3 --- /dev/null +++ b/src/KOKKOS/lmpfftsettings_kokkos.h @@ -0,0 +1,54 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +// common FFT library related defines and compilation settings + +#ifndef LMP_FFT_KOKKOS_SETTINGS_H +#define LMP_FFT_KOKKOS_SETTINGS_H + +// if user set FFTW, it means FFTW3 + +#ifdef FFT_KOKKOS_FFTW +#ifndef FFT_KOKKOS_FFTW3 +#define FFT_KOKKOS_FFTW3 +#endif +#endif + +// set strings for library info output + +#if defined(FFT_KOKKOS_FFTW3) +#define LMP_FFT_KOKKOS_LIB "FFTW3" +#elif defined(FFT_KOKKOS_MKL) +#define LMP_FFT_KOKKOS_LIB "MKL FFT" +#elif defined(FFT_KOKKOS_CUFFT) +#define LMP_FFT_KOKKOS_LIB "cuFFT" +#elif defined(FFT_KOKKOS_HIPFFT) +#define LMP_FFT_KOKKOS_LIB "hipFFT" +#else +#define LMP_FFT_KOKKOS_LIB "KISS FFT" +#endif + +#ifdef FFT_KOKKOS_SINGLE +typedef float FFT_KOKKOS_SCALAR; +#define FFT_KOKKOS_PRECISION 1 +#define LMP_FFT_KOKKOS_PREC "single" +#define MPI_FFT_KOKKOS_SCALAR MPI_FLOAT +#else + +typedef double FFT_KOKKOS_SCALAR; +#define FFT_KOKKOS_PRECISION 2 +#define LMP_FFT_KOKKOS_PREC "double" +#define MPI_FFT_KOKKOS_SCALAR MPI_DOUBLE +#endif + +#endif From 48ef968dd21c4e474fdbf927a89b0585f5235568 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Wed, 6 Dec 2023 12:01:06 -0500 Subject: [PATCH 03/89] Decoupled all variable typenames from the non-kokkos FFT --- src/KOKKOS/fft3d_kokkos.cpp | 120 +++++++++++++++++------------------ src/KOKKOS/fft3d_kokkos.h | 16 ++--- src/KOKKOS/fftdata_kokkos.h | 90 +++++++++++++------------- src/KOKKOS/grid3d_kokkos.cpp | 28 ++++---- src/KOKKOS/grid3d_kokkos.h | 14 ++-- src/KOKKOS/kissfft_kokkos.h | 76 +++++++++++----------- src/KOKKOS/kokkos_base_fft.h | 12 ++-- src/KOKKOS/pack_kokkos.h | 52 +++++++-------- src/KOKKOS/pppm_kokkos.cpp | 114 ++++++++++++++++----------------- src/KOKKOS/pppm_kokkos.h | 50 +++++++-------- src/KOKKOS/remap_kokkos.cpp | 20 +++--- src/KOKKOS/remap_kokkos.h | 20 +++--- 12 files changed, 306 insertions(+), 306 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index ca3d18e11a..7093136fe6 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -88,10 +88,10 @@ FFT3dKokkos::~FFT3dKokkos() /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::compute(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, int flag) +void FFT3dKokkos::compute(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, int flag) { - typename FFT_AT::t_FFT_DATA_1d d_in_data((FFT_DATA_POINTER)d_in.data(),d_in.size()/2); - typename FFT_AT::t_FFT_DATA_1d d_out_data((FFT_DATA_POINTER)d_out.data(),d_out.size()/2); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_out_data((FFT_KOKKOS_DATA_POINTER)d_out.data(),d_out.size()/2); fft_3d_kokkos(d_in_data,d_out_data,flag,plan); } @@ -99,9 +99,9 @@ void FFT3dKokkos::compute(typename FFT_AT::t_FFT_SCALAR_1d d_in, typ /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::timing1d(typename FFT_AT::t_FFT_SCALAR_1d d_in, int nsize, int flag) +void FFT3dKokkos::timing1d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, int nsize, int flag) { - typename FFT_AT::t_FFT_DATA_1d d_in_data((FFT_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); fft_3d_1d_only_kokkos(d_in_data,nsize,flag,plan); } @@ -140,17 +140,17 @@ template struct norm_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_DATA_1d_um d_out; + typedef FFTArrayTypes FFT_KOKKOS_AT; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_out; int norm; - norm_functor(typename FFT_AT::t_FFT_DATA_1d &d_out_, int norm_): + norm_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_out_, int norm_): d_out(d_out_),norm(norm_) {} KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { #if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT) - FFT_SCALAR* out_ptr = (FFT_SCALAR *)(d_out.data()+i); + FFT_KOKKOS_SCALAR* out_ptr = (FFT_KOKKOS_SCALAR *)(d_out.data()+i); *(out_ptr++) *= norm; *(out_ptr++) *= norm; #elif defined(FFT_KOKKOS_MKL) @@ -167,14 +167,14 @@ template struct kiss_fft_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_DATA_1d_um d_data,d_tmp; + typedef FFTArrayTypes FFT_KOKKOS_AT; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_data,d_tmp; kiss_fft_state_kokkos st; int length; kiss_fft_functor() = default; - kiss_fft_functor(typename FFT_AT::t_FFT_DATA_1d &d_data_,typename FFT_AT::t_FFT_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): + kiss_fft_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_data_,typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): d_data(d_data_), d_tmp(d_tmp_), st(st_) @@ -191,11 +191,11 @@ public: #endif template -void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, typename FFT_AT::t_FFT_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) +void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) { int total,length; - typename FFT_AT::t_FFT_DATA_1d d_data,d_copy; - typename FFT_AT::t_FFT_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_data,d_copy; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; // pre-remap to prepare for 1st FFTs if needed // copy = loc for remap result @@ -204,9 +204,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, if (plan->pre_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_in_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_in.data(),d_in.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_in_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_in.data(),d_in.size()*2); + d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_in_scalar, d_copy_scalar, d_scratch_scalar, plan->pre_plan); @@ -226,16 +226,16 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, DftiComputeBackward(plan->handle_fast,d_data.data()); #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) - FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); else - FFTW_API(execute_dft)(plan->plan_fast_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_fast_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); #else - typename FFT_AT::t_FFT_DATA_1d d_tmp = - typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_tmp = + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); kiss_fft_functor f; if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length); @@ -251,9 +251,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, if (plan->mid1_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid1_plan); @@ -272,15 +272,15 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, DftiComputeBackward(plan->handle_mid,d_data.data()); #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) - FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); else - FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_mid_forward,length); else @@ -295,9 +295,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, if (plan->mid2_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid2_plan); @@ -316,15 +316,15 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, DftiComputeBackward(plan->handle_slow,d_data.data()); #elif defined(FFT_KOKKOS_FFTW3) if (flag == 1) - FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); else - FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_slow_forward,length); else @@ -337,9 +337,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, // destination is always out if (plan->post_plan) { - d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); - d_out_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_out.data(),d_out.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_out_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_out.data(),d_out.size()*2); + d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_out_scalar, d_scratch_scalar, plan->post_plan); @@ -348,7 +348,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, // scaling if required if (flag == -1 && plan->scaled) { - FFT_SCALAR norm = plan->norm; + FFT_KOKKOS_SCALAR norm = plan->norm; int num = plan->normnum; norm_functor f(d_out,norm); @@ -443,7 +443,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl plan->pre_plan = remapKK->remap_3d_create_plan_kokkos(comm,in_ilo,in_ihi,in_jlo,in_jhi,in_klo,in_khi, first_ilo,first_ihi,first_jlo,first_jhi, - first_klo,first_khi,2,0,0,FFT_PRECISION, + first_klo,first_khi,2,0,0,FFT_KOKKOS_PRECISION, usecollective,usecuda_aware); if (plan->pre_plan == nullptr) return nullptr; } @@ -468,7 +468,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl first_ilo,first_ihi,first_jlo,first_jhi, first_klo,first_khi, second_ilo,second_ihi,second_jlo,second_jhi, - second_klo,second_khi,2,1,0,FFT_PRECISION, + second_klo,second_khi,2,1,0,FFT_KOKKOS_PRECISION, usecollective,usecuda_aware); if (plan->mid1_plan == nullptr) return nullptr; @@ -509,7 +509,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl second_jlo,second_jhi,second_klo,second_khi, second_ilo,second_ihi, third_jlo,third_jhi,third_klo,third_khi, - third_ilo,third_ihi,2,1,0,FFT_PRECISION, + third_ilo,third_ihi,2,1,0,FFT_KOKKOS_PRECISION, usecollective,usecuda_aware); if (plan->mid2_plan == nullptr) return nullptr; @@ -537,7 +537,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl third_klo,third_khi,third_ilo,third_ihi, third_jlo,third_jhi, out_klo,out_khi,out_ilo,out_ihi, - out_jlo,out_jhi,2,(permute+1)%3,0,FFT_PRECISION, + out_jlo,out_jhi,2,(permute+1)%3,0,FFT_KOKKOS_PRECISION, usecollective,usecuda_aware); if (plan->post_plan == nullptr) return nullptr; } @@ -599,11 +599,11 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl *nbuf = copy_size + scratch_size; if (copy_size) { - plan->d_copy = typename FFT_AT::t_FFT_DATA_1d("fft3d:copy",copy_size); + plan->d_copy = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("fft3d:copy",copy_size); } if (scratch_size) { - plan->d_scratch = typename FFT_AT::t_FFT_DATA_1d("fft3d:scratch",scratch_size); + plan->d_scratch = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("fft3d:scratch",scratch_size); } // system specific pre-computation of 1d FFT coeffs @@ -697,34 +697,34 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl cufftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, &nfast,1,plan->length1, - CUFFT_TYPE,plan->total1/plan->length1); + CUFFT_KOKKOS_TYPE,plan->total1/plan->length1); cufftPlanMany(&(plan->plan_mid), 1, &nmid, &nmid,1,plan->length2, &nmid,1,plan->length2, - CUFFT_TYPE,plan->total2/plan->length2); + CUFFT_KOKKOS_TYPE,plan->total2/plan->length2); cufftPlanMany(&(plan->plan_slow), 1, &nslow, &nslow,1,plan->length3, &nslow,1,plan->length3, - CUFFT_TYPE,plan->total3/plan->length3); + CUFFT_KOKKOS_TYPE,plan->total3/plan->length3); #elif defined(FFT_KOKKOS_HIPFFT) hipfftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, &nfast,1,plan->length1, - HIPFFT_TYPE,plan->total1/plan->length1); + HIPFFT_KOKKOS_TYPE,plan->total1/plan->length1); hipfftPlanMany(&(plan->plan_mid), 1, &nmid, &nmid,1,plan->length2, &nmid,1,plan->length2, - HIPFFT_TYPE,plan->total2/plan->length2); + HIPFFT_KOKKOS_TYPE,plan->total2/plan->length2); hipfftPlanMany(&(plan->plan_slow), 1, &nslow, &nslow,1,plan->length3, &nslow,1,plan->length3, - HIPFFT_TYPE,plan->total3/plan->length3); + HIPFFT_KOKKOS_TYPE,plan->total3/plan->length3); #else /* FFT_KOKKOS_KISS */ @@ -838,7 +838,7 @@ void FFT3dKokkos::bifactor(int n, int *factor1, int *factor2) ------------------------------------------------------------------------- */ template -void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d d_data, int nsize, int flag, +void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_data, int nsize, int flag, struct fft_plan_3d_kokkos *plan) { // total = size of data needed in each dim @@ -878,13 +878,13 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ } #elif defined(FFT_KOKKOS_FFTW3) if (flag == -1) { - FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); } else { - FFTW_API(execute_dft)(plan->plan_fast_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); - FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_DATA*)d_data.data(),(FFT_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_fast_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_mid_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); + FFTW_API(execute_dft)(plan->plan_slow_backward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data()); } #elif defined(FFT_KOKKOS_CUFFT) cufftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); @@ -896,8 +896,8 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else kiss_fft_functor f; - typename FFT_AT::t_FFT_DATA_1d d_tmp = - typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_tmp = + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == -1) { f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length1); Kokkos::parallel_for(total1/length1,f); @@ -923,7 +923,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ // limit num to size of data if (flag == 1 && plan->scaled) { - FFT_SCALAR norm = plan->norm; + FFT_KOKKOS_SCALAR norm = plan->norm; int num = MIN(plan->normnum,nsize); norm_functor f(d_data,norm); diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index ed49c4b1ee..bb552ec4ef 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -28,14 +28,14 @@ namespace LAMMPS_NS { template struct fft_plan_3d_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; struct remap_plan_3d_kokkos *pre_plan; // remap from input -> 1st FFTs struct remap_plan_3d_kokkos *mid1_plan; // remap from 1st -> 2nd FFTs struct remap_plan_3d_kokkos *mid2_plan; // remap from 2nd -> 3rd FFTs struct remap_plan_3d_kokkos *post_plan; // remap from 3rd FFTs -> output - typename FFT_AT::t_FFT_DATA_1d d_copy; // memory for remap results (if needed) - typename FFT_AT::t_FFT_DATA_1d d_scratch; // scratch space for remaps + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_copy; // memory for remap results (if needed) + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_scratch; // scratch space for remaps int total1,total2,total3; // # of 1st,2nd,3rd FFTs (times length) int length1,length2,length3; // length of 1st,2nd,3rd FFTs int pre_target; // where to put remap results @@ -79,14 +79,14 @@ class FFT3dKokkos : protected Pointers { public: enum{FORWARD=1,BACKWARD=-1}; typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; FFT3dKokkos(class LAMMPS *, MPI_Comm, int,int,int,int,int,int,int,int,int,int,int,int,int,int,int, int,int,int *,int,int); ~FFT3dKokkos() override; - void compute(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, int); - void timing1d(typename FFT_AT::t_FFT_SCALAR_1d, int, int); + void compute(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, int); + void timing1d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, int, int); private: struct fft_plan_3d_kokkos *plan; @@ -96,7 +96,7 @@ class FFT3dKokkos : protected Pointers { KissFFTKokkos *kissfftKK; #endif - void fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d, typename FFT_AT::t_FFT_DATA_1d, int, struct fft_plan_3d_kokkos *); + void fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, int, struct fft_plan_3d_kokkos *); struct fft_plan_3d_kokkos *fft_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, @@ -105,7 +105,7 @@ class FFT3dKokkos : protected Pointers { void fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokkos *); - void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d, int, int, struct fft_plan_3d_kokkos *); + void fft_3d_1d_only_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, int, int, struct fft_plan_3d_kokkos *); void bifactor(int, int *, int *); }; diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index bed2c7faf0..a9ea2de896 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -20,10 +20,10 @@ // data types for 2d/3d FFTs -#ifndef LMP_FFT_DATA_KOKKOS_H -#define LMP_FFT_DATA_KOKKOS_H +#ifndef LMP_FFT_KOKKOS_DATA_H +#define LMP_FFT_KOKKOS_DATA_H -#include "lmpfftsettings.h" +#include "lmpfftsettings_kokkos.h" // ------------------------------------------------------------------------- @@ -87,42 +87,42 @@ #if defined(FFT_KOKKOS_MKL) #include "mkl_dfti.h" #if defined(FFT_KOKKOS_SINGLE) - typedef float _Complex FFT_DATA; + typedef float _Complex FFT_KOKKOS_DATA; #define FFT_KOKKOS_MKL_PREC DFTI_SINGLE #else - typedef double _Complex FFT_DATA; + typedef double _Complex FFT_KOKKOS_DATA; #define FFT_KOKKOS_MKL_PREC DFTI_DOUBLE #endif #elif defined(FFT_KOKKOS_FFTW3) #include "fftw3.h" #if defined(FFT_KOKKOS_SINGLE) - typedef fftwf_complex FFT_DATA; + typedef fftwf_complex FFT_KOKKOS_DATA; #define FFTW_API(function) fftwf_ ## function #else - typedef fftw_complex FFT_DATA; + typedef fftw_complex FFT_KOKKOS_DATA; #define FFTW_API(function) fftw_ ## function #endif #elif defined(FFT_KOKKOS_CUFFT) #include "cufft.h" #if defined(FFT_KOKKOS_SINGLE) #define cufftExec cufftExecC2C - #define CUFFT_TYPE CUFFT_C2C - typedef cufftComplex FFT_DATA; + #define CUFFT_KOKKOS_TYPE CUFFT_KOKKOS_C2C + typedef cufftComplex FFT_KOKKOS_DATA; #else #define cufftExec cufftExecZ2Z - #define CUFFT_TYPE CUFFT_Z2Z - typedef cufftDoubleComplex FFT_DATA; + #define CUFFT_KOKKOS_TYPE CUFFT_KOKKOS_Z2Z + typedef cufftDoubleComplex FFT_KOKKOS_DATA; #endif #elif defined(FFT_KOKKOS_HIPFFT) #include #if defined(FFT_KOKKOS_SINGLE) #define hipfftExec hipfftExecC2C - #define HIPFFT_TYPE HIPFFT_C2C - typedef hipfftComplex FFT_DATA; + #define HIPFFT_KOKKOS_TYPE HIPFFT_KOKKOS_C2C + typedef hipfftComplex FFT_KOKKOS_DATA; #else #define hipfftExec hipfftExecZ2Z - #define HIPFFT_TYPE HIPFFT_Z2Z - typedef hipfftDoubleComplex FFT_DATA; + #define HIPFFT_KOKKOS_TYPE HIPFFT_KOKKOS_Z2Z + typedef hipfftDoubleComplex FFT_KOKKOS_DATA; #endif #else #if defined(FFT_KOKKOS_SINGLE) @@ -133,7 +133,7 @@ typedef struct { kiss_fft_scalar re; kiss_fft_scalar im; - } FFT_DATA; + } FFT_KOKKOS_DATA; #ifndef FFT_KOKKOS_KISSFFT #define FFT_KOKKOS_KISSFFT #endif @@ -141,9 +141,9 @@ // (double[2]*) is not a 1D pointer #if defined(FFT_KOKKOS_FFTW3) - typedef FFT_SCALAR* FFT_DATA_POINTER; + typedef FFT_KOKKOS_SCALAR* FFT_KOKKOS_DATA_POINTER; #else - typedef FFT_DATA* FFT_DATA_POINTER; + typedef FFT_KOKKOS_DATA* FFT_KOKKOS_DATA_POINTER; #endif @@ -154,23 +154,23 @@ template <> struct FFTArrayTypes { typedef Kokkos:: - DualView tdual_FFT_SCALAR_1d; -typedef tdual_FFT_SCALAR_1d::t_dev t_FFT_SCALAR_1d; -typedef tdual_FFT_SCALAR_1d::t_dev_um t_FFT_SCALAR_1d_um; + DualView tdual_FFT_KOKKOS_SCALAR_1d; +typedef tdual_FFT_KOKKOS_SCALAR_1d::t_dev t_FFT_KOKKOS_SCALAR_1d; +typedef tdual_FFT_KOKKOS_SCALAR_1d::t_dev_um t_FFT_KOKKOS_SCALAR_1d_um; -typedef Kokkos::DualView tdual_FFT_SCALAR_2d; -typedef tdual_FFT_SCALAR_2d::t_dev t_FFT_SCALAR_2d; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d; +typedef tdual_FFT_KOKKOS_SCALAR_2d::t_dev t_FFT_KOKKOS_SCALAR_2d; -typedef Kokkos::DualView tdual_FFT_SCALAR_2d_3; -typedef tdual_FFT_SCALAR_2d_3::t_dev t_FFT_SCALAR_2d_3; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d_3; +typedef tdual_FFT_KOKKOS_SCALAR_2d_3::t_dev t_FFT_KOKKOS_SCALAR_2d_3; -typedef Kokkos::DualView tdual_FFT_SCALAR_3d; -typedef tdual_FFT_SCALAR_3d::t_dev t_FFT_SCALAR_3d; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_3d; +typedef tdual_FFT_KOKKOS_SCALAR_3d::t_dev t_FFT_KOKKOS_SCALAR_3d; typedef Kokkos:: - DualView tdual_FFT_DATA_1d; -typedef tdual_FFT_DATA_1d::t_dev t_FFT_DATA_1d; -typedef tdual_FFT_DATA_1d::t_dev_um t_FFT_DATA_1d_um; + DualView tdual_FFT_KOKKOS_DATA_1d; +typedef tdual_FFT_KOKKOS_DATA_1d::t_dev t_FFT_KOKKOS_DATA_1d; +typedef tdual_FFT_KOKKOS_DATA_1d::t_dev_um t_FFT_KOKKOS_DATA_1d_um; typedef Kokkos:: DualView tdual_int_64; @@ -186,23 +186,23 @@ struct FFTArrayTypes { //Kspace typedef Kokkos:: - DualView tdual_FFT_SCALAR_1d; -typedef tdual_FFT_SCALAR_1d::t_host t_FFT_SCALAR_1d; -typedef tdual_FFT_SCALAR_1d::t_host_um t_FFT_SCALAR_1d_um; + DualView tdual_FFT_KOKKOS_SCALAR_1d; +typedef tdual_FFT_KOKKOS_SCALAR_1d::t_host t_FFT_KOKKOS_SCALAR_1d; +typedef tdual_FFT_KOKKOS_SCALAR_1d::t_host_um t_FFT_KOKKOS_SCALAR_1d_um; -typedef Kokkos::DualView tdual_FFT_SCALAR_2d; -typedef tdual_FFT_SCALAR_2d::t_host t_FFT_SCALAR_2d; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d; +typedef tdual_FFT_KOKKOS_SCALAR_2d::t_host t_FFT_KOKKOS_SCALAR_2d; -typedef Kokkos::DualView tdual_FFT_SCALAR_2d_3; -typedef tdual_FFT_SCALAR_2d_3::t_host t_FFT_SCALAR_2d_3; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d_3; +typedef tdual_FFT_KOKKOS_SCALAR_2d_3::t_host t_FFT_KOKKOS_SCALAR_2d_3; -typedef Kokkos::DualView tdual_FFT_SCALAR_3d; -typedef tdual_FFT_SCALAR_3d::t_host t_FFT_SCALAR_3d; +typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_3d; +typedef tdual_FFT_KOKKOS_SCALAR_3d::t_host t_FFT_KOKKOS_SCALAR_3d; typedef Kokkos:: - DualView tdual_FFT_DATA_1d; -typedef tdual_FFT_DATA_1d::t_host t_FFT_DATA_1d; -typedef tdual_FFT_DATA_1d::t_host_um t_FFT_DATA_1d_um; + DualView tdual_FFT_KOKKOS_DATA_1d; +typedef tdual_FFT_KOKKOS_DATA_1d::t_host t_FFT_KOKKOS_DATA_1d; +typedef tdual_FFT_KOKKOS_DATA_1d::t_host_um t_FFT_KOKKOS_DATA_1d_um; typedef Kokkos:: DualView tdual_int_64; @@ -212,12 +212,12 @@ typedef tdual_int_64::t_host_um t_int_64_um; }; #endif -typedef struct FFTArrayTypes FFT_DAT; -typedef struct FFTArrayTypes FFT_HAT; +typedef struct FFTArrayTypes FFT_KOKKOS_DAT; +typedef struct FFTArrayTypes FFT_KOKKOS_HAT; #if defined(FFT_KOKKOS_KISSFFT) -#include "kissfft_kokkos.h" // uses t_FFT_DATA_1d, needs to come last +#include "kissfft_kokkos.h" // uses t_FFT_KOKKOS_DATA_1d, needs to come last #endif diff --git a/src/KOKKOS/grid3d_kokkos.cpp b/src/KOKKOS/grid3d_kokkos.cpp index 9a82e0157d..0f8e0bdc4e 100644 --- a/src/KOKKOS/grid3d_kokkos.cpp +++ b/src/KOKKOS/grid3d_kokkos.cpp @@ -636,7 +636,7 @@ void Grid3dKokkos::setup_comm_tiled(int &nbuf1, int &nbuf2) template void Grid3dKokkos::forward_comm(int caller, void *ptr, int which, int nper, int nbyte, - FFT_DAT::tdual_FFT_SCALAR_1d& k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d& k_buf2, + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf2, MPI_Datatype datatype) { if (caller == KSPACE) { @@ -655,14 +655,14 @@ void Grid3dKokkos::forward_comm(int caller, void *ptr, int which, in template void Grid3dKokkos:: forward_comm_kspace_brick(KSpace *kspace, int which, int nper, - FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int m; MPI_Request request; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_SCALAR* buf1; - FFT_SCALAR* buf2; + FFT_KOKKOS_SCALAR* buf1; + FFT_KOKKOS_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -709,13 +709,13 @@ forward_comm_kspace_brick(KSpace *kspace, int which, int nper, template void Grid3dKokkos:: forward_comm_kspace_tiled(KSpace *kspace, int which, int nper, - FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int i,m,offset; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_SCALAR* buf1; - FFT_SCALAR* buf2; + FFT_KOKKOS_SCALAR* buf1; + FFT_KOKKOS_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -776,7 +776,7 @@ forward_comm_kspace_tiled(KSpace *kspace, int which, int nper, template void Grid3dKokkos::reverse_comm(int caller, void *ptr, int which, int nper, int nbyte, - FFT_DAT::tdual_FFT_SCALAR_1d& k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d& k_buf2, + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf2, MPI_Datatype datatype) { if (caller == KSPACE) { @@ -795,14 +795,14 @@ void Grid3dKokkos::reverse_comm(int caller, void *ptr, int which, in template void Grid3dKokkos:: reverse_comm_kspace_brick(KSpace *kspace, int which, int nper, - FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int m; MPI_Request request; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_SCALAR* buf1; - FFT_SCALAR* buf2; + FFT_KOKKOS_SCALAR* buf1; + FFT_KOKKOS_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -850,14 +850,14 @@ reverse_comm_kspace_brick(KSpace *kspace, int which, int nper, template void Grid3dKokkos:: reverse_comm_kspace_tiled(KSpace *kspace, int which, int nper, - FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int i,m,offset; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_SCALAR* buf1; - FFT_SCALAR* buf2; + FFT_KOKKOS_SCALAR* buf1; + FFT_KOKKOS_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); diff --git a/src/KOKKOS/grid3d_kokkos.h b/src/KOKKOS/grid3d_kokkos.h index 19751d83c9..8e9f6cd051 100644 --- a/src/KOKKOS/grid3d_kokkos.h +++ b/src/KOKKOS/grid3d_kokkos.h @@ -27,16 +27,16 @@ class Grid3dKokkos : public Grid3d { enum { KSPACE = 0, PAIR = 1, FIX = 2 }; // calling classes typedef DeviceType device_type; typedef ArrayTypes AT; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; Grid3dKokkos(class LAMMPS *, MPI_Comm, int, int, int); Grid3dKokkos(class LAMMPS *, MPI_Comm, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); ~Grid3dKokkos() override; void forward_comm(int, void *, int, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); void reverse_comm(int, void *, int, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); private: DAT::tdual_int_2d k_swap_packlist; @@ -57,13 +57,13 @@ class Grid3dKokkos : public Grid3d { void setup_comm_tiled(int &, int &) override; void forward_comm_kspace_brick(class KSpace *, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); void forward_comm_kspace_tiled(class KSpace *, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); void reverse_comm_kspace_brick(class KSpace *, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); void reverse_comm_kspace_tiled(class KSpace *, int, int, - FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); void grow_swap() override; diff --git a/src/KOKKOS/kissfft_kokkos.h b/src/KOKKOS/kissfft_kokkos.h index 265677a21c..fc23bf7891 100644 --- a/src/KOKKOS/kissfft_kokkos.h +++ b/src/KOKKOS/kissfft_kokkos.h @@ -119,14 +119,14 @@ }while(0) */ -#define KISS_FFT_COS(phase) (FFT_SCALAR) cos(phase) -#define KISS_FFT_SIN(phase) (FFT_SCALAR) sin(phase) +#define KISS_FFT_KOKKOS_COS(phase) (FFT_KOKKOS_SCALAR) cos(phase) +#define KISS_FFT_KOKKOS_SIN(phase) (FFT_KOKKOS_SCALAR) sin(phase) #define HALF_OF(x) ((x)*.5) #define kf_cexp(x,x_index,phase) \ do{ \ - (x)(x_index).re = KISS_FFT_COS(phase);\ - (x)(x_index).im = KISS_FFT_SIN(phase);\ + (x)(x_index).re = KISS_FFT_KOKKOS_COS(phase);\ + (x)(x_index).im = KISS_FFT_KOKKOS_SIN(phase);\ }while(0) @@ -138,26 +138,26 @@ namespace LAMMPS_NS { template struct kiss_fft_state_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; int nfft; int inverse; - typename FFT_AT::t_int_64 d_factors; - typename FFT_AT::t_FFT_DATA_1d d_twiddles; - typename FFT_AT::t_FFT_DATA_1d d_scratch; + typename FFT_KOKKOS_AT::t_int_64 d_factors; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_twiddles; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_scratch; }; template class KissFFTKokkos { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; KOKKOS_INLINE_FUNCTION - static void kf_bfly2(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { - typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_SCALAR t[2]; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_KOKKOS_SCALAR t[2]; int Fout2_count; int tw1_count = 0; @@ -179,11 +179,11 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly4(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly4(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, const size_t m, int Fout_count) { - typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_SCALAR scratch[6][2]; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_KOKKOS_SCALAR scratch[6][2]; size_t k=m; const size_t m2=2*m; const size_t m3=3*m; @@ -237,14 +237,14 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly3(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly3(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, size_t m, int Fout_count) { size_t k=m; const size_t m2 = 2*m; - typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_SCALAR scratch[5][2]; - FFT_SCALAR epi3[2]; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_KOKKOS_SCALAR scratch[5][2]; + FFT_KOKKOS_SCALAR epi3[2]; //C_EQ(epi3,d_twiddles[fstride*m]); epi3[0] = d_twiddles(fstride*m).re; epi3[1] = d_twiddles(fstride*m).im; @@ -289,13 +289,13 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly5(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly5(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { int u; - FFT_SCALAR scratch[13][2]; - typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_SCALAR ya[2],yb[2]; + FFT_KOKKOS_SCALAR scratch[13][2]; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_KOKKOS_SCALAR ya[2],yb[2]; //C_EQ(ya,d_twiddles[fstride*m]); ya[1] = d_twiddles(fstride*m).im; ya[0] = d_twiddles(fstride*m).re; @@ -369,15 +369,15 @@ class KissFFTKokkos { /* perform the butterfly for one stage of a mixed radix FFT */ KOKKOS_INLINE_FUNCTION - static void kf_bfly_generic(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly_generic(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int p, int Fout_count) { int u,k,q1,q; - typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_SCALAR t[2]; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_KOKKOS_SCALAR t[2]; int Norig = st.nfft; - typename FFT_AT::t_FFT_DATA_1d_um d_scratch = st.d_scratch; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_scratch = st.d_scratch; for ( u=0; u &st, int Fout_count, int f_count, int factors_count) + const typename FFT_KOKKOS_AT::t_int_64_um &d_factors, const kiss_fft_state_kokkos &st, int Fout_count, int f_count, int factors_count) { const int beg = Fout_count; const int p = d_factors[factors_count++]; /* the radix */ @@ -452,7 +452,7 @@ class KissFFTKokkos { p[i] * m[i] = m[i-1] m0 = n */ - static int kf_factor(int n, FFT_HAT::t_int_64 h_facbuf) + static int kf_factor(int n, FFT_KOKKOS_HAT::t_int_64 h_facbuf) { int p=4, nf=0; double floor_sqrt; @@ -496,12 +496,12 @@ class KissFFTKokkos { st.nfft = nfft; st.inverse = inverse_fft; - typename FFT_AT::tdual_int_64 k_factors = typename FFT_AT::tdual_int_64(); - typename FFT_AT::tdual_FFT_DATA_1d k_twiddles = typename FFT_AT::tdual_FFT_DATA_1d(); + typename FFT_KOKKOS_AT::tdual_int_64 k_factors = typename FFT_KOKKOS_AT::tdual_int_64(); + typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d k_twiddles = typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d(); if (nfft > 0) { - k_factors = typename FFT_AT::tdual_int_64("kissfft:factors",MAXFACTORS*2); - k_twiddles = typename FFT_AT::tdual_FFT_DATA_1d("kissfft:twiddles",nfft); + k_factors = typename FFT_KOKKOS_AT::tdual_int_64("kissfft:factors",MAXFACTORS*2); + k_twiddles = typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d("kissfft:twiddles",nfft); for (i=0;i(); @@ -524,12 +524,12 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_AT::t_FFT_DATA_1d_um &d_fin, typename FFT_AT::t_FFT_DATA_1d_um &d_fout, int in_stride, int offset) + static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_fin, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_fout, int in_stride, int offset) { //if (d_fin.data() == d_fout.data()) { // // NOTE: this is not really an in-place FFT algorithm. // // It just performs an out-of-place FFT into a temp buffer - // typename FFT_AT::t_FFT_DATA_1d_um d_tmpbuf = typename FFT_AT::t_FFT_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); + // typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_tmpbuf = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); // kf_work(d_tmpbuf,d_fin,1,in_stride,st.d_factors,st,offset,offset).re; // Kokkos::deep_copy(d_fout,d_tmpbuf); //} else { @@ -538,7 +538,7 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_AT::t_FFT_DATA_1d_um d_fin, typename FFT_AT::t_FFT_DATA_1d_um d_fout, int offset) + static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_fin, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_fout, int offset) { kiss_fft_stride(cfg,d_fin,d_fout,1,offset); } diff --git a/src/KOKKOS/kokkos_base_fft.h b/src/KOKKOS/kokkos_base_fft.h index 08369b3c78..567dc02ff3 100644 --- a/src/KOKKOS/kokkos_base_fft.h +++ b/src/KOKKOS/kokkos_base_fft.h @@ -12,8 +12,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_KOKKOS_BASE_FFT_H -#define LMP_KOKKOS_BASE_FFT_H +#ifndef LMP_KOKKOS_BASE_FFT_KOKKOS_H +#define LMP_KOKKOS_BASE_FFT_KOKKOS_H #include "fftdata_kokkos.h" @@ -24,10 +24,10 @@ class KokkosBaseFFT { KokkosBaseFFT() {} // Kspace - virtual void pack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; - virtual void unpack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; - virtual void pack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; - virtual void unpack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; + virtual void pack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; + virtual void unpack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; + virtual void pack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; + virtual void unpack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; }; } diff --git a/src/KOKKOS/pack_kokkos.h b/src/KOKKOS/pack_kokkos.h index fe90d294a6..97d35afe26 100644 --- a/src/KOKKOS/pack_kokkos.h +++ b/src/KOKKOS/pack_kokkos.h @@ -38,13 +38,13 @@ template class PackKokkos { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; struct pack_3d_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typedef FFTArrayTypes FFT_KOKKOS_AT; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -52,7 +52,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - pack_3d_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + pack_3d_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -80,7 +80,7 @@ public: } }; -static void pack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) +static void pack_3d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -98,7 +98,7 @@ struct unpack_3d_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -106,7 +106,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -134,7 +134,7 @@ public: } }; -static void unpack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -153,7 +153,7 @@ struct unpack_3d_permute1_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -161,7 +161,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_1_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_1_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -189,7 +189,7 @@ public: } }; -static void unpack_3d_permute1_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_1(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -206,7 +206,7 @@ struct unpack_3d_permute1_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -214,7 +214,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_2_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_2_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -243,7 +243,7 @@ public: } }; -static void unpack_3d_permute1_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -261,7 +261,7 @@ struct unpack_3d_permute1_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -270,7 +270,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute1_n_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_n_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -299,7 +299,7 @@ public: } }; -static void unpack_3d_permute1_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_n(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -317,7 +317,7 @@ struct unpack_3d_permute2_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -325,7 +325,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_1_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_1_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -352,7 +352,7 @@ public: } }; -static void unpack_3d_permute2_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_1(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -370,7 +370,7 @@ struct unpack_3d_permute2_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -378,7 +378,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_2_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_2_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -406,7 +406,7 @@ public: } }; -static void unpack_3d_permute2_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -423,7 +423,7 @@ struct unpack_3d_permute2_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -432,7 +432,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute2_n_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_n_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -460,7 +460,7 @@ public: } }; -static void unpack_3d_permute2_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_n(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 17a9c82bdb..3fc90c088d 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -285,7 +285,7 @@ void PPPMKokkos::init() estimated_accuracy); mesg += fmt::format(" estimated relative force accuracy = {:.8g}\n", estimated_accuracy/two_charge_force); - mesg += " using " LMP_FFT_PREC " precision " LMP_FFT_LIB "\n"; + mesg += " using " LMP_FFT_KOKKOS_PREC " precision " LMP_FFT_KOKKOS_LIB "\n"; mesg += fmt::format(" 3d grid and FFT values/proc = {} {}\n", ngrid_max,nfft_both_max); utils::logmesg(lmp,mesg); @@ -582,7 +582,7 @@ void PPPMKokkos::compute(int eflag, int vflag) if (atom->nmax > nmax) { nmax = atomKK->nmax; d_part2grid = typename AT::t_int_1d_3("pppm:part2grid",nmax); - d_rho1d = typename FFT_AT::t_FFT_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + d_rho1d = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); } // find grid points for all my particles @@ -595,8 +595,8 @@ void PPPMKokkos::compute(int eflag, int vflag) // to fully sum contribution in their 3d bricks // remap from 3d decomposition to FFT decomposition - gc->reverse_comm(Grid3d::KSPACE,this,REVERSE_RHO,1,sizeof(FFT_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); + gc->reverse_comm(Grid3d::KSPACE,this,REVERSE_RHO,1,sizeof(FFT_KOKKOS_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); brick2fft(); // compute potential gradient on my FFT grid and @@ -609,14 +609,14 @@ void PPPMKokkos::compute(int eflag, int vflag) // all procs communicate E-field values // to fill ghost cells surrounding their 3d bricks - gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK,3,sizeof(FFT_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); + gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK,3,sizeof(FFT_KOKKOS_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); // extra per-atom energy/virial communication if (evflag_atom) - gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK_PERATOM,7,sizeof(FFT_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); + gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK_PERATOM,7,sizeof(FFT_KOKKOS_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); // calculate the force on my particles @@ -730,8 +730,8 @@ void PPPMKokkos::allocate() npergrid = 3; - k_gc_buf1 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); - k_gc_buf2 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); + k_gc_buf1 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); + k_gc_buf2 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); // tally local grid sizes // ngrid = count of owned+ghost grid cells on this proc @@ -753,7 +753,7 @@ void PPPMKokkos::allocate() // allocate distributed grid data - d_density_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_density_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); memoryKK->create_kokkos(k_density_fft,density_fft,nfft_both,"pppm:d_density_fft"); d_density_fft = k_density_fft.view(); @@ -775,17 +775,17 @@ void PPPMKokkos::allocate() d_fkz = typename AT::t_float_1d("pppm:d_fkz",nfft_both); } - d_vdx_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdy_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdz_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdx_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdy_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdz_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // summation coeffs order_allocated = order; k_gf_b = typename DAT::tdual_float_1d("pppm:gf_b",order); d_gf_b = k_gf_b.view(); - d_rho1d = typename FFT_AT::t_FFT_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); - k_rho_coeff = FFT_DAT::tdual_FFT_SCALAR_2d("pppm:rho_coeff",order,order/2-(1-order)/2+1); + d_rho1d = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + k_rho_coeff = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d("pppm:rho_coeff",order,order/2-(1-order)/2+1); d_rho_coeff = k_rho_coeff.view(); h_rho_coeff = k_rho_coeff.h_view; @@ -810,7 +810,7 @@ void PPPMKokkos::allocate() remap = new RemapKokkos(lmp,world, nxlo_in,nxhi_in,nylo_in,nyhi_in,nzlo_in,nzhi_in, nxlo_fft,nxhi_fft,nylo_fft,nyhi_fft,nzlo_fft,nzhi_fft, - 1,0,0,FFT_PRECISION,collective_flag,gpu_aware_flag); + 1,0,0,FFT_KOKKOS_PRECISION,collective_flag,gpu_aware_flag); } /* ---------------------------------------------------------------------- @@ -847,14 +847,14 @@ void PPPMKokkos::allocate_peratom() { peratom_allocate_flag = 1; - d_u_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_u_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v0_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v1_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v2_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v3_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v4_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v5_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v0_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v1_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v2_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v3_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v4_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v5_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // use same GC ghost grid object for peratom grid communication @@ -862,8 +862,8 @@ void PPPMKokkos::allocate_peratom() npergrid = 7; - k_gc_buf1 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); - k_gc_buf2 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); + k_gc_buf1 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); + k_gc_buf2 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); } /* ---------------------------------------------------------------------- @@ -1234,14 +1234,14 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) const { // The density_brick array is atomic for Half/Thread neighbor style - Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; + Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; int nx = d_part2grid(i,0); int ny = d_part2grid(i,1); int nz = d_part2grid(i,2); - const FFT_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; - const FFT_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; - const FFT_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; + const FFT_KOKKOS_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; + const FFT_KOKKOS_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; + const FFT_KOKKOS_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; nz -= nzlo_out; @@ -1250,13 +1250,13 @@ void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) c compute_rho1d(i,dx,dy,dz); - const FFT_SCALAR z0 = delvolinv * q[i]; + const FFT_KOKKOS_SCALAR z0 = delvolinv * q[i]; for (int n = nlower; n <= nupper; n++) { const int mz = n+nz; - const FFT_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); + const FFT_KOKKOS_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); for (int m = nlower; m <= nupper; m++) { const int my = m+ny; - const FFT_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); + const FFT_KOKKOS_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); for (int l = nlower; l <= nupper; l++) { const int mx = l+nx; a_density_brick(mz,my,mx) += x0*d_rho1d(i,l+order/2,0); @@ -1294,9 +1294,9 @@ void PPPMKokkos::operator() (TagPPPM_make_rho, typename Kokkos::Team if ( ((nz+nlower-nzlo_out)*ix*iy >= ito) || ((nz+nupper-nzlo_out+1)*ix*iy < ifrom) ) continue; - const FFT_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; - const FFT_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; - const FFT_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; + const FFT_KOKKOS_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; + const FFT_KOKKOS_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; + const FFT_KOKKOS_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; nz -= nzlo_out; ny -= nylo_out; @@ -1304,15 +1304,15 @@ void PPPMKokkos::operator() (TagPPPM_make_rho, typename Kokkos::Team compute_rho1d(i,dx,dy,dz); - const FFT_SCALAR z0 = delvolinv * q[i]; + const FFT_KOKKOS_SCALAR z0 = delvolinv * q[i]; for (int n = nlower; n <= nupper; n++) { const int mz = n+nz; const int in = mz*ix*iy; - const FFT_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); + const FFT_KOKKOS_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); for (int m = nlower; m <= nupper; m++) { const int my = m+ny; const int im = in+my*ix; - const FFT_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); + const FFT_KOKKOS_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); for (int l = nlower; l <= nupper; l++) { const int mx = l+nx; const int il = im+mx; @@ -2040,8 +2040,8 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_ik, const int &i) const { int l,m,n,nx,ny,nz,mx,my,mz; - FFT_SCALAR x0,y0,z0; - FFT_SCALAR ekx,eky,ekz; + FFT_KOKKOS_SCALAR x0,y0,z0; + FFT_KOKKOS_SCALAR ekx,eky,ekz; nx = d_part2grid(i,0); ny = d_part2grid(i,1); @@ -2100,8 +2100,8 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_peratom, const int &i) const { int l,m,n,nx,ny,nz,mx,my,mz; - FFT_SCALAR dx,dy,dz,x0,y0,z0; - FFT_SCALAR u,v0,v1,v2,v3,v4,v5; + FFT_KOKKOS_SCALAR dx,dy,dz,x0,y0,z0; + FFT_KOKKOS_SCALAR u,v0,v1,v2,v3,v4,v5; nx = d_part2grid(i,0); ny = d_part2grid(i,1); @@ -2155,7 +2155,7 @@ void PPPMKokkos::operator()(TagPPPM_fieldforce_peratom, const int &i ------------------------------------------------------------------------- */ template -void PPPMKokkos::pack_forward_grid_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::pack_forward_grid_kokkos(int flag, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2211,7 +2211,7 @@ void PPPMKokkos::operator()(TagPPPM_pack_forward2, const int &i) con ------------------------------------------------------------------------- */ template -void PPPMKokkos::unpack_forward_grid_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::unpack_forward_grid_kokkos(int flag, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2269,7 +2269,7 @@ void PPPMKokkos::operator()(TagPPPM_unpack_forward2, const int &i) c ------------------------------------------------------------------------- */ template -void PPPMKokkos::pack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::pack_reverse_grid_kokkos(int /*flag*/, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2299,7 +2299,7 @@ void PPPMKokkos::operator()(TagPPPM_pack_reverse, const int &i) cons ------------------------------------------------------------------------- */ template -void PPPMKokkos::unpack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::unpack_reverse_grid_kokkos(int /*flag*/, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2332,11 +2332,11 @@ void PPPMKokkos::operator()(TagPPPM_unpack_reverse, const int &i) co template KOKKOS_INLINE_FUNCTION -void PPPMKokkos::compute_rho1d(const int i, const FFT_SCALAR &dx, const FFT_SCALAR &dy, - const FFT_SCALAR &dz) const +void PPPMKokkos::compute_rho1d(const int i, const FFT_KOKKOS_SCALAR &dx, const FFT_KOKKOS_SCALAR &dy, + const FFT_KOKKOS_SCALAR &dz) const { int k,l; - FFT_SCALAR r1,r2,r3; + FFT_KOKKOS_SCALAR r1,r2,r3; for (k = (1-order)/2; k <= order/2; k++) { r1 = r2 = r3 = ZEROF; @@ -2375,10 +2375,10 @@ template void PPPMKokkos::compute_rho_coeff() { int j,k,l,m; - FFT_SCALAR s; - FFT_SCALAR **a = new FFT_SCALAR *[order]; + FFT_KOKKOS_SCALAR s; + FFT_KOKKOS_SCALAR **a = new FFT_KOKKOS_SCALAR *[order]; for (int i = 0; i < order; ++i) - a[i] = new FFT_SCALAR[2*order+1]; + a[i] = new FFT_KOKKOS_SCALAR[2*order+1]; for (k = 0; k <= 2*order; k++) for (l = 0; l < order; l++) @@ -2586,18 +2586,18 @@ double PPPMKokkos::memory_usage() double bytes = (double)nmax*3 * sizeof(double); int nbrick = (nxhi_out-nxlo_out+1) * (nyhi_out-nylo_out+1) * (nzhi_out-nzlo_out+1); - bytes += (double)4 * nbrick * sizeof(FFT_SCALAR); + bytes += (double)4 * nbrick * sizeof(FFT_KOKKOS_SCALAR); if (triclinic) bytes += (double)3 * nfft_both * sizeof(double); bytes += (double)6 * nfft_both * sizeof(double); bytes += (double)nfft_both * sizeof(double); - bytes += (double)nfft_both*5 * sizeof(FFT_SCALAR); + bytes += (double)nfft_both*5 * sizeof(FFT_KOKKOS_SCALAR); if (peratom_allocate_flag) - bytes += (double)6 * nbrick * sizeof(FFT_SCALAR); + bytes += (double)6 * nbrick * sizeof(FFT_KOKKOS_SCALAR); // two Grid3d bufs - bytes += (double)(ngc_buf1 + ngc_buf2) * npergrid * sizeof(FFT_SCALAR); + bytes += (double)(ngc_buf1 + ngc_buf2) * npergrid * sizeof(FFT_KOKKOS_SCALAR); return bytes; } diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index 14d4670dbd..dc0fbd88e5 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -131,7 +131,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; PPPMKokkos(class LAMMPS *); ~PPPMKokkos() override; @@ -350,7 +350,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { int nx,ny,nz; typename AT::t_int_1d_um d_list_index; - typename FFT_AT::t_FFT_SCALAR_1d_um d_buf; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf; int unpack_offset; DAT::tdual_int_scalar k_flag; @@ -364,31 +364,31 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { typename ArrayTypes::t_efloat_1d d_eatom; typename ArrayTypes::t_virial_array d_vatom; - typename FFT_AT::t_FFT_SCALAR_3d d_density_brick; - typename FFT_AT::t_FFT_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; - typename FFT_AT::t_FFT_SCALAR_3d d_u_brick; - typename FFT_AT::t_FFT_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; - typename FFT_AT::t_FFT_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_density_brick; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_u_brick; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; typename AT::t_float_1d d_greensfn; typename AT::t_virial_array d_vg; typename AT::t_float_1d d_fkx; typename AT::t_float_1d d_fky; typename AT::t_float_1d d_fkz; - FFT_DAT::tdual_FFT_SCALAR_1d k_density_fft; - FFT_DAT::tdual_FFT_SCALAR_1d k_work1; - FFT_DAT::tdual_FFT_SCALAR_1d k_work2; - typename FFT_AT::t_FFT_SCALAR_1d d_density_fft; - typename FFT_AT::t_FFT_SCALAR_1d d_work1; - typename FFT_AT::t_FFT_SCALAR_1d d_work2; + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_density_fft; + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work1; + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work2; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_density_fft; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_work1; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_work2; DAT::tdual_float_1d k_gf_b; typename AT::t_float_1d d_gf_b; - //FFT_SCALAR **rho1d,**rho_coeff,**drho1d,**drho_coeff; - typename FFT_AT::t_FFT_SCALAR_2d_3 d_rho1d; - FFT_DAT::tdual_FFT_SCALAR_2d k_rho_coeff; - typename FFT_AT::t_FFT_SCALAR_2d d_rho_coeff; - FFT_HAT::t_FFT_SCALAR_2d h_rho_coeff; + //FFT_KOKKOS_SCALAR **rho1d,**rho_coeff,**drho1d,**drho_coeff; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3 d_rho1d; + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d k_rho_coeff; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d d_rho_coeff; + FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_2d h_rho_coeff; //double **acons; typename Kokkos::DualView::t_host acons; @@ -398,7 +398,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { RemapKokkos *remap; Grid3dKokkos *gc; - FFT_DAT::tdual_FFT_SCALAR_1d k_gc_buf1,k_gc_buf2; + FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_gc_buf1,k_gc_buf2; int ngc_buf1,ngc_buf2,npergrid; //int **part2grid; // storage for particle -> grid mapping @@ -429,17 +429,17 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { void fieldforce_peratom() override; KOKKOS_INLINE_FUNCTION - void compute_rho1d(const int i, const FFT_SCALAR &, const FFT_SCALAR &, - const FFT_SCALAR &) const; + void compute_rho1d(const int i, const FFT_KOKKOS_SCALAR &, const FFT_KOKKOS_SCALAR &, + const FFT_KOKKOS_SCALAR &) const; void compute_rho_coeff(); void slabcorr() override; // grid communication - void pack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; - void unpack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; - void pack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; - void unpack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; + void pack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; + void unpack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; + void pack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; + void unpack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; // triclinic diff --git a/src/KOKKOS/remap_kokkos.cpp b/src/KOKKOS/remap_kokkos.cpp index efc6742a25..d6b8a5691c 100644 --- a/src/KOKKOS/remap_kokkos.cpp +++ b/src/KOKKOS/remap_kokkos.cpp @@ -59,7 +59,7 @@ RemapKokkos::~RemapKokkos() /* ---------------------------------------------------------------------- */ template -void RemapKokkos::perform(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, typename FFT_AT::t_FFT_SCALAR_1d d_buf) +void RemapKokkos::perform(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_buf) { remap_3d_kokkos(d_in,d_out,d_buf,plan); } @@ -103,7 +103,7 @@ void RemapKokkos::perform(typename FFT_AT::t_FFT_SCALAR_1d d_in, typ ------------------------------------------------------------------------- */ template -void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, typename FFT_AT::t_FFT_SCALAR_1d d_buf, +void RemapKokkos::remap_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_buf, struct remap_plan_3d_kokkos *plan) { // collective flag not yet supported @@ -111,7 +111,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d // use point-to-point communication int i,isend,irecv; - typename FFT_AT::t_FFT_SCALAR_1d d_scratch; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; if (plan->memory == 0) d_scratch = d_buf; @@ -120,20 +120,20 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d // post all recvs into scratch space - FFT_SCALAR* v_scratch = d_scratch.data(); + FFT_KOKKOS_SCALAR* v_scratch = d_scratch.data(); if (!plan->usecuda_aware) { plan->h_scratch = Kokkos::create_mirror_view(d_scratch); v_scratch = plan->h_scratch.data(); } for (irecv = 0; irecv < plan->nrecv; irecv++) { - FFT_SCALAR* scratch = v_scratch + plan->recv_bufloc[irecv]; + FFT_KOKKOS_SCALAR* scratch = v_scratch + plan->recv_bufloc[irecv]; MPI_Irecv(scratch,plan->recv_size[irecv], - MPI_FFT_SCALAR,plan->recv_proc[irecv],0, + MPI_FFT_KOKKOS_SCALAR,plan->recv_proc[irecv],0, plan->comm,&plan->request[irecv]); } - FFT_SCALAR* v_sendbuf = plan->d_sendbuf.data(); + FFT_KOKKOS_SCALAR* v_sendbuf = plan->d_sendbuf.data(); if (!plan->usecuda_aware) { plan->h_sendbuf = Kokkos::create_mirror_view(plan->d_sendbuf); v_sendbuf = plan->h_sendbuf.data(); @@ -149,7 +149,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d if (!plan->usecuda_aware) Kokkos::deep_copy(plan->h_sendbuf,plan->d_sendbuf); - MPI_Send(v_sendbuf,plan->send_size[isend],MPI_FFT_SCALAR, + MPI_Send(v_sendbuf,plan->send_size[isend],MPI_FFT_KOKKOS_SCALAR, plan->send_proc[isend],0,plan->comm); } @@ -465,7 +465,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat size = MAX(size,plan->send_size[nsend]); if (size) { - plan->d_sendbuf = typename FFT_AT::t_FFT_SCALAR_1d("remap3d:sendbuf",size); + plan->d_sendbuf = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:sendbuf",size); if (!plan->d_sendbuf.data()) return nullptr; } @@ -475,7 +475,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat if (memory == 1) { if (nrecv > 0) { plan->d_scratch = - typename FFT_AT::t_FFT_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); if (!plan->d_scratch.data()) return nullptr; } } diff --git a/src/KOKKOS/remap_kokkos.h b/src/KOKKOS/remap_kokkos.h index a62c14f00b..035b58260e 100644 --- a/src/KOKKOS/remap_kokkos.h +++ b/src/KOKKOS/remap_kokkos.h @@ -27,14 +27,14 @@ namespace LAMMPS_NS { template struct remap_plan_3d_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_SCALAR_1d d_sendbuf; // buffer for MPI sends - FFT_HAT::t_FFT_SCALAR_1d h_sendbuf; // host buffer for MPI sends - typename FFT_AT::t_FFT_SCALAR_1d d_scratch; // scratch buffer for MPI recvs - FFT_HAT::t_FFT_SCALAR_1d h_scratch; // host scratch buffer for MPI recvs - void (*pack)(typename FFT_AT::t_FFT_SCALAR_1d_um, int, typename FFT_AT::t_FFT_SCALAR_1d_um, int, struct pack_plan_3d *); + typedef FFTArrayTypes FFT_KOKKOS_AT; + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_sendbuf; // buffer for MPI sends + FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_sendbuf; // host buffer for MPI sends + typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; // scratch buffer for MPI recvs + FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_scratch; // host scratch buffer for MPI recvs + void (*pack)(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); // which pack function to use - void (*unpack)(typename FFT_AT::t_FFT_SCALAR_1d_um, int, typename FFT_AT::t_FFT_SCALAR_1d_um, int, struct pack_plan_3d *); + void (*unpack)(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); // which unpack function to use int *send_offset; // extraction loc for each send int *send_size; // size of each send message @@ -61,16 +61,16 @@ template class RemapKokkos : protected Pointers { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_AT; + typedef FFTArrayTypes FFT_KOKKOS_AT; RemapKokkos(class LAMMPS *); RemapKokkos(class LAMMPS *, MPI_Comm,int,int,int,int,int,int, int,int,int,int,int,int,int,int,int,int,int,int); ~RemapKokkos() override; - void perform(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d); + void perform(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d); struct remap_plan_3d_kokkos *plan; - void remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, struct remap_plan_3d_kokkos *); + void remap_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, struct remap_plan_3d_kokkos *); struct remap_plan_3d_kokkos *remap_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, int, int, int, int, From 51eebf311fde2f3848feae35ce3692a35d90fe9f Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Wed, 6 Dec 2023 12:40:11 -0500 Subject: [PATCH 04/89] Added fft settings to Install.sh, fixed typo in HIPFFT_C2C and HIPFFT_Z2Z --- src/KOKKOS/Install.sh | 1 + src/KOKKOS/fftdata_kokkos.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 489efc55a0..ba6c4ed427 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -200,6 +200,7 @@ action kokkos_few.h action kokkos_type.h action kokkos.cpp action kokkos.h +action lmpfftsettings_kokkos.h action math_special_kokkos.cpp action math_special_kokkos.h action meam_dens_final_kokkos.h meam_dens_final.cpp diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index a9ea2de896..d52bc0b968 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -117,11 +117,11 @@ #include #if defined(FFT_KOKKOS_SINGLE) #define hipfftExec hipfftExecC2C - #define HIPFFT_KOKKOS_TYPE HIPFFT_KOKKOS_C2C + #define HIPFFT_KOKKOS_TYPE HIPFFT_C2C typedef hipfftComplex FFT_KOKKOS_DATA; #else #define hipfftExec hipfftExecZ2Z - #define HIPFFT_KOKKOS_TYPE HIPFFT_KOKKOS_Z2Z + #define HIPFFT_KOKKOS_TYPE HIPFFT_Z2Z typedef hipfftDoubleComplex FFT_KOKKOS_DATA; #endif #else From e80c3d3215a9de1f8e1c9041fc96c9713cb156ca Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 12 Dec 2023 12:20:24 -0700 Subject: [PATCH 05/89] Revert FFT_AT name change --- src/KOKKOS/fft3d_kokkos.cpp | 70 ++++++++++++++++++------------------- src/KOKKOS/fft3d_kokkos.h | 16 ++++----- src/KOKKOS/grid3d_kokkos.h | 2 +- src/KOKKOS/kissfft_kokkos.h | 52 +++++++++++++-------------- src/KOKKOS/pack_kokkos.h | 52 +++++++++++++-------------- src/KOKKOS/pppm_kokkos.cpp | 26 +++++++------- src/KOKKOS/pppm_kokkos.h | 24 ++++++------- src/KOKKOS/remap_kokkos.cpp | 10 +++--- src/KOKKOS/remap_kokkos.h | 16 ++++----- 9 files changed, 134 insertions(+), 134 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 7093136fe6..9e7b87b8d8 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -88,10 +88,10 @@ FFT3dKokkos::~FFT3dKokkos() /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::compute(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, int flag) +void FFT3dKokkos::compute(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, int flag) { - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_out_data((FFT_KOKKOS_DATA_POINTER)d_out.data(),d_out.size()/2); + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_out_data((FFT_KOKKOS_DATA_POINTER)d_out.data(),d_out.size()/2); fft_3d_kokkos(d_in_data,d_out_data,flag,plan); } @@ -99,9 +99,9 @@ void FFT3dKokkos::compute(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALA /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::timing1d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, int nsize, int flag) +void FFT3dKokkos::timing1d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, int nsize, int flag) { - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); fft_3d_1d_only_kokkos(d_in_data,nsize,flag,plan); } @@ -140,11 +140,11 @@ template struct norm_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_out; + typedef FFTArrayTypes FFT_AT; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_out; int norm; - norm_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_out_, int norm_): + norm_functor(typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_out_, int norm_): d_out(d_out_),norm(norm_) {} KOKKOS_INLINE_FUNCTION @@ -167,14 +167,14 @@ template struct kiss_fft_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_data,d_tmp; + typedef FFTArrayTypes FFT_AT; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_data,d_tmp; kiss_fft_state_kokkos st; int length; kiss_fft_functor() = default; - kiss_fft_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_data_,typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): + kiss_fft_functor(typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_data_,typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): d_data(d_data_), d_tmp(d_tmp_), st(st_) @@ -191,11 +191,11 @@ public: #endif template -void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) +void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in, typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) { int total,length; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_data,d_copy; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_data,d_copy; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; // pre-remap to prepare for 1st FFTs if needed // copy = loc for remap result @@ -204,9 +204,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS if (plan->pre_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_in_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_in.data(),d_in.size()*2); - d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_in_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_in.data(),d_in.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_in_scalar, d_copy_scalar, d_scratch_scalar, plan->pre_plan); @@ -234,8 +234,8 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); #else - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_tmp = - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_tmp = + typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); kiss_fft_functor f; if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length); @@ -251,9 +251,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS if (plan->mid1_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid1_plan); @@ -280,7 +280,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_mid_forward,length); else @@ -295,9 +295,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS if (plan->mid2_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid2_plan); @@ -324,7 +324,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_slow_forward,length); else @@ -337,9 +337,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS // destination is always out if (plan->post_plan) { - d_data_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_out_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_out.data(),d_out.size()*2); - d_scratch_scalar = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); + d_out_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_out.data(),d_out.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_out_scalar, d_scratch_scalar, plan->post_plan); @@ -599,11 +599,11 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl *nbuf = copy_size + scratch_size; if (copy_size) { - plan->d_copy = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("fft3d:copy",copy_size); + plan->d_copy = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("fft3d:copy",copy_size); } if (scratch_size) { - plan->d_scratch = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("fft3d:scratch",scratch_size); + plan->d_scratch = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("fft3d:scratch",scratch_size); } // system specific pre-computation of 1d FFT coeffs @@ -838,7 +838,7 @@ void FFT3dKokkos::bifactor(int n, int *factor1, int *factor2) ------------------------------------------------------------------------- */ template -void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_data, int nsize, int flag, +void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_data, int nsize, int flag, struct fft_plan_3d_kokkos *plan) { // total = size of data needed in each dim @@ -896,8 +896,8 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_KOKKOS_AT::t_FF hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else kiss_fft_functor f; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_tmp = - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_tmp = + typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == -1) { f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length1); Kokkos::parallel_for(total1/length1,f); diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index bb552ec4ef..9729bc6a63 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -28,14 +28,14 @@ namespace LAMMPS_NS { template struct fft_plan_3d_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; struct remap_plan_3d_kokkos *pre_plan; // remap from input -> 1st FFTs struct remap_plan_3d_kokkos *mid1_plan; // remap from 1st -> 2nd FFTs struct remap_plan_3d_kokkos *mid2_plan; // remap from 2nd -> 3rd FFTs struct remap_plan_3d_kokkos *post_plan; // remap from 3rd FFTs -> output - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_copy; // memory for remap results (if needed) - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_scratch; // scratch space for remaps + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_copy; // memory for remap results (if needed) + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_scratch; // scratch space for remaps int total1,total2,total3; // # of 1st,2nd,3rd FFTs (times length) int length1,length2,length3; // length of 1st,2nd,3rd FFTs int pre_target; // where to put remap results @@ -79,14 +79,14 @@ class FFT3dKokkos : protected Pointers { public: enum{FORWARD=1,BACKWARD=-1}; typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; FFT3dKokkos(class LAMMPS *, MPI_Comm, int,int,int,int,int,int,int,int,int,int,int,int,int,int,int, int,int,int *,int,int); ~FFT3dKokkos() override; - void compute(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, int); - void timing1d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, int, int); + void compute(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, int); + void timing1d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, int, int); private: struct fft_plan_3d_kokkos *plan; @@ -96,7 +96,7 @@ class FFT3dKokkos : protected Pointers { KissFFTKokkos *kissfftKK; #endif - void fft_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, int, struct fft_plan_3d_kokkos *); + void fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d, typename FFT_AT::t_FFT_KOKKOS_DATA_1d, int, struct fft_plan_3d_kokkos *); struct fft_plan_3d_kokkos *fft_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, @@ -105,7 +105,7 @@ class FFT3dKokkos : protected Pointers { void fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokkos *); - void fft_3d_1d_only_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d, int, int, struct fft_plan_3d_kokkos *); + void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d, int, int, struct fft_plan_3d_kokkos *); void bifactor(int, int *, int *); }; diff --git a/src/KOKKOS/grid3d_kokkos.h b/src/KOKKOS/grid3d_kokkos.h index 8e9f6cd051..864ac19c06 100644 --- a/src/KOKKOS/grid3d_kokkos.h +++ b/src/KOKKOS/grid3d_kokkos.h @@ -27,7 +27,7 @@ class Grid3dKokkos : public Grid3d { enum { KSPACE = 0, PAIR = 1, FIX = 2 }; // calling classes typedef DeviceType device_type; typedef ArrayTypes AT; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; Grid3dKokkos(class LAMMPS *, MPI_Comm, int, int, int); Grid3dKokkos(class LAMMPS *, MPI_Comm, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); diff --git a/src/KOKKOS/kissfft_kokkos.h b/src/KOKKOS/kissfft_kokkos.h index fc23bf7891..66f32d29fb 100644 --- a/src/KOKKOS/kissfft_kokkos.h +++ b/src/KOKKOS/kissfft_kokkos.h @@ -138,25 +138,25 @@ namespace LAMMPS_NS { template struct kiss_fft_state_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; int nfft; int inverse; - typename FFT_KOKKOS_AT::t_int_64 d_factors; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_twiddles; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d d_scratch; + typename FFT_AT::t_int_64 d_factors; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_scratch; }; template class KissFFTKokkos { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; KOKKOS_INLINE_FUNCTION - static void kf_bfly2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly2(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; FFT_KOKKOS_SCALAR t[2]; int Fout2_count; int tw1_count = 0; @@ -179,10 +179,10 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly4(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly4(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, const size_t m, int Fout_count) { - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; FFT_KOKKOS_SCALAR scratch[6][2]; size_t k=m; const size_t m2=2*m; @@ -237,12 +237,12 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly3(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly3(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, size_t m, int Fout_count) { size_t k=m; const size_t m2 = 2*m; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; FFT_KOKKOS_SCALAR scratch[5][2]; FFT_KOKKOS_SCALAR epi3[2]; //C_EQ(epi3,d_twiddles[fstride*m]); @@ -289,12 +289,12 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly5(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly5(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { int u; FFT_KOKKOS_SCALAR scratch[13][2]; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; FFT_KOKKOS_SCALAR ya[2],yb[2]; //C_EQ(ya,d_twiddles[fstride*m]); ya[1] = d_twiddles(fstride*m).im; @@ -369,15 +369,15 @@ class KissFFTKokkos { /* perform the butterfly for one stage of a mixed radix FFT */ KOKKOS_INLINE_FUNCTION - static void kf_bfly_generic(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly_generic(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int p, int Fout_count) { int u,k,q1,q; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; FFT_KOKKOS_SCALAR t[2]; int Norig = st.nfft; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_scratch = st.d_scratch; + typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_scratch = st.d_scratch; for ( u=0; u &st, int Fout_count, int f_count, int factors_count) + const typename FFT_AT::t_int_64_um &d_factors, const kiss_fft_state_kokkos &st, int Fout_count, int f_count, int factors_count) { const int beg = Fout_count; const int p = d_factors[factors_count++]; /* the radix */ @@ -496,12 +496,12 @@ class KissFFTKokkos { st.nfft = nfft; st.inverse = inverse_fft; - typename FFT_KOKKOS_AT::tdual_int_64 k_factors = typename FFT_KOKKOS_AT::tdual_int_64(); - typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d k_twiddles = typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d(); + typename FFT_AT::tdual_int_64 k_factors = typename FFT_AT::tdual_int_64(); + typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d k_twiddles = typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d(); if (nfft > 0) { - k_factors = typename FFT_KOKKOS_AT::tdual_int_64("kissfft:factors",MAXFACTORS*2); - k_twiddles = typename FFT_KOKKOS_AT::tdual_FFT_KOKKOS_DATA_1d("kissfft:twiddles",nfft); + k_factors = typename FFT_AT::tdual_int_64("kissfft:factors",MAXFACTORS*2); + k_twiddles = typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d("kissfft:twiddles",nfft); for (i=0;i(); @@ -524,12 +524,12 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_fin, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um &d_fout, int in_stride, int offset) + static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_fin, typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_fout, int in_stride, int offset) { //if (d_fin.data() == d_fout.data()) { // // NOTE: this is not really an in-place FFT algorithm. // // It just performs an out-of-place FFT into a temp buffer - // typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_tmpbuf = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); + // typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_tmpbuf = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); // kf_work(d_tmpbuf,d_fin,1,in_stride,st.d_factors,st,offset,offset).re; // Kokkos::deep_copy(d_fout,d_tmpbuf); //} else { @@ -538,7 +538,7 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_fin, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_DATA_1d_um d_fout, int offset) + static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_fin, typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_fout, int offset) { kiss_fft_stride(cfg,d_fin,d_fout,1,offset); } diff --git a/src/KOKKOS/pack_kokkos.h b/src/KOKKOS/pack_kokkos.h index 97d35afe26..5e014db020 100644 --- a/src/KOKKOS/pack_kokkos.h +++ b/src/KOKKOS/pack_kokkos.h @@ -38,13 +38,13 @@ template class PackKokkos { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; struct pack_3d_functor { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typedef FFTArrayTypes FFT_AT; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -52,7 +52,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - pack_3d_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + pack_3d_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -80,7 +80,7 @@ public: } }; -static void pack_3d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) +static void pack_3d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -98,7 +98,7 @@ struct unpack_3d_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -106,7 +106,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -134,7 +134,7 @@ public: } }; -static void unpack_3d(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -153,7 +153,7 @@ struct unpack_3d_permute1_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -161,7 +161,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_1_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_1_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -189,7 +189,7 @@ public: } }; -static void unpack_3d_permute1_1(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_1(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -206,7 +206,7 @@ struct unpack_3d_permute1_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -214,7 +214,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_2_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_2_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -243,7 +243,7 @@ public: } }; -static void unpack_3d_permute1_2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_2(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -261,7 +261,7 @@ struct unpack_3d_permute1_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -270,7 +270,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute1_n_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_n_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -299,7 +299,7 @@ public: } }; -static void unpack_3d_permute1_n(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_n(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -317,7 +317,7 @@ struct unpack_3d_permute2_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -325,7 +325,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_1_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_1_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -352,7 +352,7 @@ public: } }; -static void unpack_3d_permute2_1(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_1(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -370,7 +370,7 @@ struct unpack_3d_permute2_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -378,7 +378,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_2_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_2_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -406,7 +406,7 @@ public: } }; -static void unpack_3d_permute2_2(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_2(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -423,7 +423,7 @@ struct unpack_3d_permute2_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -432,7 +432,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute2_n_functor(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_n_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -460,7 +460,7 @@ public: } }; -static void unpack_3d_permute2_n(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_n(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 3fc90c088d..ed7ace08c1 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -582,7 +582,7 @@ void PPPMKokkos::compute(int eflag, int vflag) if (atom->nmax > nmax) { nmax = atomKK->nmax; d_part2grid = typename AT::t_int_1d_3("pppm:part2grid",nmax); - d_rho1d = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + d_rho1d = typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); } // find grid points for all my particles @@ -753,7 +753,7 @@ void PPPMKokkos::allocate() // allocate distributed grid data - d_density_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_density_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); memoryKK->create_kokkos(k_density_fft,density_fft,nfft_both,"pppm:d_density_fft"); d_density_fft = k_density_fft.view(); @@ -775,16 +775,16 @@ void PPPMKokkos::allocate() d_fkz = typename AT::t_float_1d("pppm:d_fkz",nfft_both); } - d_vdx_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdy_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdz_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdx_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdy_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdz_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // summation coeffs order_allocated = order; k_gf_b = typename DAT::tdual_float_1d("pppm:gf_b",order); d_gf_b = k_gf_b.view(); - d_rho1d = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + d_rho1d = typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); k_rho_coeff = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d("pppm:rho_coeff",order,order/2-(1-order)/2+1); d_rho_coeff = k_rho_coeff.view(); h_rho_coeff = k_rho_coeff.h_view; @@ -847,14 +847,14 @@ void PPPMKokkos::allocate_peratom() { peratom_allocate_flag = 1; - d_u_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_u_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v0_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v1_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v2_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v3_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v4_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v5_brick = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v0_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v1_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v2_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v3_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v4_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v5_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // use same GC ghost grid object for peratom grid communication diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index dc0fbd88e5..09513c9a2f 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -131,7 +131,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; PPPMKokkos(class LAMMPS *); ~PPPMKokkos() override; @@ -350,7 +350,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { int nx,ny,nz; typename AT::t_int_1d_um d_list_index; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf; int unpack_offset; DAT::tdual_int_scalar k_flag; @@ -364,11 +364,11 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { typename ArrayTypes::t_efloat_1d d_eatom; typename ArrayTypes::t_virial_array d_vatom; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_density_brick; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_u_brick; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_density_brick; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_u_brick; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; typename AT::t_float_1d d_greensfn; typename AT::t_virial_array d_vg; typename AT::t_float_1d d_fkx; @@ -377,17 +377,17 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_density_fft; FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work1; FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work2; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_density_fft; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_work1; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_work2; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_density_fft; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_work1; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_work2; DAT::tdual_float_1d k_gf_b; typename AT::t_float_1d d_gf_b; //FFT_KOKKOS_SCALAR **rho1d,**rho_coeff,**drho1d,**drho_coeff; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d_3 d_rho1d; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3 d_rho1d; FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d k_rho_coeff; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_2d d_rho_coeff; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d d_rho_coeff; FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_2d h_rho_coeff; //double **acons; typename Kokkos::DualView::t_host acons; diff --git a/src/KOKKOS/remap_kokkos.cpp b/src/KOKKOS/remap_kokkos.cpp index d6b8a5691c..18ba626460 100644 --- a/src/KOKKOS/remap_kokkos.cpp +++ b/src/KOKKOS/remap_kokkos.cpp @@ -59,7 +59,7 @@ RemapKokkos::~RemapKokkos() /* ---------------------------------------------------------------------- */ template -void RemapKokkos::perform(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_buf) +void RemapKokkos::perform(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_buf) { remap_3d_kokkos(d_in,d_out,d_buf,plan); } @@ -103,7 +103,7 @@ void RemapKokkos::perform(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALA ------------------------------------------------------------------------- */ template -void RemapKokkos::remap_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_buf, +void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_buf, struct remap_plan_3d_kokkos *plan) { // collective flag not yet supported @@ -111,7 +111,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKK // use point-to-point communication int i,isend,irecv; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; if (plan->memory == 0) d_scratch = d_buf; @@ -465,7 +465,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat size = MAX(size,plan->send_size[nsend]); if (size) { - plan->d_sendbuf = typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:sendbuf",size); + plan->d_sendbuf = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:sendbuf",size); if (!plan->d_sendbuf.data()) return nullptr; } @@ -475,7 +475,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat if (memory == 1) { if (nrecv > 0) { plan->d_scratch = - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); if (!plan->d_scratch.data()) return nullptr; } } diff --git a/src/KOKKOS/remap_kokkos.h b/src/KOKKOS/remap_kokkos.h index 035b58260e..ad5fa9833d 100644 --- a/src/KOKKOS/remap_kokkos.h +++ b/src/KOKKOS/remap_kokkos.h @@ -27,14 +27,14 @@ namespace LAMMPS_NS { template struct remap_plan_3d_kokkos { typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_sendbuf; // buffer for MPI sends + typedef FFTArrayTypes FFT_AT; + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_sendbuf; // buffer for MPI sends FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_sendbuf; // host buffer for MPI sends - typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; // scratch buffer for MPI recvs + typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; // scratch buffer for MPI recvs FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_scratch; // host scratch buffer for MPI recvs - void (*pack)(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); + void (*pack)(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); // which pack function to use - void (*unpack)(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); + void (*unpack)(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); // which unpack function to use int *send_offset; // extraction loc for each send int *send_size; // size of each send message @@ -61,16 +61,16 @@ template class RemapKokkos : protected Pointers { public: typedef DeviceType device_type; - typedef FFTArrayTypes FFT_KOKKOS_AT; + typedef FFTArrayTypes FFT_AT; RemapKokkos(class LAMMPS *); RemapKokkos(class LAMMPS *, MPI_Comm,int,int,int,int,int,int, int,int,int,int,int,int,int,int,int,int,int,int); ~RemapKokkos() override; - void perform(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d); + void perform(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d); struct remap_plan_3d_kokkos *plan; - void remap_3d_kokkos(typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_KOKKOS_AT::t_FFT_KOKKOS_SCALAR_1d, struct remap_plan_3d_kokkos *); + void remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, struct remap_plan_3d_kokkos *); struct remap_plan_3d_kokkos *remap_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, int, int, int, int, From 68c53886b8f52ec1f4af801783c87d368cef10e2 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 13 Dec 2023 15:09:02 -0700 Subject: [PATCH 06/89] Revert some name changes --- src/KOKKOS/Install.sh | 2 +- src/KOKKOS/fft3d_kokkos.cpp | 88 +++++++++++----------- src/KOKKOS/fft3d_kokkos.h | 12 +-- src/KOKKOS/fftdata_kokkos.h | 80 ++++++++++---------- src/KOKKOS/grid3d_kokkos.cpp | 28 +++---- src/KOKKOS/grid3d_kokkos.h | 12 +-- src/KOKKOS/kissfft_kokkos.h | 64 ++++++++-------- src/KOKKOS/kokkos_base_fft.h | 12 +-- src/KOKKOS/lmpfftsettings_kokkos.h | 15 +--- src/KOKKOS/pack_kokkos.h | 48 ++++++------ src/KOKKOS/pppm_kokkos.cpp | 116 ++++++++++++++--------------- src/KOKKOS/pppm_kokkos.h | 48 ++++++------ src/KOKKOS/remap_kokkos.cpp | 20 ++--- src/KOKKOS/remap_kokkos.h | 16 ++-- 14 files changed, 275 insertions(+), 286 deletions(-) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index ba6c4ed427..2dcf49ce06 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -200,7 +200,7 @@ action kokkos_few.h action kokkos_type.h action kokkos.cpp action kokkos.h -action lmpfftsettings_kokkos.h +action lmpfftsettings_kokkos.h lmpfftsettings.h action math_special_kokkos.cpp action math_special_kokkos.h action meam_dens_final_kokkos.h meam_dens_final.cpp diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 9e7b87b8d8..d78239606e 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -88,10 +88,10 @@ FFT3dKokkos::~FFT3dKokkos() /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::compute(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, int flag) +void FFT3dKokkos::compute(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, int flag) { - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_out_data((FFT_KOKKOS_DATA_POINTER)d_out.data(),d_out.size()/2); + typename FFT_AT::t_FFT_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_AT::t_FFT_DATA_1d d_out_data((FFT_KOKKOS_DATA_POINTER)d_out.data(),d_out.size()/2); fft_3d_kokkos(d_in_data,d_out_data,flag,plan); } @@ -99,9 +99,9 @@ void FFT3dKokkos::compute(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_ /* ---------------------------------------------------------------------- */ template -void FFT3dKokkos::timing1d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, int nsize, int flag) +void FFT3dKokkos::timing1d(typename FFT_AT::t_FFT_SCALAR_1d d_in, int nsize, int flag) { - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); + typename FFT_AT::t_FFT_DATA_1d d_in_data((FFT_KOKKOS_DATA_POINTER)d_in.data(),d_in.size()/2); fft_3d_1d_only_kokkos(d_in_data,nsize,flag,plan); } @@ -141,21 +141,21 @@ struct norm_functor { public: typedef DeviceType device_type; typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_out; + typename FFT_AT::t_FFT_DATA_1d_um d_out; int norm; - norm_functor(typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_out_, int norm_): + norm_functor(typename FFT_AT::t_FFT_DATA_1d &d_out_, int norm_): d_out(d_out_),norm(norm_) {} KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { #if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT) - FFT_KOKKOS_SCALAR* out_ptr = (FFT_KOKKOS_SCALAR *)(d_out.data()+i); + FFT_SCALAR* out_ptr = (FFT_SCALAR *)(d_out.data()+i); *(out_ptr++) *= norm; *(out_ptr++) *= norm; #elif defined(FFT_KOKKOS_MKL) d_out(i) *= norm; -#else // FFT_KOKKOS_KISS +#else // FFT_KISS d_out(i).re *= norm; d_out(i).im *= norm; #endif @@ -168,13 +168,13 @@ struct kiss_fft_functor { public: typedef DeviceType device_type; typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_data,d_tmp; + typename FFT_AT::t_FFT_DATA_1d_um d_data,d_tmp; kiss_fft_state_kokkos st; int length; kiss_fft_functor() = default; - kiss_fft_functor(typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_data_,typename FFT_AT::t_FFT_KOKKOS_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): + kiss_fft_functor(typename FFT_AT::t_FFT_DATA_1d &d_data_,typename FFT_AT::t_FFT_DATA_1d &d_tmp_, kiss_fft_state_kokkos &st_, int length_): d_data(d_data_), d_tmp(d_tmp_), st(st_) @@ -191,11 +191,11 @@ public: #endif template -void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_in, typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) +void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, typename FFT_AT::t_FFT_DATA_1d d_out, int flag, struct fft_plan_3d_kokkos *plan) { int total,length; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_data,d_copy; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; + typename FFT_AT::t_FFT_DATA_1d d_data,d_copy; + typename FFT_AT::t_FFT_SCALAR_1d d_in_scalar,d_data_scalar,d_out_scalar,d_copy_scalar,d_scratch_scalar; // pre-remap to prepare for 1st FFTs if needed // copy = loc for remap result @@ -204,9 +204,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 if (plan->pre_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_in_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_in.data(),d_in.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_in_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_in.data(),d_in.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_in_scalar, d_copy_scalar, d_scratch_scalar, plan->pre_plan); @@ -234,8 +234,8 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_fast,d_data.data(),d_data.data(),-flag); #else - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_tmp = - typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_AT::t_FFT_DATA_1d d_tmp = + typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); kiss_fft_functor f; if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length); @@ -251,9 +251,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 if (plan->mid1_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid1_plan); @@ -280,7 +280,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_mid,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_mid_forward,length); else @@ -295,9 +295,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 if (plan->mid2_target == 0) d_copy = d_out; else d_copy = plan->d_copy; - d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_copy_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_copy.data(),d_copy.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); + d_copy_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_copy.data(),d_copy.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_copy_scalar, d_scratch_scalar, plan->mid2_plan); @@ -324,7 +324,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 #elif defined(FFT_KOKKOS_HIPFFT) hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else - d_tmp = typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == 1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_slow_forward,length); else @@ -337,9 +337,9 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 // destination is always out if (plan->post_plan) { - d_data_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_data.data(),d_data.size()*2); - d_out_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)d_out.data(),d_out.size()*2); - d_scratch_scalar = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d((FFT_KOKKOS_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); + d_data_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_data.data(),d_data.size()*2); + d_out_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)d_out.data(),d_out.size()*2); + d_scratch_scalar = typename FFT_AT::t_FFT_SCALAR_1d((FFT_SCALAR*)plan->d_scratch.data(),plan->d_scratch.size()*2); remapKK->remap_3d_kokkos(d_data_scalar, d_out_scalar, d_scratch_scalar, plan->post_plan); @@ -348,7 +348,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1 // scaling if required if (flag == -1 && plan->scaled) { - FFT_KOKKOS_SCALAR norm = plan->norm; + FFT_SCALAR norm = plan->norm; int num = plan->normnum; norm_functor f(d_out,norm); @@ -443,7 +443,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl plan->pre_plan = remapKK->remap_3d_create_plan_kokkos(comm,in_ilo,in_ihi,in_jlo,in_jhi,in_klo,in_khi, first_ilo,first_ihi,first_jlo,first_jhi, - first_klo,first_khi,2,0,0,FFT_KOKKOS_PRECISION, + first_klo,first_khi,2,0,0,FFT_PRECISION, usecollective,usecuda_aware); if (plan->pre_plan == nullptr) return nullptr; } @@ -468,7 +468,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl first_ilo,first_ihi,first_jlo,first_jhi, first_klo,first_khi, second_ilo,second_ihi,second_jlo,second_jhi, - second_klo,second_khi,2,1,0,FFT_KOKKOS_PRECISION, + second_klo,second_khi,2,1,0,FFT_PRECISION, usecollective,usecuda_aware); if (plan->mid1_plan == nullptr) return nullptr; @@ -509,7 +509,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl second_jlo,second_jhi,second_klo,second_khi, second_ilo,second_ihi, third_jlo,third_jhi,third_klo,third_khi, - third_ilo,third_ihi,2,1,0,FFT_KOKKOS_PRECISION, + third_ilo,third_ihi,2,1,0,FFT_PRECISION, usecollective,usecuda_aware); if (plan->mid2_plan == nullptr) return nullptr; @@ -537,7 +537,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl third_klo,third_khi,third_ilo,third_ihi, third_jlo,third_jhi, out_klo,out_khi,out_ilo,out_ihi, - out_jlo,out_jhi,2,(permute+1)%3,0,FFT_KOKKOS_PRECISION, + out_jlo,out_jhi,2,(permute+1)%3,0,FFT_PRECISION, usecollective,usecuda_aware); if (plan->post_plan == nullptr) return nullptr; } @@ -599,11 +599,11 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl *nbuf = copy_size + scratch_size; if (copy_size) { - plan->d_copy = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("fft3d:copy",copy_size); + plan->d_copy = typename FFT_AT::t_FFT_DATA_1d("fft3d:copy",copy_size); } if (scratch_size) { - plan->d_scratch = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("fft3d:scratch",scratch_size); + plan->d_scratch = typename FFT_AT::t_FFT_DATA_1d("fft3d:scratch",scratch_size); } // system specific pre-computation of 1d FFT coeffs @@ -697,17 +697,17 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl cufftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, &nfast,1,plan->length1, - CUFFT_KOKKOS_TYPE,plan->total1/plan->length1); + CUFFT_TYPE,plan->total1/plan->length1); cufftPlanMany(&(plan->plan_mid), 1, &nmid, &nmid,1,plan->length2, &nmid,1,plan->length2, - CUFFT_KOKKOS_TYPE,plan->total2/plan->length2); + CUFFT_TYPE,plan->total2/plan->length2); cufftPlanMany(&(plan->plan_slow), 1, &nslow, &nslow,1,plan->length3, &nslow,1,plan->length3, - CUFFT_KOKKOS_TYPE,plan->total3/plan->length3); + CUFFT_TYPE,plan->total3/plan->length3); #elif defined(FFT_KOKKOS_HIPFFT) @@ -838,7 +838,7 @@ void FFT3dKokkos::bifactor(int n, int *factor1, int *factor2) ------------------------------------------------------------------------- */ template -void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_data, int nsize, int flag, +void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d d_data, int nsize, int flag, struct fft_plan_3d_kokkos *plan) { // total = size of data needed in each dim @@ -896,8 +896,8 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKO hipfftExec(plan->plan_slow,d_data.data(),d_data.data(),-flag); #else kiss_fft_functor f; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_tmp = - typename FFT_AT::t_FFT_KOKKOS_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); + typename FFT_AT::t_FFT_DATA_1d d_tmp = + typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_data.extent(0)); if (flag == -1) { f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length1); Kokkos::parallel_for(total1/length1,f); @@ -923,7 +923,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKO // limit num to size of data if (flag == 1 && plan->scaled) { - FFT_KOKKOS_SCALAR norm = plan->norm; + FFT_SCALAR norm = plan->norm; int num = MIN(plan->normnum,nsize); norm_functor f(d_data,norm); diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index 9729bc6a63..ed49c4b1ee 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -34,8 +34,8 @@ struct fft_plan_3d_kokkos { struct remap_plan_3d_kokkos *mid1_plan; // remap from 1st -> 2nd FFTs struct remap_plan_3d_kokkos *mid2_plan; // remap from 2nd -> 3rd FFTs struct remap_plan_3d_kokkos *post_plan; // remap from 3rd FFTs -> output - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_copy; // memory for remap results (if needed) - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_scratch; // scratch space for remaps + typename FFT_AT::t_FFT_DATA_1d d_copy; // memory for remap results (if needed) + typename FFT_AT::t_FFT_DATA_1d d_scratch; // scratch space for remaps int total1,total2,total3; // # of 1st,2nd,3rd FFTs (times length) int length1,length2,length3; // length of 1st,2nd,3rd FFTs int pre_target; // where to put remap results @@ -85,8 +85,8 @@ class FFT3dKokkos : protected Pointers { int,int,int,int,int,int,int,int,int,int,int,int,int,int,int, int,int,int *,int,int); ~FFT3dKokkos() override; - void compute(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, int); - void timing1d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, int, int); + void compute(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, int); + void timing1d(typename FFT_AT::t_FFT_SCALAR_1d, int, int); private: struct fft_plan_3d_kokkos *plan; @@ -96,7 +96,7 @@ class FFT3dKokkos : protected Pointers { KissFFTKokkos *kissfftKK; #endif - void fft_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d, typename FFT_AT::t_FFT_KOKKOS_DATA_1d, int, struct fft_plan_3d_kokkos *); + void fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d, typename FFT_AT::t_FFT_DATA_1d, int, struct fft_plan_3d_kokkos *); struct fft_plan_3d_kokkos *fft_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, @@ -105,7 +105,7 @@ class FFT3dKokkos : protected Pointers { void fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokkos *); - void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_KOKKOS_DATA_1d, int, int, struct fft_plan_3d_kokkos *); + void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d, int, int, struct fft_plan_3d_kokkos *); void bifactor(int, int *, int *); }; diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index d52bc0b968..15dca33bcc 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -20,8 +20,8 @@ // data types for 2d/3d FFTs -#ifndef LMP_FFT_KOKKOS_DATA_H -#define LMP_FFT_KOKKOS_DATA_H +#ifndef LMP_FFT_DATA_KOKKOS_H +#define LMP_FFT_DATA_KOKKOS_H #include "lmpfftsettings_kokkos.h" @@ -29,10 +29,10 @@ // Data types for single-precision complex -#if FFT_KOKKOS_PRECISION == 1 -#elif FFT_KOKKOS_PRECISION == 2 +#if FFT_PRECISION == 1 +#elif FFT_PRECISION == 2 #else -#error "FFT_KOKKOS_PRECISION needs to be either 1 (=single) or 2 (=double)" +#error "FFT_PRECISION needs to be either 1 (=single) or 2 (=double)" #endif @@ -86,7 +86,7 @@ #if defined(FFT_KOKKOS_MKL) #include "mkl_dfti.h" - #if defined(FFT_KOKKOS_SINGLE) + #if defined(FFT_SINGLE) typedef float _Complex FFT_KOKKOS_DATA; #define FFT_KOKKOS_MKL_PREC DFTI_SINGLE #else @@ -95,7 +95,7 @@ #endif #elif defined(FFT_KOKKOS_FFTW3) #include "fftw3.h" - #if defined(FFT_KOKKOS_SINGLE) + #if defined(FFT_SINGLE) typedef fftwf_complex FFT_KOKKOS_DATA; #define FFTW_API(function) fftwf_ ## function #else @@ -104,18 +104,18 @@ #endif #elif defined(FFT_KOKKOS_CUFFT) #include "cufft.h" - #if defined(FFT_KOKKOS_SINGLE) + #if defined(FFT_SINGLE) #define cufftExec cufftExecC2C - #define CUFFT_KOKKOS_TYPE CUFFT_KOKKOS_C2C + #define CUFFT_TYPE CUFFT_C2C typedef cufftComplex FFT_KOKKOS_DATA; #else #define cufftExec cufftExecZ2Z - #define CUFFT_KOKKOS_TYPE CUFFT_KOKKOS_Z2Z + #define CUFFT_TYPE CUFFT_Z2Z typedef cufftDoubleComplex FFT_KOKKOS_DATA; #endif #elif defined(FFT_KOKKOS_HIPFFT) #include - #if defined(FFT_KOKKOS_SINGLE) + #if defined(FFT_SINGLE) #define hipfftExec hipfftExecC2C #define HIPFFT_KOKKOS_TYPE HIPFFT_C2C typedef hipfftComplex FFT_KOKKOS_DATA; @@ -125,7 +125,7 @@ typedef hipfftDoubleComplex FFT_KOKKOS_DATA; #endif #else - #if defined(FFT_KOKKOS_SINGLE) + #if defined(FFT_SINGLE) #define kiss_fft_scalar float #else #define kiss_fft_scalar double @@ -141,7 +141,7 @@ // (double[2]*) is not a 1D pointer #if defined(FFT_KOKKOS_FFTW3) - typedef FFT_KOKKOS_SCALAR* FFT_KOKKOS_DATA_POINTER; + typedef FFT_SCALAR* FFT_KOKKOS_DATA_POINTER; #else typedef FFT_KOKKOS_DATA* FFT_KOKKOS_DATA_POINTER; #endif @@ -154,23 +154,23 @@ template <> struct FFTArrayTypes { typedef Kokkos:: - DualView tdual_FFT_KOKKOS_SCALAR_1d; -typedef tdual_FFT_KOKKOS_SCALAR_1d::t_dev t_FFT_KOKKOS_SCALAR_1d; -typedef tdual_FFT_KOKKOS_SCALAR_1d::t_dev_um t_FFT_KOKKOS_SCALAR_1d_um; + DualView tdual_FFT_SCALAR_1d; +typedef tdual_FFT_SCALAR_1d::t_dev t_FFT_SCALAR_1d; +typedef tdual_FFT_SCALAR_1d::t_dev_um t_FFT_SCALAR_1d_um; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d; -typedef tdual_FFT_KOKKOS_SCALAR_2d::t_dev t_FFT_KOKKOS_SCALAR_2d; +typedef Kokkos::DualView tdual_FFT_SCALAR_2d; +typedef tdual_FFT_SCALAR_2d::t_dev t_FFT_SCALAR_2d; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d_3; -typedef tdual_FFT_KOKKOS_SCALAR_2d_3::t_dev t_FFT_KOKKOS_SCALAR_2d_3; +typedef Kokkos::DualView tdual_FFT_SCALAR_2d_3; +typedef tdual_FFT_SCALAR_2d_3::t_dev t_FFT_SCALAR_2d_3; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_3d; -typedef tdual_FFT_KOKKOS_SCALAR_3d::t_dev t_FFT_KOKKOS_SCALAR_3d; +typedef Kokkos::DualView tdual_FFT_SCALAR_3d; +typedef tdual_FFT_SCALAR_3d::t_dev t_FFT_SCALAR_3d; typedef Kokkos:: - DualView tdual_FFT_KOKKOS_DATA_1d; -typedef tdual_FFT_KOKKOS_DATA_1d::t_dev t_FFT_KOKKOS_DATA_1d; -typedef tdual_FFT_KOKKOS_DATA_1d::t_dev_um t_FFT_KOKKOS_DATA_1d_um; + DualView tdual_FFT_DATA_1d; +typedef tdual_FFT_DATA_1d::t_dev t_FFT_DATA_1d; +typedef tdual_FFT_DATA_1d::t_dev_um t_FFT_DATA_1d_um; typedef Kokkos:: DualView tdual_int_64; @@ -186,23 +186,23 @@ struct FFTArrayTypes { //Kspace typedef Kokkos:: - DualView tdual_FFT_KOKKOS_SCALAR_1d; -typedef tdual_FFT_KOKKOS_SCALAR_1d::t_host t_FFT_KOKKOS_SCALAR_1d; -typedef tdual_FFT_KOKKOS_SCALAR_1d::t_host_um t_FFT_KOKKOS_SCALAR_1d_um; + DualView tdual_FFT_SCALAR_1d; +typedef tdual_FFT_SCALAR_1d::t_host t_FFT_SCALAR_1d; +typedef tdual_FFT_SCALAR_1d::t_host_um t_FFT_SCALAR_1d_um; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d; -typedef tdual_FFT_KOKKOS_SCALAR_2d::t_host t_FFT_KOKKOS_SCALAR_2d; +typedef Kokkos::DualView tdual_FFT_SCALAR_2d; +typedef tdual_FFT_SCALAR_2d::t_host t_FFT_SCALAR_2d; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_2d_3; -typedef tdual_FFT_KOKKOS_SCALAR_2d_3::t_host t_FFT_KOKKOS_SCALAR_2d_3; +typedef Kokkos::DualView tdual_FFT_SCALAR_2d_3; +typedef tdual_FFT_SCALAR_2d_3::t_host t_FFT_SCALAR_2d_3; -typedef Kokkos::DualView tdual_FFT_KOKKOS_SCALAR_3d; -typedef tdual_FFT_KOKKOS_SCALAR_3d::t_host t_FFT_KOKKOS_SCALAR_3d; +typedef Kokkos::DualView tdual_FFT_SCALAR_3d; +typedef tdual_FFT_SCALAR_3d::t_host t_FFT_SCALAR_3d; typedef Kokkos:: - DualView tdual_FFT_KOKKOS_DATA_1d; -typedef tdual_FFT_KOKKOS_DATA_1d::t_host t_FFT_KOKKOS_DATA_1d; -typedef tdual_FFT_KOKKOS_DATA_1d::t_host_um t_FFT_KOKKOS_DATA_1d_um; + DualView tdual_FFT_DATA_1d; +typedef tdual_FFT_DATA_1d::t_host t_FFT_DATA_1d; +typedef tdual_FFT_DATA_1d::t_host_um t_FFT_DATA_1d_um; typedef Kokkos:: DualView tdual_int_64; @@ -212,12 +212,12 @@ typedef tdual_int_64::t_host_um t_int_64_um; }; #endif -typedef struct FFTArrayTypes FFT_KOKKOS_DAT; -typedef struct FFTArrayTypes FFT_KOKKOS_HAT; +typedef struct FFTArrayTypes FFT_DAT; +typedef struct FFTArrayTypes FFT_HAT; #if defined(FFT_KOKKOS_KISSFFT) -#include "kissfft_kokkos.h" // uses t_FFT_KOKKOS_DATA_1d, needs to come last +#include "kissfft_kokkos.h" // uses t_FFT_DATA_1d, needs to come last #endif diff --git a/src/KOKKOS/grid3d_kokkos.cpp b/src/KOKKOS/grid3d_kokkos.cpp index 0f8e0bdc4e..9a82e0157d 100644 --- a/src/KOKKOS/grid3d_kokkos.cpp +++ b/src/KOKKOS/grid3d_kokkos.cpp @@ -636,7 +636,7 @@ void Grid3dKokkos::setup_comm_tiled(int &nbuf1, int &nbuf2) template void Grid3dKokkos::forward_comm(int caller, void *ptr, int which, int nper, int nbyte, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf2, + FFT_DAT::tdual_FFT_SCALAR_1d& k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d& k_buf2, MPI_Datatype datatype) { if (caller == KSPACE) { @@ -655,14 +655,14 @@ void Grid3dKokkos::forward_comm(int caller, void *ptr, int which, in template void Grid3dKokkos:: forward_comm_kspace_brick(KSpace *kspace, int which, int nper, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int m; MPI_Request request; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_KOKKOS_SCALAR* buf1; - FFT_KOKKOS_SCALAR* buf2; + FFT_SCALAR* buf1; + FFT_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -709,13 +709,13 @@ forward_comm_kspace_brick(KSpace *kspace, int which, int nper, template void Grid3dKokkos:: forward_comm_kspace_tiled(KSpace *kspace, int which, int nper, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int i,m,offset; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_KOKKOS_SCALAR* buf1; - FFT_KOKKOS_SCALAR* buf2; + FFT_SCALAR* buf1; + FFT_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -776,7 +776,7 @@ forward_comm_kspace_tiled(KSpace *kspace, int which, int nper, template void Grid3dKokkos::reverse_comm(int caller, void *ptr, int which, int nper, int nbyte, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d& k_buf2, + FFT_DAT::tdual_FFT_SCALAR_1d& k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d& k_buf2, MPI_Datatype datatype) { if (caller == KSPACE) { @@ -795,14 +795,14 @@ void Grid3dKokkos::reverse_comm(int caller, void *ptr, int which, in template void Grid3dKokkos:: reverse_comm_kspace_brick(KSpace *kspace, int which, int nper, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int m; MPI_Request request; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_KOKKOS_SCALAR* buf1; - FFT_KOKKOS_SCALAR* buf2; + FFT_SCALAR* buf1; + FFT_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); @@ -850,14 +850,14 @@ reverse_comm_kspace_brick(KSpace *kspace, int which, int nper, template void Grid3dKokkos:: reverse_comm_kspace_tiled(KSpace *kspace, int which, int nper, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf1, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf2, MPI_Datatype datatype) + FFT_DAT::tdual_FFT_SCALAR_1d &k_buf1, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf2, MPI_Datatype datatype) { int i,m,offset; KokkosBaseFFT* kspaceKKBase = dynamic_cast(kspace); - FFT_KOKKOS_SCALAR* buf1; - FFT_KOKKOS_SCALAR* buf2; + FFT_SCALAR* buf1; + FFT_SCALAR* buf2; if (lmp->kokkos->gpu_aware_flag) { buf1 = k_buf1.view().data(); buf2 = k_buf2.view().data(); diff --git a/src/KOKKOS/grid3d_kokkos.h b/src/KOKKOS/grid3d_kokkos.h index 864ac19c06..19751d83c9 100644 --- a/src/KOKKOS/grid3d_kokkos.h +++ b/src/KOKKOS/grid3d_kokkos.h @@ -34,9 +34,9 @@ class Grid3dKokkos : public Grid3d { ~Grid3dKokkos() override; void forward_comm(int, void *, int, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); void reverse_comm(int, void *, int, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); private: DAT::tdual_int_2d k_swap_packlist; @@ -57,13 +57,13 @@ class Grid3dKokkos : public Grid3d { void setup_comm_tiled(int &, int &) override; void forward_comm_kspace_brick(class KSpace *, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); void forward_comm_kspace_tiled(class KSpace *, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); void reverse_comm_kspace_brick(class KSpace *, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); void reverse_comm_kspace_tiled(class KSpace *, int, int, - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, MPI_Datatype); + FFT_DAT::tdual_FFT_SCALAR_1d &, FFT_DAT::tdual_FFT_SCALAR_1d &, MPI_Datatype); void grow_swap() override; diff --git a/src/KOKKOS/kissfft_kokkos.h b/src/KOKKOS/kissfft_kokkos.h index 66f32d29fb..265677a21c 100644 --- a/src/KOKKOS/kissfft_kokkos.h +++ b/src/KOKKOS/kissfft_kokkos.h @@ -119,14 +119,14 @@ }while(0) */ -#define KISS_FFT_KOKKOS_COS(phase) (FFT_KOKKOS_SCALAR) cos(phase) -#define KISS_FFT_KOKKOS_SIN(phase) (FFT_KOKKOS_SCALAR) sin(phase) +#define KISS_FFT_COS(phase) (FFT_SCALAR) cos(phase) +#define KISS_FFT_SIN(phase) (FFT_SCALAR) sin(phase) #define HALF_OF(x) ((x)*.5) #define kf_cexp(x,x_index,phase) \ do{ \ - (x)(x_index).re = KISS_FFT_KOKKOS_COS(phase);\ - (x)(x_index).im = KISS_FFT_KOKKOS_SIN(phase);\ + (x)(x_index).re = KISS_FFT_COS(phase);\ + (x)(x_index).im = KISS_FFT_SIN(phase);\ }while(0) @@ -142,8 +142,8 @@ struct kiss_fft_state_kokkos { int nfft; int inverse; typename FFT_AT::t_int_64 d_factors; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_twiddles; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d d_scratch; + typename FFT_AT::t_FFT_DATA_1d d_twiddles; + typename FFT_AT::t_FFT_DATA_1d d_scratch; }; template @@ -153,11 +153,11 @@ class KissFFTKokkos { typedef FFTArrayTypes FFT_AT; KOKKOS_INLINE_FUNCTION - static void kf_bfly2(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly2(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_KOKKOS_SCALAR t[2]; + typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_SCALAR t[2]; int Fout2_count; int tw1_count = 0; @@ -179,11 +179,11 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly4(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly4(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, const size_t m, int Fout_count) { - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_KOKKOS_SCALAR scratch[6][2]; + typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_SCALAR scratch[6][2]; size_t k=m; const size_t m2=2*m; const size_t m3=3*m; @@ -237,14 +237,14 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly3(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly3(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, size_t m, int Fout_count) { size_t k=m; const size_t m2 = 2*m; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_KOKKOS_SCALAR scratch[5][2]; - FFT_KOKKOS_SCALAR epi3[2]; + typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_SCALAR scratch[5][2]; + FFT_SCALAR epi3[2]; //C_EQ(epi3,d_twiddles[fstride*m]); epi3[0] = d_twiddles(fstride*m).re; epi3[1] = d_twiddles(fstride*m).im; @@ -289,13 +289,13 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kf_bfly5(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly5(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) { int u; - FFT_KOKKOS_SCALAR scratch[13][2]; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_KOKKOS_SCALAR ya[2],yb[2]; + FFT_SCALAR scratch[13][2]; + typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_SCALAR ya[2],yb[2]; //C_EQ(ya,d_twiddles[fstride*m]); ya[1] = d_twiddles(fstride*m).im; ya[0] = d_twiddles(fstride*m).re; @@ -369,15 +369,15 @@ class KissFFTKokkos { /* perform the butterfly for one stage of a mixed radix FFT */ KOKKOS_INLINE_FUNCTION - static void kf_bfly_generic(typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_Fout, const size_t fstride, + static void kf_bfly_generic(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int p, int Fout_count) { int u,k,q1,q; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_twiddles = st.d_twiddles; - FFT_KOKKOS_SCALAR t[2]; + typename FFT_AT::t_FFT_DATA_1d_um d_twiddles = st.d_twiddles; + FFT_SCALAR t[2]; int Norig = st.nfft; - typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_scratch = st.d_scratch; + typename FFT_AT::t_FFT_DATA_1d_um d_scratch = st.d_scratch; for ( u=0; u &st, int Fout_count, int f_count, int factors_count) { @@ -452,7 +452,7 @@ class KissFFTKokkos { p[i] * m[i] = m[i-1] m0 = n */ - static int kf_factor(int n, FFT_KOKKOS_HAT::t_int_64 h_facbuf) + static int kf_factor(int n, FFT_HAT::t_int_64 h_facbuf) { int p=4, nf=0; double floor_sqrt; @@ -497,11 +497,11 @@ class KissFFTKokkos { st.inverse = inverse_fft; typename FFT_AT::tdual_int_64 k_factors = typename FFT_AT::tdual_int_64(); - typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d k_twiddles = typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d(); + typename FFT_AT::tdual_FFT_DATA_1d k_twiddles = typename FFT_AT::tdual_FFT_DATA_1d(); if (nfft > 0) { k_factors = typename FFT_AT::tdual_int_64("kissfft:factors",MAXFACTORS*2); - k_twiddles = typename FFT_AT::tdual_FFT_KOKKOS_DATA_1d("kissfft:twiddles",nfft); + k_twiddles = typename FFT_AT::tdual_FFT_DATA_1d("kissfft:twiddles",nfft); for (i=0;i(); @@ -524,12 +524,12 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_fin, typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um &d_fout, int in_stride, int offset) + static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_AT::t_FFT_DATA_1d_um &d_fin, typename FFT_AT::t_FFT_DATA_1d_um &d_fout, int in_stride, int offset) { //if (d_fin.data() == d_fout.data()) { // // NOTE: this is not really an in-place FFT algorithm. // // It just performs an out-of-place FFT into a temp buffer - // typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_tmpbuf = typename FFT_AT::t_FFT_KOKKOS_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); + // typename FFT_AT::t_FFT_DATA_1d_um d_tmpbuf = typename FFT_AT::t_FFT_DATA_1d("kissfft:tmpbuf",d_fin.extent(1)); // kf_work(d_tmpbuf,d_fin,1,in_stride,st.d_factors,st,offset,offset).re; // Kokkos::deep_copy(d_fout,d_tmpbuf); //} else { @@ -538,7 +538,7 @@ class KissFFTKokkos { } KOKKOS_INLINE_FUNCTION - static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_fin, typename FFT_AT::t_FFT_KOKKOS_DATA_1d_um d_fout, int offset) + static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_AT::t_FFT_DATA_1d_um d_fin, typename FFT_AT::t_FFT_DATA_1d_um d_fout, int offset) { kiss_fft_stride(cfg,d_fin,d_fout,1,offset); } diff --git a/src/KOKKOS/kokkos_base_fft.h b/src/KOKKOS/kokkos_base_fft.h index 567dc02ff3..08369b3c78 100644 --- a/src/KOKKOS/kokkos_base_fft.h +++ b/src/KOKKOS/kokkos_base_fft.h @@ -12,8 +12,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_KOKKOS_BASE_FFT_KOKKOS_H -#define LMP_KOKKOS_BASE_FFT_KOKKOS_H +#ifndef LMP_KOKKOS_BASE_FFT_H +#define LMP_KOKKOS_BASE_FFT_H #include "fftdata_kokkos.h" @@ -24,10 +24,10 @@ class KokkosBaseFFT { KokkosBaseFFT() {} // Kspace - virtual void pack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; - virtual void unpack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; - virtual void pack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; - virtual void unpack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; + virtual void pack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; + virtual void unpack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; + virtual void pack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {}; + virtual void unpack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) {}; }; } diff --git a/src/KOKKOS/lmpfftsettings_kokkos.h b/src/KOKKOS/lmpfftsettings_kokkos.h index 148e001de3..6cea9bb63a 100644 --- a/src/KOKKOS/lmpfftsettings_kokkos.h +++ b/src/KOKKOS/lmpfftsettings_kokkos.h @@ -16,6 +16,8 @@ #ifndef LMP_FFT_KOKKOS_SETTINGS_H #define LMP_FFT_KOKKOS_SETTINGS_H +#include "lmpfftsettings.h" + // if user set FFTW, it means FFTW3 #ifdef FFT_KOKKOS_FFTW @@ -38,17 +40,4 @@ #define LMP_FFT_KOKKOS_LIB "KISS FFT" #endif -#ifdef FFT_KOKKOS_SINGLE -typedef float FFT_KOKKOS_SCALAR; -#define FFT_KOKKOS_PRECISION 1 -#define LMP_FFT_KOKKOS_PREC "single" -#define MPI_FFT_KOKKOS_SCALAR MPI_FLOAT -#else - -typedef double FFT_KOKKOS_SCALAR; -#define FFT_KOKKOS_PRECISION 2 -#define LMP_FFT_KOKKOS_PREC "double" -#define MPI_FFT_KOKKOS_SCALAR MPI_DOUBLE -#endif - #endif diff --git a/src/KOKKOS/pack_kokkos.h b/src/KOKKOS/pack_kokkos.h index 5e014db020..fe90d294a6 100644 --- a/src/KOKKOS/pack_kokkos.h +++ b/src/KOKKOS/pack_kokkos.h @@ -44,7 +44,7 @@ struct pack_3d_functor { public: typedef DeviceType device_type; typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -52,7 +52,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - pack_3d_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + pack_3d_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -80,7 +80,7 @@ public: } }; -static void pack_3d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) +static void pack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -98,7 +98,7 @@ struct unpack_3d_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -106,7 +106,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -134,7 +134,7 @@ public: } }; -static void unpack_3d(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -153,7 +153,7 @@ struct unpack_3d_permute1_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -161,7 +161,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_1_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_1_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -189,7 +189,7 @@ public: } }; -static void unpack_3d_permute1_1(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -206,7 +206,7 @@ struct unpack_3d_permute1_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -214,7 +214,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute1_2_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_2_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -243,7 +243,7 @@ public: } }; -static void unpack_3d_permute1_2(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -261,7 +261,7 @@ struct unpack_3d_permute1_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -270,7 +270,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute1_n_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute1_n_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -299,7 +299,7 @@ public: } }; -static void unpack_3d_permute1_n(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute1_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -317,7 +317,7 @@ struct unpack_3d_permute2_1_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -325,7 +325,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_1_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_1_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -352,7 +352,7 @@ public: } }; -static void unpack_3d_permute2_1(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -370,7 +370,7 @@ struct unpack_3d_permute2_2_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -378,7 +378,7 @@ public: int nstride_line; // stride between successive mid indices int nstride_plane; // stride between successive slow indices - unpack_3d_permute2_2_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_2_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -406,7 +406,7 @@ public: } }; -static void unpack_3d_permute2_2(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; @@ -423,7 +423,7 @@ struct unpack_3d_permute2_n_functor { public: typedef DeviceType device_type; typedef ArrayTypes AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf,d_data; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf,d_data; int buf_offset,data_offset; int nfast; // # of elements in fast index int nmid; // # of elements in mid index @@ -432,7 +432,7 @@ public: int nstride_plane; // stride between successive slow indices int nqty; // # of values/element - unpack_3d_permute2_n_functor(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): + unpack_3d_permute2_n_functor(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf_, int buf_offset_, typename FFT_AT::t_FFT_SCALAR_1d_um d_data_, int data_offset_, struct pack_plan_3d *plan): d_buf(d_buf_), d_data(d_data_) { @@ -460,7 +460,7 @@ public: } }; -static void unpack_3d_permute2_n(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) +static void unpack_3d_permute2_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, struct pack_plan_3d *plan) { const int nslow = plan->nslow; const int nmid = plan->nmid; diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index ed7ace08c1..6e1b3a83fa 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -48,7 +48,7 @@ using namespace MathSpecialKokkos; enum{REVERSE_RHO}; enum{FORWARD_IK,FORWARD_IK_PERATOM}; -#ifdef FFT_KOKKOS_SINGLE +#ifdef FFT_SINGLE #define ZEROF 0.0f #define ONEF 1.0f #else @@ -582,7 +582,7 @@ void PPPMKokkos::compute(int eflag, int vflag) if (atom->nmax > nmax) { nmax = atomKK->nmax; d_part2grid = typename AT::t_int_1d_3("pppm:part2grid",nmax); - d_rho1d = typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + d_rho1d = typename FFT_AT::t_FFT_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); } // find grid points for all my particles @@ -595,8 +595,8 @@ void PPPMKokkos::compute(int eflag, int vflag) // to fully sum contribution in their 3d bricks // remap from 3d decomposition to FFT decomposition - gc->reverse_comm(Grid3d::KSPACE,this,REVERSE_RHO,1,sizeof(FFT_KOKKOS_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); + gc->reverse_comm(Grid3d::KSPACE,this,REVERSE_RHO,1,sizeof(FFT_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); brick2fft(); // compute potential gradient on my FFT grid and @@ -609,14 +609,14 @@ void PPPMKokkos::compute(int eflag, int vflag) // all procs communicate E-field values // to fill ghost cells surrounding their 3d bricks - gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK,3,sizeof(FFT_KOKKOS_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); + gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK,3,sizeof(FFT_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); // extra per-atom energy/virial communication if (evflag_atom) - gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK_PERATOM,7,sizeof(FFT_KOKKOS_SCALAR), - k_gc_buf1,k_gc_buf2,MPI_FFT_KOKKOS_SCALAR); + gc->forward_comm(Grid3d::KSPACE,this,FORWARD_IK_PERATOM,7,sizeof(FFT_SCALAR), + k_gc_buf1,k_gc_buf2,MPI_FFT_SCALAR); // calculate the force on my particles @@ -730,8 +730,8 @@ void PPPMKokkos::allocate() npergrid = 3; - k_gc_buf1 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); - k_gc_buf2 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); + k_gc_buf1 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); + k_gc_buf2 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); // tally local grid sizes // ngrid = count of owned+ghost grid cells on this proc @@ -753,7 +753,7 @@ void PPPMKokkos::allocate() // allocate distributed grid data - d_density_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_density_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:density_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); memoryKK->create_kokkos(k_density_fft,density_fft,nfft_both,"pppm:d_density_fft"); d_density_fft = k_density_fft.view(); @@ -775,17 +775,17 @@ void PPPMKokkos::allocate() d_fkz = typename AT::t_float_1d("pppm:d_fkz",nfft_both); } - d_vdx_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdy_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_vdz_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdx_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdx_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdy_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdy_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_vdz_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_vdz_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // summation coeffs order_allocated = order; k_gf_b = typename DAT::tdual_float_1d("pppm:gf_b",order); d_gf_b = k_gf_b.view(); - d_rho1d = typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); - k_rho_coeff = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d("pppm:rho_coeff",order,order/2-(1-order)/2+1); + d_rho1d = typename FFT_AT::t_FFT_SCALAR_2d_3("pppm:rho1d",nmax,order/2+order/2+1); + k_rho_coeff = FFT_DAT::tdual_FFT_SCALAR_2d("pppm:rho_coeff",order,order/2-(1-order)/2+1); d_rho_coeff = k_rho_coeff.view(); h_rho_coeff = k_rho_coeff.h_view; @@ -810,7 +810,7 @@ void PPPMKokkos::allocate() remap = new RemapKokkos(lmp,world, nxlo_in,nxhi_in,nylo_in,nyhi_in,nzlo_in,nzhi_in, nxlo_fft,nxhi_fft,nylo_fft,nyhi_fft,nzlo_fft,nzhi_fft, - 1,0,0,FFT_KOKKOS_PRECISION,collective_flag,gpu_aware_flag); + 1,0,0,FFT_PRECISION,collective_flag,gpu_aware_flag); } /* ---------------------------------------------------------------------- @@ -847,14 +847,14 @@ void PPPMKokkos::allocate_peratom() { peratom_allocate_flag = 1; - d_u_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_u_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:u_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v0_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v1_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v2_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v3_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v4_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); - d_v5_brick = typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v0_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v0_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v1_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v1_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v2_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v2_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v3_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v3_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v4_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v4_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); + d_v5_brick = typename FFT_AT::t_FFT_SCALAR_3d("pppm:d_v5_brick",nzhi_out-nzlo_out+1,nyhi_out-nylo_out+1,nxhi_out-nxlo_out+1); // use same GC ghost grid object for peratom grid communication @@ -862,8 +862,8 @@ void PPPMKokkos::allocate_peratom() npergrid = 7; - k_gc_buf1 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); - k_gc_buf2 = FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); + k_gc_buf1 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf1",npergrid*ngc_buf1); + k_gc_buf2 = FFT_DAT::tdual_FFT_SCALAR_1d("pppm:gc_buf2",npergrid*ngc_buf2); } /* ---------------------------------------------------------------------- @@ -1234,14 +1234,14 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) const { // The density_brick array is atomic for Half/Thread neighbor style - Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; + Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; int nx = d_part2grid(i,0); int ny = d_part2grid(i,1); int nz = d_part2grid(i,2); - const FFT_KOKKOS_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; - const FFT_KOKKOS_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; - const FFT_KOKKOS_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; + const FFT_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; + const FFT_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; + const FFT_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; nz -= nzlo_out; @@ -1250,13 +1250,13 @@ void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) c compute_rho1d(i,dx,dy,dz); - const FFT_KOKKOS_SCALAR z0 = delvolinv * q[i]; + const FFT_SCALAR z0 = delvolinv * q[i]; for (int n = nlower; n <= nupper; n++) { const int mz = n+nz; - const FFT_KOKKOS_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); + const FFT_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); for (int m = nlower; m <= nupper; m++) { const int my = m+ny; - const FFT_KOKKOS_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); + const FFT_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); for (int l = nlower; l <= nupper; l++) { const int mx = l+nx; a_density_brick(mz,my,mx) += x0*d_rho1d(i,l+order/2,0); @@ -1294,9 +1294,9 @@ void PPPMKokkos::operator() (TagPPPM_make_rho, typename Kokkos::Team if ( ((nz+nlower-nzlo_out)*ix*iy >= ito) || ((nz+nupper-nzlo_out+1)*ix*iy < ifrom) ) continue; - const FFT_KOKKOS_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; - const FFT_KOKKOS_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; - const FFT_KOKKOS_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; + const FFT_SCALAR dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; + const FFT_SCALAR dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; + const FFT_SCALAR dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; nz -= nzlo_out; ny -= nylo_out; @@ -1304,15 +1304,15 @@ void PPPMKokkos::operator() (TagPPPM_make_rho, typename Kokkos::Team compute_rho1d(i,dx,dy,dz); - const FFT_KOKKOS_SCALAR z0 = delvolinv * q[i]; + const FFT_SCALAR z0 = delvolinv * q[i]; for (int n = nlower; n <= nupper; n++) { const int mz = n+nz; const int in = mz*ix*iy; - const FFT_KOKKOS_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); + const FFT_SCALAR y0 = z0*d_rho1d(i,n+order/2,2); for (int m = nlower; m <= nupper; m++) { const int my = m+ny; const int im = in+my*ix; - const FFT_KOKKOS_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); + const FFT_SCALAR x0 = y0*d_rho1d(i,m+order/2,1); for (int l = nlower; l <= nupper; l++) { const int mx = l+nx; const int il = im+mx; @@ -2040,8 +2040,8 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_ik, const int &i) const { int l,m,n,nx,ny,nz,mx,my,mz; - FFT_KOKKOS_SCALAR x0,y0,z0; - FFT_KOKKOS_SCALAR ekx,eky,ekz; + FFT_SCALAR x0,y0,z0; + FFT_SCALAR ekx,eky,ekz; nx = d_part2grid(i,0); ny = d_part2grid(i,1); @@ -2100,8 +2100,8 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_peratom, const int &i) const { int l,m,n,nx,ny,nz,mx,my,mz; - FFT_KOKKOS_SCALAR dx,dy,dz,x0,y0,z0; - FFT_KOKKOS_SCALAR u,v0,v1,v2,v3,v4,v5; + FFT_SCALAR dx,dy,dz,x0,y0,z0; + FFT_SCALAR u,v0,v1,v2,v3,v4,v5; nx = d_part2grid(i,0); ny = d_part2grid(i,1); @@ -2155,7 +2155,7 @@ void PPPMKokkos::operator()(TagPPPM_fieldforce_peratom, const int &i ------------------------------------------------------------------------- */ template -void PPPMKokkos::pack_forward_grid_kokkos(int flag, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::pack_forward_grid_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2211,7 +2211,7 @@ void PPPMKokkos::operator()(TagPPPM_pack_forward2, const int &i) con ------------------------------------------------------------------------- */ template -void PPPMKokkos::unpack_forward_grid_kokkos(int flag, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::unpack_forward_grid_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2269,7 +2269,7 @@ void PPPMKokkos::operator()(TagPPPM_unpack_forward2, const int &i) c ------------------------------------------------------------------------- */ template -void PPPMKokkos::pack_reverse_grid_kokkos(int /*flag*/, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::pack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2299,7 +2299,7 @@ void PPPMKokkos::operator()(TagPPPM_pack_reverse, const int &i) cons ------------------------------------------------------------------------- */ template -void PPPMKokkos::unpack_reverse_grid_kokkos(int /*flag*/, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) +void PPPMKokkos::unpack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int offset, int nlist, DAT::tdual_int_2d &k_list, int index) { typename AT::t_int_2d_um d_list = k_list.view(); d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); @@ -2332,11 +2332,11 @@ void PPPMKokkos::operator()(TagPPPM_unpack_reverse, const int &i) co template KOKKOS_INLINE_FUNCTION -void PPPMKokkos::compute_rho1d(const int i, const FFT_KOKKOS_SCALAR &dx, const FFT_KOKKOS_SCALAR &dy, - const FFT_KOKKOS_SCALAR &dz) const +void PPPMKokkos::compute_rho1d(const int i, const FFT_SCALAR &dx, const FFT_SCALAR &dy, + const FFT_SCALAR &dz) const { int k,l; - FFT_KOKKOS_SCALAR r1,r2,r3; + FFT_SCALAR r1,r2,r3; for (k = (1-order)/2; k <= order/2; k++) { r1 = r2 = r3 = ZEROF; @@ -2375,10 +2375,10 @@ template void PPPMKokkos::compute_rho_coeff() { int j,k,l,m; - FFT_KOKKOS_SCALAR s; - FFT_KOKKOS_SCALAR **a = new FFT_KOKKOS_SCALAR *[order]; + FFT_SCALAR s; + FFT_SCALAR **a = new FFT_SCALAR *[order]; for (int i = 0; i < order; ++i) - a[i] = new FFT_KOKKOS_SCALAR[2*order+1]; + a[i] = new FFT_SCALAR[2*order+1]; for (k = 0; k <= 2*order; k++) for (l = 0; l < order; l++) @@ -2390,7 +2390,7 @@ void PPPMKokkos::compute_rho_coeff() s = 0.0; for (l = 0; l < j; l++) { a[l+1][k+order] = (a[l][k+1+order]-a[l][k-1+order]) / (l+1); -#ifdef FFT_KOKKOS_SINGLE +#ifdef FFT_SINGLE s += powf(0.5,(float) l+1) * (a[l][k-1+order] + powf(-1.0,(float) l) * a[l][k+1+order]) / (l+1); #else @@ -2586,18 +2586,18 @@ double PPPMKokkos::memory_usage() double bytes = (double)nmax*3 * sizeof(double); int nbrick = (nxhi_out-nxlo_out+1) * (nyhi_out-nylo_out+1) * (nzhi_out-nzlo_out+1); - bytes += (double)4 * nbrick * sizeof(FFT_KOKKOS_SCALAR); + bytes += (double)4 * nbrick * sizeof(FFT_SCALAR); if (triclinic) bytes += (double)3 * nfft_both * sizeof(double); bytes += (double)6 * nfft_both * sizeof(double); bytes += (double)nfft_both * sizeof(double); - bytes += (double)nfft_both*5 * sizeof(FFT_KOKKOS_SCALAR); + bytes += (double)nfft_both*5 * sizeof(FFT_SCALAR); if (peratom_allocate_flag) - bytes += (double)6 * nbrick * sizeof(FFT_KOKKOS_SCALAR); + bytes += (double)6 * nbrick * sizeof(FFT_SCALAR); // two Grid3d bufs - bytes += (double)(ngc_buf1 + ngc_buf2) * npergrid * sizeof(FFT_KOKKOS_SCALAR); + bytes += (double)(ngc_buf1 + ngc_buf2) * npergrid * sizeof(FFT_SCALAR); return bytes; } diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index 09513c9a2f..14d4670dbd 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -350,7 +350,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { int nx,ny,nz; typename AT::t_int_1d_um d_list_index; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um d_buf; + typename FFT_AT::t_FFT_SCALAR_1d_um d_buf; int unpack_offset; DAT::tdual_int_scalar k_flag; @@ -364,31 +364,31 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { typename ArrayTypes::t_efloat_1d d_eatom; typename ArrayTypes::t_virial_array d_vatom; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_density_brick; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_u_brick; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; + typename FFT_AT::t_FFT_SCALAR_3d d_density_brick; + typename FFT_AT::t_FFT_SCALAR_3d d_vdx_brick,d_vdy_brick,d_vdz_brick; + typename FFT_AT::t_FFT_SCALAR_3d d_u_brick; + typename FFT_AT::t_FFT_SCALAR_3d d_v0_brick,d_v1_brick,d_v2_brick; + typename FFT_AT::t_FFT_SCALAR_3d d_v3_brick,d_v4_brick,d_v5_brick; typename AT::t_float_1d d_greensfn; typename AT::t_virial_array d_vg; typename AT::t_float_1d d_fkx; typename AT::t_float_1d d_fky; typename AT::t_float_1d d_fkz; - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_density_fft; - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work1; - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_work2; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_density_fft; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_work1; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_work2; + FFT_DAT::tdual_FFT_SCALAR_1d k_density_fft; + FFT_DAT::tdual_FFT_SCALAR_1d k_work1; + FFT_DAT::tdual_FFT_SCALAR_1d k_work2; + typename FFT_AT::t_FFT_SCALAR_1d d_density_fft; + typename FFT_AT::t_FFT_SCALAR_1d d_work1; + typename FFT_AT::t_FFT_SCALAR_1d d_work2; DAT::tdual_float_1d k_gf_b; typename AT::t_float_1d d_gf_b; - //FFT_KOKKOS_SCALAR **rho1d,**rho_coeff,**drho1d,**drho_coeff; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d_3 d_rho1d; - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_2d k_rho_coeff; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_2d d_rho_coeff; - FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_2d h_rho_coeff; + //FFT_SCALAR **rho1d,**rho_coeff,**drho1d,**drho_coeff; + typename FFT_AT::t_FFT_SCALAR_2d_3 d_rho1d; + FFT_DAT::tdual_FFT_SCALAR_2d k_rho_coeff; + typename FFT_AT::t_FFT_SCALAR_2d d_rho_coeff; + FFT_HAT::t_FFT_SCALAR_2d h_rho_coeff; //double **acons; typename Kokkos::DualView::t_host acons; @@ -398,7 +398,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { RemapKokkos *remap; Grid3dKokkos *gc; - FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d k_gc_buf1,k_gc_buf2; + FFT_DAT::tdual_FFT_SCALAR_1d k_gc_buf1,k_gc_buf2; int ngc_buf1,ngc_buf2,npergrid; //int **part2grid; // storage for particle -> grid mapping @@ -429,17 +429,17 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { void fieldforce_peratom() override; KOKKOS_INLINE_FUNCTION - void compute_rho1d(const int i, const FFT_KOKKOS_SCALAR &, const FFT_KOKKOS_SCALAR &, - const FFT_KOKKOS_SCALAR &) const; + void compute_rho1d(const int i, const FFT_SCALAR &, const FFT_SCALAR &, + const FFT_SCALAR &) const; void compute_rho_coeff(); void slabcorr() override; // grid communication - void pack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; - void unpack_forward_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; - void pack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; - void unpack_reverse_grid_kokkos(int, FFT_KOKKOS_DAT::tdual_FFT_KOKKOS_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; + void pack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; + void unpack_forward_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; + void pack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) override; + void unpack_reverse_grid_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, int, DAT::tdual_int_2d &, int) override; // triclinic diff --git a/src/KOKKOS/remap_kokkos.cpp b/src/KOKKOS/remap_kokkos.cpp index 18ba626460..efc6742a25 100644 --- a/src/KOKKOS/remap_kokkos.cpp +++ b/src/KOKKOS/remap_kokkos.cpp @@ -59,7 +59,7 @@ RemapKokkos::~RemapKokkos() /* ---------------------------------------------------------------------- */ template -void RemapKokkos::perform(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_buf) +void RemapKokkos::perform(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, typename FFT_AT::t_FFT_SCALAR_1d d_buf) { remap_3d_kokkos(d_in,d_out,d_buf,plan); } @@ -103,7 +103,7 @@ void RemapKokkos::perform(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_ ------------------------------------------------------------------------- */ template -void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_in, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_out, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_buf, +void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d_in, typename FFT_AT::t_FFT_SCALAR_1d d_out, typename FFT_AT::t_FFT_SCALAR_1d d_buf, struct remap_plan_3d_kokkos *plan) { // collective flag not yet supported @@ -111,7 +111,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCAL // use point-to-point communication int i,isend,irecv; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; + typename FFT_AT::t_FFT_SCALAR_1d d_scratch; if (plan->memory == 0) d_scratch = d_buf; @@ -120,20 +120,20 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCAL // post all recvs into scratch space - FFT_KOKKOS_SCALAR* v_scratch = d_scratch.data(); + FFT_SCALAR* v_scratch = d_scratch.data(); if (!plan->usecuda_aware) { plan->h_scratch = Kokkos::create_mirror_view(d_scratch); v_scratch = plan->h_scratch.data(); } for (irecv = 0; irecv < plan->nrecv; irecv++) { - FFT_KOKKOS_SCALAR* scratch = v_scratch + plan->recv_bufloc[irecv]; + FFT_SCALAR* scratch = v_scratch + plan->recv_bufloc[irecv]; MPI_Irecv(scratch,plan->recv_size[irecv], - MPI_FFT_KOKKOS_SCALAR,plan->recv_proc[irecv],0, + MPI_FFT_SCALAR,plan->recv_proc[irecv],0, plan->comm,&plan->request[irecv]); } - FFT_KOKKOS_SCALAR* v_sendbuf = plan->d_sendbuf.data(); + FFT_SCALAR* v_sendbuf = plan->d_sendbuf.data(); if (!plan->usecuda_aware) { plan->h_sendbuf = Kokkos::create_mirror_view(plan->d_sendbuf); v_sendbuf = plan->h_sendbuf.data(); @@ -149,7 +149,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCAL if (!plan->usecuda_aware) Kokkos::deep_copy(plan->h_sendbuf,plan->d_sendbuf); - MPI_Send(v_sendbuf,plan->send_size[isend],MPI_FFT_KOKKOS_SCALAR, + MPI_Send(v_sendbuf,plan->send_size[isend],MPI_FFT_SCALAR, plan->send_proc[isend],0,plan->comm); } @@ -465,7 +465,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat size = MAX(size,plan->send_size[nsend]); if (size) { - plan->d_sendbuf = typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:sendbuf",size); + plan->d_sendbuf = typename FFT_AT::t_FFT_SCALAR_1d("remap3d:sendbuf",size); if (!plan->d_sendbuf.data()) return nullptr; } @@ -475,7 +475,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat if (memory == 1) { if (nrecv > 0) { plan->d_scratch = - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); + typename FFT_AT::t_FFT_SCALAR_1d("remap3d:scratch",nqty*out.isize*out.jsize*out.ksize); if (!plan->d_scratch.data()) return nullptr; } } diff --git a/src/KOKKOS/remap_kokkos.h b/src/KOKKOS/remap_kokkos.h index ad5fa9833d..a62c14f00b 100644 --- a/src/KOKKOS/remap_kokkos.h +++ b/src/KOKKOS/remap_kokkos.h @@ -28,13 +28,13 @@ template struct remap_plan_3d_kokkos { typedef DeviceType device_type; typedef FFTArrayTypes FFT_AT; - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_sendbuf; // buffer for MPI sends - FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_sendbuf; // host buffer for MPI sends - typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d d_scratch; // scratch buffer for MPI recvs - FFT_KOKKOS_HAT::t_FFT_KOKKOS_SCALAR_1d h_scratch; // host scratch buffer for MPI recvs - void (*pack)(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); + typename FFT_AT::t_FFT_SCALAR_1d d_sendbuf; // buffer for MPI sends + FFT_HAT::t_FFT_SCALAR_1d h_sendbuf; // host buffer for MPI sends + typename FFT_AT::t_FFT_SCALAR_1d d_scratch; // scratch buffer for MPI recvs + FFT_HAT::t_FFT_SCALAR_1d h_scratch; // host scratch buffer for MPI recvs + void (*pack)(typename FFT_AT::t_FFT_SCALAR_1d_um, int, typename FFT_AT::t_FFT_SCALAR_1d_um, int, struct pack_plan_3d *); // which pack function to use - void (*unpack)(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d_um, int, struct pack_plan_3d *); + void (*unpack)(typename FFT_AT::t_FFT_SCALAR_1d_um, int, typename FFT_AT::t_FFT_SCALAR_1d_um, int, struct pack_plan_3d *); // which unpack function to use int *send_offset; // extraction loc for each send int *send_size; // size of each send message @@ -66,11 +66,11 @@ class RemapKokkos : protected Pointers { RemapKokkos(class LAMMPS *, MPI_Comm,int,int,int,int,int,int, int,int,int,int,int,int,int,int,int,int,int,int); ~RemapKokkos() override; - void perform(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d); + void perform(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d); struct remap_plan_3d_kokkos *plan; - void remap_3d_kokkos(typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, typename FFT_AT::t_FFT_KOKKOS_SCALAR_1d, struct remap_plan_3d_kokkos *); + void remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, typename FFT_AT::t_FFT_SCALAR_1d, struct remap_plan_3d_kokkos *); struct remap_plan_3d_kokkos *remap_3d_create_plan_kokkos(MPI_Comm, int, int, int, int, int, int, int, int, int, int, int, int, From 6d1d515f3a3f7369f9ace5bef4dfcc1b81d6f80e Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 13 Dec 2023 15:32:32 -0700 Subject: [PATCH 07/89] Fix compile issue --- src/KOKKOS/pppm_kokkos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 6e1b3a83fa..2a53682df3 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -285,7 +285,7 @@ void PPPMKokkos::init() estimated_accuracy); mesg += fmt::format(" estimated relative force accuracy = {:.8g}\n", estimated_accuracy/two_charge_force); - mesg += " using " LMP_FFT_KOKKOS_PREC " precision " LMP_FFT_KOKKOS_LIB "\n"; + mesg += " using " LMP_FFT_PREC " precision " LMP_FFT_KOKKOS_LIB "\n"; mesg += fmt::format(" 3d grid and FFT values/proc = {} {}\n", ngrid_max,nfft_both_max); utils::logmesg(lmp,mesg); From b199368c19bdc5f1b5f0fc991473ae7de3f73d31 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Thu, 14 Dec 2023 10:46:32 +1000 Subject: [PATCH 08/89] add extract function to fix_property_atom --- src/fix_property_atom.cpp | 24 ++++++++++++++++++++++++ src/fix_property_atom.h | 1 + 2 files changed, 25 insertions(+) diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 9613523059..1e004ae4cb 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -948,3 +948,27 @@ int FixPropertyAtom::size_restart(int /*nlocal*/) { return values_peratom + 1; } + +/* ---------------------------------------------------------------------- + extract fix property/atom properties +------------------------------------------------------------------------- */ + +void *FixPropertyAtom::extract(const char *str, int &dim) +{ + dim=0; + if (strcmp(str, "nvalue") == 0) { + return &nvalue; + } else if (strcmp(str, "border") == 0) { + return &border; + } + dim=1; + if (strcmp(str, "styles") == 0) { + return &styles; + } else if (strcmp(str, "index") == 0) { + return &index; + } else if (strcmp(str, "cols") == 0) { + return &cols; + } + return nullptr; +} + diff --git a/src/fix_property_atom.h b/src/fix_property_atom.h index c50b6049dc..820acf3a20 100644 --- a/src/fix_property_atom.h +++ b/src/fix_property_atom.h @@ -51,6 +51,7 @@ class FixPropertyAtom : public Fix { void unpack_restart(int, int) override; int size_restart(int) override; int maxsize_restart() override; + void *extract(const char *, int &) override; double memory_usage() override; protected: From c45183d45c98c151ae4227dd415859249afae766 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Thu, 14 Dec 2023 15:38:45 -0500 Subject: [PATCH 09/89] Updated CMake build system to allow for FFT_KOKKOS parameter. Updated CMakeLists.txt to print the correct value when summarizing. --- cmake/CMakeLists.txt | 16 +--------------- cmake/Modules/Packages/KOKKOS.cmake | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 28e02bbee7..aacaca4e6c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -984,21 +984,7 @@ if(PKG_KSPACE) message(STATUS "Using non-threaded FFTs") endif() if(PKG_KOKKOS) - if(Kokkos_ENABLE_CUDA) - if(FFT STREQUAL "KISS") - message(STATUS "Kokkos FFT: KISS") - else() - message(STATUS "Kokkos FFT: cuFFT") - endif() - elseif(Kokkos_ENABLE_HIP) - if(FFT STREQUAL "KISS") - message(STATUS "Kokkos FFT: KISS") - else() - message(STATUS "Kokkos FFT: hipFFT") - endif() - else() - message(STATUS "Kokkos FFT: ${FFT}") - endif() + message(STATUS "Kokkos FFT: ${FFT_KOKKOS}") endif() endif() if(BUILD_DOC) diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index 0edd9a3baa..eb20f93956 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -131,16 +131,31 @@ if(PKG_KSPACE) list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp) + set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT) + set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES}) + validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES) + string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS) + if(Kokkos_ENABLE_CUDA) - if(NOT (FFT STREQUAL "KISS")) - target_compile_definitions(lammps PRIVATE -DFFT_CUFFT) + if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "CUFFT"))) + message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.") + elseif(FFT_KOKKOS STREQUAL "KISS") + message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.") + target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS) + elseif(FFT_KOKKOS STREQUAL "CUFFT") + target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_CUFFT) target_link_libraries(lammps PRIVATE cufft) endif() elseif(Kokkos_ENABLE_HIP) - if(NOT (FFT STREQUAL "KISS")) + if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "HIPFFT"))) + message(FATAL_ERROR "The HIP backend of Kokkos requires either KISS FFT or HIPFFT.") + elseif(FFT_KOKKOS STREQUAL "KISS") + message(WARNING "Using KISS FFT with the HIP backend of Kokkos may be sub-optimal.") + target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS) + elseif(FFT_KOKKOS STREQUAL "HIPFFT") include(DetectHIPInstallation) find_package(hipfft REQUIRED) - target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT) + target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_HIPFFT) target_link_libraries(lammps PRIVATE hip::hipfft) endif() endif() From 54089fb5abbd18d91ad2b0f1665338df403396f1 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 10:58:06 +1000 Subject: [PATCH 10/89] Revert "add extract function to fix_property_atom" This reverts commit b199368c19bdc5f1b5f0fc991473ae7de3f73d31. --- src/fix_property_atom.cpp | 24 ------------------------ src/fix_property_atom.h | 1 - 2 files changed, 25 deletions(-) diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 1e004ae4cb..9613523059 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -948,27 +948,3 @@ int FixPropertyAtom::size_restart(int /*nlocal*/) { return values_peratom + 1; } - -/* ---------------------------------------------------------------------- - extract fix property/atom properties -------------------------------------------------------------------------- */ - -void *FixPropertyAtom::extract(const char *str, int &dim) -{ - dim=0; - if (strcmp(str, "nvalue") == 0) { - return &nvalue; - } else if (strcmp(str, "border") == 0) { - return &border; - } - dim=1; - if (strcmp(str, "styles") == 0) { - return &styles; - } else if (strcmp(str, "index") == 0) { - return &index; - } else if (strcmp(str, "cols") == 0) { - return &cols; - } - return nullptr; -} - diff --git a/src/fix_property_atom.h b/src/fix_property_atom.h index 820acf3a20..c50b6049dc 100644 --- a/src/fix_property_atom.h +++ b/src/fix_property_atom.h @@ -51,7 +51,6 @@ class FixPropertyAtom : public Fix { void unpack_restart(int, int) override; int size_restart(int) override; int maxsize_restart() override; - void *extract(const char *, int &) override; double memory_usage() override; protected: From 44fbcf7bfe2b8fd27c2cacf171fdc8dc6219ec69 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 11:01:50 +1000 Subject: [PATCH 11/89] reorder "ghost" processing in fix property/atom --- src/fix_property_atom.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 9613523059..93e33ca056 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -51,6 +51,19 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : nvalue = 0; values_peratom = 0; + // get "ghost" first for settings + + border = 0; + while (iarg < narg) { + if (strcmp(arg[iarg], "ghost") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix property/atom command"); + border = utils::logical(FLERR, arg[iarg + 1], false, lmp); + iarg += 2; + } else iarg++; + } + + iarg = 3; + while (iarg < narg) { if (strcmp(arg[iarg], "mol") == 0) { if (atom->molecule_flag) @@ -168,11 +181,8 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : // optional args - border = 0; while (iarg < narg) { if (strcmp(arg[iarg], "ghost") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal fix property/atom command"); - border = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; } else if (strcmp(arg[iarg], "writedata") == 0) { if (iarg + 2 > narg) error->all(FLERR, "Illegal fix property/atom command"); From 61ca9b79db605dae37450c2b20d12d1f88ce817e Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 11:48:46 +1000 Subject: [PATCH 12/89] add custom_border to Atom and AtomKokkos --- src/KOKKOS/atom_kokkos.cpp | 7 ++++++- src/KOKKOS/atom_kokkos.h | 2 +- src/atom.cpp | 13 ++++++++++++- src/atom.h | 4 +++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/KOKKOS/atom_kokkos.cpp b/src/KOKKOS/atom_kokkos.cpp index bc393b29d8..ecd618e7ac 100644 --- a/src/KOKKOS/atom_kokkos.cpp +++ b/src/KOKKOS/atom_kokkos.cpp @@ -297,7 +297,7 @@ void AtomKokkos::grow(unsigned int mask) return index in ivector or dvector of its location ------------------------------------------------------------------------- */ -int AtomKokkos::add_custom(const char *name, int flag, int cols) +int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) { int index; @@ -342,6 +342,11 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols) dcols[index] = cols; } + if (index < 0) + error->all(FLERR,"Invalid call to AtomKokkos::add_custom()"); + else + custom_border[flag + (cols) ? 2 : 0].push_back(border); + return index; } diff --git a/src/KOKKOS/atom_kokkos.h b/src/KOKKOS/atom_kokkos.h index 21a9aeebbd..000ad5e112 100644 --- a/src/KOKKOS/atom_kokkos.h +++ b/src/KOKKOS/atom_kokkos.h @@ -154,7 +154,7 @@ class AtomKokkos : public Atom { void sync_overlapping_device(const ExecutionSpace space, unsigned int mask); void sort() override; virtual void grow(unsigned int mask); - int add_custom(const char *, int, int) override; + int add_custom(const char *, int, int, int border = 0) override; void remove_custom(int, int, int) override; virtual void deallocate_topology(); private: diff --git a/src/atom.cpp b/src/atom.cpp index b604c54e6b..8ac72e8950 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2605,6 +2605,7 @@ void Atom::update_callback(int ifix) lists of names can have NULL entries if previously removed return flag = 0/1 for int/double return cols = 0/N for vector/array where N = # of columns + return border = 0/1 if fix property/atom has "ghost" no/yes ------------------------------------------------------------------------- */ int Atom::find_custom(const char *name, int &flag, int &cols) @@ -2642,6 +2643,13 @@ int Atom::find_custom(const char *name, int &flag, int &cols) return -1; } +int Atom::find_custom(const char *name, int &flag, int &cols, int &border) +{ + int i = find_custom(name, flag, cols); + if (i != -1) border = custom_border[flag + (cols) ? 2 : 0][i]; + return i; +} + /** \brief Add a custom per-atom property with the given name and type and size \verbatim embed:rst @@ -2654,7 +2662,7 @@ This function is called, e.g. from :doc:`fix property/atom `. * \param cols Number of values: 0 for a single value, 1 or more for a vector of values * \return index of property in the respective list of properties */ -int Atom::add_custom(const char *name, int flag, int cols) +int Atom::add_custom(const char *name, int flag, int cols, int border) { int index = -1; @@ -2697,6 +2705,9 @@ int Atom::add_custom(const char *name, int flag, int cols) if (index < 0) error->all(FLERR,"Invalid call to Atom::add_custom()"); + else + custom_border[flag + (cols) ? 2 : 0].push_back(border); + return index; } diff --git a/src/atom.h b/src/atom.h index 548168ac59..9724e5662f 100644 --- a/src/atom.h +++ b/src/atom.h @@ -242,6 +242,7 @@ class Atom : protected Pointers { int *icols, *dcols; char **ivname, **dvname, **ianame, **daname; int nivector, ndvector, niarray, ndarray; + std::array, 4> custom_border; // molecule templates // each template can be a set of consecutive molecules @@ -363,7 +364,8 @@ class Atom : protected Pointers { void update_callback(int); int find_custom(const char *, int &, int &); - virtual int add_custom(const char *, int, int); + int find_custom(const char *, int &, int &, int &); + virtual int add_custom(const char *, int, int, int border = 0); virtual void remove_custom(int, int, int); void *extract(const char *); From 09c87040b54b7bea54a0b7528cea0801ef94e81b Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 11:54:15 +1000 Subject: [PATCH 13/89] add border arguments to FixPropertyAtom add_custom functions --- src/fix_property_atom.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 93e33ca056..c3af7c2f1a 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -125,7 +125,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : if (index[nvalue] >= 0) error->all(FLERR, "Fix property/atom vector name already exists"); if (ReadData::is_data_section(id)) error->all(FLERR, "Fix property/atom fix ID must not be a data file section name"); - index[nvalue] = atom->add_custom(&arg[iarg][2], 0, 0); + index[nvalue] = atom->add_custom(&arg[iarg][2], 0, 0, border); cols[nvalue] = 0; values_peratom++; nvalue++; @@ -138,7 +138,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : if (index[nvalue] >= 0) error->all(FLERR, "Fix property/atom vector name already exists"); if (ReadData::is_data_section(id)) error->all(FLERR, "Fix property/atom fix ID must not be a data file section name"); - index[nvalue] = atom->add_custom(&arg[iarg][2], 1, 0); + index[nvalue] = atom->add_custom(&arg[iarg][2], 1, 0, border); cols[nvalue] = 0; values_peratom++; nvalue++; @@ -167,7 +167,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : which = 1; styles[nvalue] = DARRAY; } - index[nvalue] = atom->add_custom(&arg[iarg][3], which, ncols); + index[nvalue] = atom->add_custom(&arg[iarg][3], which, ncols, border); cols[nvalue] = ncols; values_peratom += ncols; nvalue++; From a873106790223b3a72ed4d9293f55a2a8ba59bcc Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 12:26:05 +1000 Subject: [PATCH 14/89] improve AMOEBA fix property/atom checks --- src/AMOEBA/pair_amoeba.cpp | 43 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index cad9e2b628..c94faf91a7 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -827,28 +827,31 @@ void PairAmoeba::init_style() // check if all custom atom arrays were set via fix property/atom - int flag,cols; + char const * names[6] = {"amtype", "amgroup", "redID", + "xyzaxis", "polaxe", "pval"}; + int const flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) + int const cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 + int const border_check[6] = {1, 0, 0, 0, 0, 0}; // which types need ghost + int flag, cols, border; + int index[6]; - index_amtype = atom->find_custom("amtype",flag,cols); - if (index_amtype < 0 || flag || cols) - error->all(FLERR,"Pair {} amtype is not defined", mystyle); - index_amgroup = atom->find_custom("amgroup",flag,cols); - if (index_amgroup < 0 || flag || cols) - error->all(FLERR,"Pair {} amgroup is not defined", mystyle); + for (int i = 0; i < 6; i++) { + index[i] = atom->find_custom(names[i], flag, cols, border); + std::string err = ""; + if (index[i] < 0) err = "was not defined"; + else if (flag_check[i] != flag) err = "has the wrong type"; + else if (cols_check[i] != cols) err = "has the wrong number of columns"; + else if (border_check[i] && !border) err = "must be set by fix property/atom with ghost yes"; + if (err != "") + error->all(FLERR,"Pair {} per-atom variable {} {}", mystyle, names[i], err); + } - index_redID = atom->find_custom("redID",flag,cols); - if (index_redID < 0 || !flag || cols) - error->all(FLERR,"Pair {} redID is not defined", mystyle); - index_xyzaxis = atom->find_custom("xyzaxis",flag,cols); - if (index_xyzaxis < 0 || !flag || cols == 0) - error->all(FLERR,"Pair {} xyzaxis is not defined", mystyle); - - index_polaxe = atom->find_custom("polaxe",flag,cols); - if (index_polaxe < 0 || flag || cols) - error->all(FLERR,"Pair {} polaxe is not defined", mystyle); - index_pval = atom->find_custom("pval",flag,cols); - if (index_pval < 0 || !flag || cols) - error->all(FLERR,"Pair {} pval is not defined", mystyle); + index_amtype = index[0]; + index_amgroup = index[1]; + index_redID = index[2]; + index_xyzaxis = index[3]; + index_polaxe = index[4]; + index_pval = index[5]; // ------------------------------------------------------------------- // one-time initializations From e36a764db2a62ad45024e5c7fbdb8482ece4ec66 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Fri, 15 Dec 2023 12:44:55 +1000 Subject: [PATCH 15/89] add array and vector STL headers --- src/atom.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/atom.h b/src/atom.h index 9724e5662f..6f22ebd160 100644 --- a/src/atom.h +++ b/src/atom.h @@ -18,6 +18,8 @@ #include #include +#include +#include namespace LAMMPS_NS { From a6addbc90761fd9b3e48e5a3064f8f589a58140e Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Mon, 18 Dec 2023 11:30:56 -0500 Subject: [PATCH 16/89] Updated documentation for FFT_KOKKOS_ flags and CMake variable selection --- doc/src/Build_settings.rst | 18 +++++++++++++++--- doc/src/Howto_cmake.rst | 2 ++ doc/src/kspace_style.rst | 5 ++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 7576cae3eb..33b0508fe9 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -51,14 +51,18 @@ LAMMPS can use them if they are available on your system. .. code-block:: bash -D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS + -D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT, default is KISS -D FFT_SINGLE=value # yes or no (default), no = double precision -D FFT_PACK=value # array (default) or pointer or memcpy .. note:: - The values for the FFT variable must be in upper-case. This is - an exception to the rule that all CMake variables can be specified - with lower-case values. + When the Kokkos variant of a package is compiled and selected at run time, + the FFT library selected by the FFT_KOKKOS variable applies. Otherwise, + the FFT library selected by the FFT variable applies. + The same FFT settings apply to both. FFT_KOKKOS must be compatible with the + Kokkos backend - for example, when using the CUDA backend of Kokkos, + you must use either CUFFT or KISS. Usually these settings are all that is needed. If FFTW3 is selected, then CMake will try to detect, if threaded FFTW @@ -87,6 +91,8 @@ LAMMPS can use them if they are available on your system. FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS # default is KISS if not specified + FFT_INC = -DFFT_KOKKOS_CUFFT # -DFFT_KOKKOS_{FFTW,FFTW3,MKL,CUFFT,HIPFFT,KISS} + # default is KISS if not specified FFT_INC = -DFFT_SINGLE # do not specify for double precision FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries @@ -97,6 +103,8 @@ LAMMPS can use them if they are available on your system. FFT_INC = -I/usr/local/include FFT_PATH = -L/usr/local/lib + FFT_LIB = -lhipfft # hipFFT either precision + FFT_LIB = -lcufft # cuFFT either precision FFT_LIB = -lfftw3 # FFTW3 double precision FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS) FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision @@ -141,6 +149,10 @@ The Intel MKL math library is part of the Intel compiler suite. It can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting above). +The CUFFT and HIPFFT FFT libraries are packaged with NVIDIA's CUDA and AMD's +HIP installations, respectively. These FFT libraries require the Kokkos acceleration +package to be enabled and the Kokkos backend to be GPU-resident (ie, HIP or CUDA). + Performing 3d FFTs in parallel can be time-consuming due to data access and required communication. This cost can be reduced by performing single-precision FFTs instead of double precision. Single precision diff --git a/doc/src/Howto_cmake.rst b/doc/src/Howto_cmake.rst index 42324cf2f1..8b710d1065 100644 --- a/doc/src/Howto_cmake.rst +++ b/doc/src/Howto_cmake.rst @@ -349,6 +349,8 @@ Some common LAMMPS specific variables - when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a`` * - ``FFT`` - select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found) + * - ``FFT_KOKKOS`` + - select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``KISS`` (default) * - ``FFT_SINGLE`` - select whether to use single precision FFTs (default: ``off``) * - ``WITH_JPEG`` diff --git a/doc/src/kspace_style.rst b/doc/src/kspace_style.rst index 38a6fce375..78d7380c01 100644 --- a/doc/src/kspace_style.rst +++ b/doc/src/kspace_style.rst @@ -450,7 +450,10 @@ relative RMS error. For the KOKKOS package, the *pppm/kk* style performs charge assignment and force interpolation calculations, along with the FFTs themselves, on the GPU or (optionally) threaded on the CPU when - using OpenMP and FFTW3. + using OpenMP and FFTW3. The specific FFT library is selected using + the FFT_KOKKOS CMake parameter. See the + :doc:`Build settings ` doc page for how to select a + 3rd-party FFT library. ---------- From bc47f4f3a32c8499d5bd5fd6bc4a68424b700da5 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Mon, 18 Dec 2023 11:56:23 -0500 Subject: [PATCH 17/89] Updated CMake preset files for kokkos-cuda and kokkos-hip --- cmake/presets/kokkos-cuda.cmake | 3 +++ cmake/presets/kokkos-hip.cmake | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmake/presets/kokkos-cuda.cmake b/cmake/presets/kokkos-cuda.cmake index c3ee081898..3205387044 100644 --- a/cmake/presets/kokkos-cuda.cmake +++ b/cmake/presets/kokkos-cuda.cmake @@ -9,5 +9,8 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE) get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE) set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE) +# If KSPACE is also enabled, use CUFFT for FFTs +set(FFT_KOKKOS "CUFFT" CACHE STRING FORCE) + # hide deprecation warnings temporarily for stable release set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) diff --git a/cmake/presets/kokkos-hip.cmake b/cmake/presets/kokkos-hip.cmake index 827a37152b..ffc259a225 100644 --- a/cmake/presets/kokkos-hip.cmake +++ b/cmake/presets/kokkos-hip.cmake @@ -12,6 +12,9 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE) set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE) set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE) +# If KSPACE is also enabled, use CUFFT for FFTs +set(FFT_KOKKOS "HIPFFT" CACHE STRING FORCE) + # hide deprecation warnings temporarily for stable release set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) From d02ffb0e709cb57ff0959c74d74a7a0ad9b7670e Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Mon, 18 Dec 2023 12:06:41 -0500 Subject: [PATCH 18/89] Updated Summit & Frontier template Makefiles --- src/MAKE/MACHINES/Makefile.frontier_kokkos | 2 +- src/MAKE/MACHINES/Makefile.summit_kokkos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MAKE/MACHINES/Makefile.frontier_kokkos b/src/MAKE/MACHINES/Makefile.frontier_kokkos index 86cddd12b7..b58a3d871c 100644 --- a/src/MAKE/MACHINES/Makefile.frontier_kokkos +++ b/src/MAKE/MACHINES/Makefile.frontier_kokkos @@ -55,7 +55,7 @@ MPI_LIB = -L${MPICH_DIR}/lib -lmpi -L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa MY_HIP_EXE = $(shell which hipcc) MY_HIP_PATH = $(dir ${MY_HIP_EXE}) -FFT_INC = -DFFT_HIPFFT +FFT_INC = -DFFT_KOKKOS_HIPFFT FFT_PATH = FFT_LIB = -L${MY_HIP_PATH}../lib -lhipfft diff --git a/src/MAKE/MACHINES/Makefile.summit_kokkos b/src/MAKE/MACHINES/Makefile.summit_kokkos index 557ebd22b2..d554e09a5a 100644 --- a/src/MAKE/MACHINES/Makefile.summit_kokkos +++ b/src/MAKE/MACHINES/Makefile.summit_kokkos @@ -57,7 +57,7 @@ MPI_LIB = -L${MY_MPI_PATH}../lib -lmpi_ibm # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_CUFFT +FFT_INC = -DFFT_KOKKOS_CUFFT FFT_PATH = FFT_LIB = -lcufft From bc7050ab5001b4480383d9e16995494a25f1bec8 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Mon, 18 Dec 2023 12:11:31 -0500 Subject: [PATCH 19/89] Added LMP_HEFFTE to CMakeLists.txt to attempt to fix a merge conflict --- cmake/CMakeLists.txt | 46 +++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index aacaca4e6c..76248445e9 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -971,20 +971,40 @@ if(PKG_KOKKOS) endif() endif() if(PKG_KSPACE) - message(STATUS "<<< FFT settings >>> + if (LMP_HEFFTE) + message(STATUS "<<< FFT settings >>> +-- Primary FFT lib: heFFTe") + if (HEFFTE_BACKEND) + message(STATUS "heFFTe backend: ${HEFFTE_BACKEND}") + else() + message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)") + endif() + if(FFT_SINGLE) + message(STATUS "Using single precision FFTs") + else() + message(STATUS "Using double precision FFTs") + endif() + else() + message(STATUS "<<< FFT settings >>> -- Primary FFT lib: ${FFT}") - if(FFT_SINGLE) - message(STATUS "Using single precision FFTs") - else() - message(STATUS "Using double precision FFTs") - endif() - if(FFT_FFTW_THREADS OR FFT_MKL_THREADS) - message(STATUS "Using threaded FFTs") - else() - message(STATUS "Using non-threaded FFTs") - endif() - if(PKG_KOKKOS) - message(STATUS "Kokkos FFT: ${FFT_KOKKOS}") + if(FFT_SINGLE) + message(STATUS "Using single precision FFTs") + else() + message(STATUS "Using double precision FFTs") + endif() + if(FFT_FFTW_THREADS OR FFT_MKL_THREADS) + message(STATUS "Using threaded FFTs") + else() + message(STATUS "Using non-threaded FFTs") + endif() + if (FFT_HEFFTE) + message(STATUS "Using distributed algorithms from heFTTe") + else() + message(STATUS "Using builtin distributed algorithms") + endif() + if(PKG_KOKKOS) + message(STATUS "Kokkos FFT: ${FFT_KOKKOS}") + endif() endif() endif() if(BUILD_DOC) From dd1ac640aeec2686b2757d734546d6960804bcc2 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Mon, 18 Dec 2023 12:56:30 -0500 Subject: [PATCH 20/89] Added declaration for FFT_KOKKOS variable --- cmake/Modules/Packages/KOKKOS.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index eb20f93956..a0b872ba85 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -131,6 +131,7 @@ if(PKG_KSPACE) list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp) + set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package") set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT) set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES}) validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES) From 10c09225886fe415d10a3b1ce0e7a69e1f75920b Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Fri, 5 Jan 2024 09:18:02 -0700 Subject: [PATCH 21/89] Add author attribution --- src/KOKKOS/fft3d_kokkos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index d78239606e..c50af939a4 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -13,7 +13,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing authors: Stan Moore (SNL), Sam Mish (U.C. Davis) + Contributing authors: Stan Moore (SNL), Sam Mish (U.C. Davis), Nick Hagerty (ORNL) ------------------------------------------------------------------------- */ #include "fft3d_kokkos.h" From fc2d78fc0a7834490f4ee53dc4e14a24006dc0ef Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Fri, 5 Jan 2024 09:25:32 -0700 Subject: [PATCH 22/89] Update Makefiles --- src/MAKE/MACHINES/Makefile.perlmutter_kokkos | 2 +- src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MAKE/MACHINES/Makefile.perlmutter_kokkos b/src/MAKE/MACHINES/Makefile.perlmutter_kokkos index 43162b88dd..cdf2daa471 100644 --- a/src/MAKE/MACHINES/Makefile.perlmutter_kokkos +++ b/src/MAKE/MACHINES/Makefile.perlmutter_kokkos @@ -54,7 +54,7 @@ MPI_LIB = -L${MPICH_DIR}/lib -lmpi -L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_cud # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_CUFFT +FFT_INC = -DFFT_KOKKOS_CUFFT FFT_PATH = FFT_LIB = ${CRAY_CUDATOOLKIT_POST_LINK_OPTS} -lcufft diff --git a/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi b/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi index e78be1acdc..88c07fc2c5 100644 --- a/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi +++ b/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi @@ -57,7 +57,7 @@ MPI_LIB = # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_CUFFT +FFT_INC = -DFFT_KOKKOS_CUFFT FFT_PATH = FFT_LIB = -lcufft From f9eadacf6dc21a0bc6609d90e47bf65ad7aed855 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jan 2024 11:48:58 -0500 Subject: [PATCH 23/89] correct factor 2 force error for m=1 in angle style cosine/periodic --- src/EXTRA-MOLECULE/angle_cosine_periodic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/angle_cosine_periodic.cpp b/src/EXTRA-MOLECULE/angle_cosine_periodic.cpp index 34a8e9d8e5..245a7b8d58 100644 --- a/src/EXTRA-MOLECULE/angle_cosine_periodic.cpp +++ b/src/EXTRA-MOLECULE/angle_cosine_periodic.cpp @@ -120,7 +120,7 @@ void AngleCosinePeriodic::compute(int eflag, int vflag) tn = 1.0; tn_1 = 1.0; tn_2 = 0.0; - un = 1.0; + un = (m==1) ? 2.0 : 1.0; un_1 = 2.0; un_2 = 0.0; From 6329d491dc4c81a7891606aa769726c67157085b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jan 2024 18:40:30 -0500 Subject: [PATCH 24/89] correct factor 2 force error for m=1 in angle style cosine/periodic --- src/OPENMP/angle_cosine_periodic_omp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OPENMP/angle_cosine_periodic_omp.cpp b/src/OPENMP/angle_cosine_periodic_omp.cpp index 43b3a54a47..48532c8f6c 100644 --- a/src/OPENMP/angle_cosine_periodic_omp.cpp +++ b/src/OPENMP/angle_cosine_periodic_omp.cpp @@ -140,7 +140,7 @@ void AngleCosinePeriodicOMP::eval(int nfrom, int nto, ThrData * const thr) tn = 1.0; tn_1 = 1.0; tn_2 = 0.0; - un = 1.0; + un = (m==1) ? 2.0 : 1.0; un_1 = 2.0; un_2 = 0.0; From 7a7492b7571e1b112a5224140e616c2ac94273e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jan 2024 18:42:16 -0500 Subject: [PATCH 25/89] cosmetic --- unittest/force-styles/test_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unittest/force-styles/test_main.cpp b/unittest/force-styles/test_main.cpp index 80f1ca4e30..1cf428eee4 100644 --- a/unittest/force-styles/test_main.cpp +++ b/unittest/force-styles/test_main.cpp @@ -47,7 +47,7 @@ void EXPECT_STRESS(const std::string &name, double *stress, const stress_t &expe EXPECT_FP_LE_WITH_EPS(stress[3], expected_stress.xy, epsilon); EXPECT_FP_LE_WITH_EPS(stress[4], expected_stress.xz, epsilon); EXPECT_FP_LE_WITH_EPS(stress[5], expected_stress.yz, epsilon); - if (print_stats) std::cerr << name << " stats" << stats << std::endl; + if (print_stats) std::cerr << name << " stats: " << stats << std::endl; } void EXPECT_FORCES(const std::string &name, Atom *atom, const std::vector &f_ref, @@ -64,7 +64,7 @@ void EXPECT_FORCES(const std::string &name, Atom *atom, const std::vector &x_ref, @@ -81,7 +81,7 @@ void EXPECT_POSITIONS(const std::string &name, Atom *atom, const std::vector &v_ref, @@ -98,7 +98,7 @@ void EXPECT_VELOCITIES(const std::string &name, Atom *atom, const std::vector Date: Fri, 12 Jan 2024 18:43:19 -0500 Subject: [PATCH 26/89] update unit test data for corrected angle style cosine/periodic --- .../tests/angle-cosine_periodic.yaml | 130 +++++++++--------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/unittest/force-styles/tests/angle-cosine_periodic.yaml b/unittest/force-styles/tests/angle-cosine_periodic.yaml index 84d8ff1194..5c8227fcbd 100644 --- a/unittest/force-styles/tests/angle-cosine_periodic.yaml +++ b/unittest/force-styles/tests/angle-cosine_periodic.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 8 Apr 2021 -date_generated: Thu Apr 8 09:28:11 2021 +lammps_version: 21 Nov 2023 +date_generated: Fri Jan 12 18:39:55 2024 epsilon: 2.5e-13 prerequisites: ! | atom full @@ -10,77 +10,77 @@ post_commands: ! "" input_file: in.fourmol angle_style: cosine/periodic angle_coeff: ! | - 1 75.0 1 2 - 2 45.0 -1 2 + 1 75.0 1 1 + 2 45.0 1 2 3 50.0 -1 3 4 100.0 -1 4 -equilibrium: 4 3.141592653589793 1.5707963267948966 2.0943951023931957 2.356194490192345 +equilibrium: 4 3.141592653589793 3.141592653589793 2.0943951023931957 2.356194490192345 extract: ! "" natoms: 29 -init_energy: 605.3643061001458 -init_stress: ! |- - -1.7082420754402889e+01 -7.3281097507808681e+00 2.4410530505183818e+01 8.5827033671406951e+01 1.4260977966148616e+02 4.1579557432232576e+01 +init_energy: 1178.5476942873006 +init_stress: ! |2- + 2.7790958427902001e+02 -2.3729473006795436e+02 -4.0614854211065634e+01 2.9034222204142930e+02 1.4123449070173780e+02 2.0504975338277421e+02 init_forces: ! |2 1 7.9609486050127529e+00 -3.9274211736421961e+01 -3.8917410871887981e+01 2 4.6997439470662350e+00 3.8052682089524090e+01 3.0599010994189470e+01 - 3 -7.1532072701475698e+01 9.6873528247272844e+01 7.3410935137796983e+01 - 4 3.1784763224659116e+01 -4.4133218046130608e+01 -6.2234613362865147e+01 - 5 5.8817481848549889e+01 -2.5112568523390145e+01 3.9611729278121981e+00 - 6 -8.7258065964885336e+00 -4.2663580774228997e+01 -1.6819642012415606e+01 + 3 -4.4330179925982058e+01 -1.6514501437366098e+00 1.9894582317318523e+01 + 4 1.1465928779203908e+01 -7.1462736556935234e+00 -1.8983545733370338e+01 + 5 2.7634466780141157e+01 1.5504150132065057e+01 1.0078115065618357e+01 + 6 2.2512674572611367e+01 -5.4260358088923418e+01 -6.0646506351853276e+01 7 -1.5578858996464229e+01 1.3895348629116569e+01 -3.3939856789628062e+00 - 8 -1.6678237064738614e+01 -2.6557373913973738e+01 8.7708427797183326e+00 - 9 -9.4419020144376677e+00 1.3812152922900303e+01 -1.2280697239365450e+00 - 10 1.0844630504236606e+02 1.9274264686364820e+01 1.2594098114786526e+01 - 11 -1.1888648487599809e+01 1.7288532453781471e+00 1.8714004234488471e+00 - 12 9.7432958614920665e+01 1.1284647087939499e+02 -1.3445218835244805e+02 - 13 -2.2887258478933525e+01 -5.9815335453575649e+01 4.1237962971772127e+01 - 14 -4.6498844054867675e+01 -3.0251289808967520e+01 1.5556535565006259e+01 - 15 -5.3477741242848616e+01 -1.7885978453267143e+01 4.6284681424489207e+01 - 16 -7.3215663693592745e+01 1.7514552522777997e+01 7.4857846653898914e+00 + 8 -6.7011983808365656e+01 -2.4458090084467077e+01 1.7084632474743671e+02 + 9 9.4419020144376677e+00 -1.3812152922900303e+01 1.2280697239365450e+00 + 10 1.3360859023844577e+02 1.1499274633292617e+02 -1.0838863098947982e+02 + 11 1.1888648487599809e+01 -1.7288532453781471e+00 -1.8714004234488471e+00 + 12 2.9260930345940537e+01 -9.2146025429432186e+00 -8.5323421000107373e+01 + 13 -4.6656310032990458e+00 -1.2502935413462930e+01 1.4918864440944628e+01 + 14 -2.1383527724886850e+01 -9.3422692044635554e+00 7.5125645645164223e+00 + 15 -8.0644375221897171e+00 -2.6783296801963008e+00 6.9267625241565547e+00 + 16 -1.1822204683814408e+02 2.1928896047729104e+01 4.0247121672886962e+01 17 2.0782832048872386e+01 -2.8304296512773977e+01 1.5273484998106287e+01 - 18 1.6481336531704756e+00 1.7222946144801426e+01 -6.9896289164966490e+01 - 19 -2.0180190840279820e+01 -2.5140421523544326e+01 2.9933594625645306e+01 - 20 1.8532057187109345e+01 7.9174753787429015e+00 3.9962694539321184e+01 - 21 1.6243294930835876e+01 2.0333921382774719e+01 -6.0768622624445221e+01 - 22 -2.8924589352090472e+01 -1.9720769613680826e+01 2.1482552755004811e+01 - 23 1.2681294421254595e+01 -6.1315176909389102e-01 3.9286069869440411e+01 - 24 -1.5837796600466618e+01 6.1562453937228881e+01 -3.6651923703785549e+01 - 25 -1.2704181131223443e+01 -4.2563815285902912e+01 6.9610494863238124e+00 - 26 2.8541977731690061e+01 -1.8998638651325965e+01 2.9690874217461737e+01 - 27 -8.7971258084923178e+00 7.2217511410368814e+01 -2.4599681382405976e+01 - 28 -1.9235439225569891e+01 -4.3179911322776611e+01 1.0030656861974458e+00 - 29 2.8032565034062209e+01 -2.9037600087592210e+01 2.3596615696208531e+01 -run_energy: 603.8182365368202 -run_stress: ! |- - -1.6098625319219664e+01 -7.7961962067566510e+00 2.3894821525976329e+01 8.7036156470651477e+01 1.4262918929621054e+02 4.2523803236880880e+01 + 18 5.2071052608093424e+00 5.4414090328604708e+01 -2.2082998810309599e+02 + 19 -6.3757194500832497e+01 -7.9428522633699004e+01 9.4572049876109048e+01 + 20 5.8550089240023155e+01 2.5014432305094296e+01 1.2625793822698694e+02 + 21 5.6300281919954635e+01 7.0478650499360143e+01 -2.1062786831190908e+02 + 22 -1.0025444602684506e+02 -6.8353427900946826e+01 7.4459879083463136e+01 + 23 4.3954164106890424e+01 -2.1252225984133197e+00 1.3616798922844595e+02 + 24 -4.9480288140032329e+01 1.9233281221276744e+02 -1.1450757902121047e+02 + 25 -3.9690277556511717e+01 -1.3297745247110566e+02 2.1747642240220362e+01 + 26 8.9170565696544045e+01 -5.9355359741661772e+01 9.2759936780990117e+01 + 27 -2.6339504856062320e+01 2.1622670107205670e+02 -7.3653991239272059e+01 + 28 -5.7592895215991106e+01 -1.2928512206483205e+02 3.0032824456190355e+00 + 29 8.3932400072053426e+01 -8.6941579007224647e+01 7.0650708793653024e+01 +run_energy: 1174.6225600630123 +run_stress: ! |2- + 2.7658169122411005e+02 -2.3743377487623573e+02 -3.9147916347874407e+01 2.9007767114801470e+02 1.4053974438881829e+02 2.0434258995590761e+02 run_forces: ! |2 - 1 8.1036664069391833e+00 -3.9279459516104339e+01 -3.8959949625007155e+01 - 2 4.6488532958171156e+00 3.7987813821226069e+01 3.0712083303318757e+01 - 3 -7.1419656269516480e+01 9.7015207052323333e+01 7.3123837986656483e+01 - 4 3.1774739774255771e+01 -4.4324760214341296e+01 -6.1918121921961003e+01 - 5 5.8630133295649813e+01 -2.5003101567718115e+01 3.8957656941403842e+00 - 6 -8.6686835699933500e+00 -4.2717543793109854e+01 -1.6944132920021204e+01 - 7 -1.5605967450730276e+01 1.3924972058096937e+01 -3.4081311693274161e+00 - 8 -1.6735469954990947e+01 -2.6654949908594496e+01 8.9412902423392993e+00 - 9 -9.4705763934675620e+00 1.3861186924074314e+01 -1.2218212802251793e+00 - 10 1.0864309846473817e+02 1.9311615651482960e+01 1.2534898619395602e+01 - 11 -1.1889594908454491e+01 1.6849924892427488e+00 1.9039966312260486e+00 - 12 9.6643785665770423e+01 1.1329932305772147e+02 -1.3435213826206018e+02 - 13 -2.2815824864999897e+01 -5.9701629573330088e+01 4.1148977584672039e+01 - 14 -4.6226658006998740e+01 -3.0469540424436548e+01 1.5534272011399247e+01 - 15 -5.3141801628038777e+01 -1.8156497866651446e+01 4.6272398149175629e+01 - 16 -7.3254211788300807e+01 1.7569251761827239e+01 7.4522974142679850e+00 - 17 2.0784167932320894e+01 -2.8346879951708846e+01 1.5284477542010659e+01 - 18 1.7456021018344252e+00 1.7528557172698406e+01 -7.0852460721917453e+01 - 19 -2.0389936120749365e+01 -2.5462340563923114e+01 3.0421727677614534e+01 - 20 1.8644334018914940e+01 7.9337833912247095e+00 4.0430733044302912e+01 - 21 1.6517268317097550e+01 2.0531536618559141e+01 -6.1717967915716365e+01 - 22 -2.9293957935776255e+01 -1.9905577364456363e+01 2.1870035659045151e+01 - 23 1.2776689618678706e+01 -6.2595925410277875e-01 3.9847932256671214e+01 - 24 -1.6067082221526842e+01 6.2373469754139357e+01 -3.7096821397423525e+01 - 25 -1.2753486814048248e+01 -4.3101082367336026e+01 7.0662489242667057e+00 - 26 2.8820569035575090e+01 -1.9272387386803331e+01 3.0030572473156820e+01 - 27 -8.9233162938210242e+00 7.2669056612963558e+01 -2.4610439704365813e+01 - 28 -1.9256705992379011e+01 -4.3442840232212284e+01 9.5666525994413210e-01 - 29 2.8180022286200035e+01 -2.9226216380751275e+01 2.3653774444421682e+01 + 1 8.0595702750384035e+00 -3.9275884134753326e+01 -3.8921834417294036e+01 + 2 4.6450877605699539e+00 3.7989319483282912e+01 3.0709930248716290e+01 + 3 -4.4176357886610745e+01 -1.3121510542286003e+00 1.9849684676752698e+01 + 4 1.1432955202502885e+01 -7.3978491141098957e+00 -1.8963452056001909e+01 + 5 2.7565769767176914e+01 1.5533965780817836e+01 1.0064393045239932e+01 + 6 2.2440837721485856e+01 -5.4307979505823312e+01 -6.0734450726614625e+01 + 7 -1.5580688823052480e+01 1.3904189059068386e+01 -3.4017896378595758e+00 + 8 -6.6989876135866879e+01 -2.4455457095150752e+01 1.7071695622632274e+02 + 9 9.4762227087055635e+00 -1.3904425552883753e+01 1.2252549039361496e+00 + 10 1.3329492642527092e+02 1.1514887273699682e+02 -1.0807688660290995e+02 + 11 1.1927511834955308e+01 -1.7182396158290132e+00 -1.8914765821083073e+00 + 12 2.9230443011207992e+01 -9.0747074093425084e+00 -8.5406656692466896e+01 + 13 -4.6010476121847610e+00 -1.2371262892106342e+01 1.4758380429325644e+01 + 14 -2.1309655373546295e+01 -9.6560166053345498e+00 7.4826455796077642e+00 + 15 -8.0586553706859778e+00 -2.8089895416921884e+00 7.1963114045665719e+00 + 16 -1.1814487049351524e+02 2.2070805476502699e+01 4.0103979455896329e+01 + 17 2.0787826988548556e+01 -2.8364190015414366e+01 1.5289010744891176e+01 + 18 5.4411962659043454e+00 5.4597888596162299e+01 -2.2067472725627243e+02 + 19 -6.3374090856904559e+01 -7.9190934240040519e+01 9.4782037192716302e+01 + 20 5.7932894591000213e+01 2.4593045643878220e+01 1.2589269006355613e+02 + 21 5.6478944470524624e+01 7.0203094061683373e+01 -2.1102883364979709e+02 + 22 -9.9996788696603545e+01 -6.7985401318866863e+01 7.4849357252797518e+01 + 23 4.3517844226078921e+01 -2.2176927428165065e+00 1.3617947639699958e+02 + 24 -4.9663522759553963e+01 1.9280842870258854e+02 -1.1467096111871800e+02 + 25 -3.9280982289108742e+01 -1.3314956089589265e+02 2.1920816048609726e+01 + 26 8.8944505048662705e+01 -5.9658867806695888e+01 9.2750145070108275e+01 + 27 -2.6592186096443989e+01 2.1652356998534560e+02 -7.3330722990707770e+01 + 28 -5.7218787679563256e+01 -1.2939713888992102e+02 2.9266537226802889e+00 + 29 8.3810973776007245e+01 -8.7126431095424564e+01 7.0404069268027484e+01 ... From e51a44862c1f373a5896b587b32a4a7264bf9b4e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jan 2024 18:59:43 -0500 Subject: [PATCH 27/89] add fix numdiff test to check consistency between energy and force for bonded interactions --- unittest/force-styles/test_angle_style.cpp | 54 ++++++++++++++++++ unittest/force-styles/test_bond_style.cpp | 55 +++++++++++++++++++ unittest/force-styles/test_dihedral_style.cpp | 55 +++++++++++++++++++ unittest/force-styles/test_improper_style.cpp | 54 ++++++++++++++++++ 4 files changed, 218 insertions(+) diff --git a/unittest/force-styles/test_angle_style.cpp b/unittest/force-styles/test_angle_style.cpp index 3476ae8dde..65e1699a85 100644 --- a/unittest/force-styles/test_angle_style.cpp +++ b/unittest/force-styles/test_angle_style.cpp @@ -27,6 +27,7 @@ #include "atom.h" #include "compute.h" #include "exceptions.h" +#include "fix.h" #include "fmt/format.h" #include "force.h" #include "info.h" @@ -528,6 +529,59 @@ TEST(AngleStyle, omp) if (!verbose) ::testing::internal::GetCapturedStdout(); }; +TEST(AngleStyle, numdiff) +{ + if (!LAMMPS::is_installed_pkg("EXTRA-FIX")) GTEST_SKIP(); + if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); + + LAMMPS::argv args = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"}; + + ::testing::internal::CaptureStdout(); + LAMMPS *lmp = init_lammps(args, test_config, true); + + std::string output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; + + if (!lmp) { + std::cerr << "One or more prerequisite styles are not available " + "in this LAMMPS configuration:\n"; + for (auto &prerequisite : test_config.prerequisites) { + std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n"; + } + GTEST_SKIP(); + } + + EXPECT_THAT(output, StartsWith("LAMMPS (")); + EXPECT_THAT(output, HasSubstr("Loop time")); + + // abort if running in parallel and not all atoms are local + const int nlocal = lmp->atom->nlocal; + ASSERT_EQ(lmp->atom->natoms, nlocal); + + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("fix diff all numdiff 2 6.05504e-6"); + lmp->input->one("run 2 post no"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + Fix *ifix = lmp->modify->get_fix_by_id("diff"); + if (ifix) { + double epsilon = test_config.epsilon * 1.0e7; + ErrorStats stats; + double **f1 = lmp->atom->f; + double **f2 = ifix->array_atom; + SCOPED_TRACE("EXPECT FORCES: numdiff"); + for (int i = 0; i < nlocal; ++i) { + EXPECT_FP_LE_WITH_EPS(f1[i][0], f2[i][0], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][1], f2[i][1], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][2], f2[i][2], epsilon); + } + if (print_stats) + std::cerr << "numdiff stats: " << stats << " epsilon: " << epsilon << std::endl; + } + if (!verbose) ::testing::internal::CaptureStdout(); + cleanup_lammps(lmp, test_config); + if (!verbose) ::testing::internal::GetCapturedStdout(); +} + TEST(AngleStyle, single) { if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); diff --git a/unittest/force-styles/test_bond_style.cpp b/unittest/force-styles/test_bond_style.cpp index f7ecd835b0..6efb9978d1 100644 --- a/unittest/force-styles/test_bond_style.cpp +++ b/unittest/force-styles/test_bond_style.cpp @@ -27,6 +27,7 @@ #include "bond.h" #include "compute.h" #include "exceptions.h" +#include "fix.h" #include "fmt/format.h" #include "force.h" #include "info.h" @@ -530,6 +531,60 @@ TEST(BondStyle, omp) if (!verbose) ::testing::internal::GetCapturedStdout(); }; + +TEST(BondStyle, numdiff) +{ + if (!LAMMPS::is_installed_pkg("EXTRA-FIX")) GTEST_SKIP(); + if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); + + LAMMPS::argv args = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"}; + + ::testing::internal::CaptureStdout(); + LAMMPS *lmp = init_lammps(args, test_config, true); + + std::string output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; + + if (!lmp) { + std::cerr << "One or more prerequisite styles are not available " + "in this LAMMPS configuration:\n"; + for (auto &prerequisite : test_config.prerequisites) { + std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n"; + } + GTEST_SKIP(); + } + + EXPECT_THAT(output, StartsWith("LAMMPS (")); + EXPECT_THAT(output, HasSubstr("Loop time")); + + // abort if running in parallel and not all atoms are local + const int nlocal = lmp->atom->nlocal; + ASSERT_EQ(lmp->atom->natoms, nlocal); + + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("fix diff all numdiff 2 6.05504e-6"); + lmp->input->one("run 2 post no"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + Fix *ifix = lmp->modify->get_fix_by_id("diff"); + if (ifix) { + double epsilon = test_config.epsilon * 1.0e7; + ErrorStats stats; + double **f1 = lmp->atom->f; + double **f2 = ifix->array_atom; + SCOPED_TRACE("EXPECT FORCES: numdiff"); + for (int i = 0; i < nlocal; ++i) { + EXPECT_FP_LE_WITH_EPS(f1[i][0], f2[i][0], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][1], f2[i][1], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][2], f2[i][2], epsilon); + } + if (print_stats) + std::cerr << "numdiff stats: " << stats << " epsilon: " << epsilon << std::endl; + } + if (!verbose) ::testing::internal::CaptureStdout(); + cleanup_lammps(lmp, test_config); + if (!verbose) ::testing::internal::GetCapturedStdout(); +} + TEST(BondStyle, single) { if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); diff --git a/unittest/force-styles/test_dihedral_style.cpp b/unittest/force-styles/test_dihedral_style.cpp index 662d63909d..74ba3779c8 100644 --- a/unittest/force-styles/test_dihedral_style.cpp +++ b/unittest/force-styles/test_dihedral_style.cpp @@ -27,6 +27,7 @@ #include "compute.h" #include "dihedral.h" #include "exceptions.h" +#include "fix.h" #include "fmt/format.h" #include "force.h" #include "info.h" @@ -531,3 +532,57 @@ TEST(DihedralStyle, omp) cleanup_lammps(lmp, test_config); if (!verbose) ::testing::internal::GetCapturedStdout(); }; + + +TEST(DihedralStyle, numdiff) +{ + if (!LAMMPS::is_installed_pkg("EXTRA-FIX")) GTEST_SKIP(); + if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); + + LAMMPS::argv args = {"DihedralStyle", "-log", "none", "-echo", "screen", "-nocite"}; + + ::testing::internal::CaptureStdout(); + LAMMPS *lmp = init_lammps(args, test_config, true); + + std::string output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; + + if (!lmp) { + std::cerr << "One or more prerequisite styles are not available " + "in this LAMMPS configuration:\n"; + for (auto &prerequisite : test_config.prerequisites) { + std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n"; + } + GTEST_SKIP(); + } + + EXPECT_THAT(output, StartsWith("LAMMPS (")); + EXPECT_THAT(output, HasSubstr("Loop time")); + + // abort if running in parallel and not all atoms are local + const int nlocal = lmp->atom->nlocal; + ASSERT_EQ(lmp->atom->natoms, nlocal); + + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("fix diff all numdiff 2 6.05504e-6"); + lmp->input->one("run 2 post no"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + Fix *ifix = lmp->modify->get_fix_by_id("diff"); + if (ifix) { + double epsilon = test_config.epsilon * 1.0e7; + ErrorStats stats; + double **f1 = lmp->atom->f; + double **f2 = ifix->array_atom; + SCOPED_TRACE("EXPECT FORCES: numdiff"); + for (int i = 0; i < nlocal; ++i) { + EXPECT_FP_LE_WITH_EPS(f1[i][0], f2[i][0], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][1], f2[i][1], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][2], f2[i][2], epsilon); + } + if (print_stats) + std::cerr << "numdiff stats: " << stats << " epsilon: " << epsilon << std::endl; + } + if (!verbose) ::testing::internal::CaptureStdout(); + cleanup_lammps(lmp, test_config); + if (!verbose) ::testing::internal::GetCapturedStdout(); +} diff --git a/unittest/force-styles/test_improper_style.cpp b/unittest/force-styles/test_improper_style.cpp index dc1b846b5a..7eaa72f67e 100644 --- a/unittest/force-styles/test_improper_style.cpp +++ b/unittest/force-styles/test_improper_style.cpp @@ -26,6 +26,7 @@ #include "atom.h" #include "compute.h" #include "exceptions.h" +#include "fix.h" #include "fmt/format.h" #include "force.h" #include "improper.h" @@ -524,3 +525,56 @@ TEST(ImproperStyle, omp) cleanup_lammps(lmp, test_config); if (!verbose) ::testing::internal::GetCapturedStdout(); }; + +TEST(ImproperStyle, numdiff) +{ + if (!LAMMPS::is_installed_pkg("EXTRA-FIX")) GTEST_SKIP(); + if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); + + LAMMPS::argv args = {"ImproperStyle", "-log", "none", "-echo", "screen", "-nocite"}; + + ::testing::internal::CaptureStdout(); + LAMMPS *lmp = init_lammps(args, test_config, true); + + std::string output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; + + if (!lmp) { + std::cerr << "One or more prerequisite styles are not available " + "in this LAMMPS configuration:\n"; + for (auto &prerequisite : test_config.prerequisites) { + std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n"; + } + GTEST_SKIP(); + } + + EXPECT_THAT(output, StartsWith("LAMMPS (")); + EXPECT_THAT(output, HasSubstr("Loop time")); + + // abort if running in parallel and not all atoms are local + const int nlocal = lmp->atom->nlocal; + ASSERT_EQ(lmp->atom->natoms, nlocal); + + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("fix diff all numdiff 2 6.05504e-6"); + lmp->input->one("run 2 post no"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + Fix *ifix = lmp->modify->get_fix_by_id("diff"); + if (ifix) { + double epsilon = test_config.epsilon * 1.0e7; + ErrorStats stats; + double **f1 = lmp->atom->f; + double **f2 = ifix->array_atom; + SCOPED_TRACE("EXPECT FORCES: numdiff"); + for (int i = 0; i < nlocal; ++i) { + EXPECT_FP_LE_WITH_EPS(f1[i][0], f2[i][0], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][1], f2[i][1], epsilon); + EXPECT_FP_LE_WITH_EPS(f1[i][2], f2[i][2], epsilon); + } + if (print_stats) + std::cerr << "numdiff stats: " << stats << " epsilon: " << epsilon << std::endl; + } + if (!verbose) ::testing::internal::CaptureStdout(); + cleanup_lammps(lmp, test_config); + if (!verbose) ::testing::internal::GetCapturedStdout(); +} From c340accb0a32c28bcfcbb95b40cde5ba25ed6487 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jan 2024 19:00:07 -0500 Subject: [PATCH 28/89] skip numdiff tests for linear tables (for now?) --- unittest/force-styles/tests/angle-table_linear.yaml | 2 +- unittest/force-styles/tests/bond-table_linear.yaml | 2 +- unittest/force-styles/tests/dihedral-table_cut_linear.yaml | 2 +- unittest/force-styles/tests/dihedral-table_linear.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unittest/force-styles/tests/angle-table_linear.yaml b/unittest/force-styles/tests/angle-table_linear.yaml index 58e676e8d5..7c0d532782 100644 --- a/unittest/force-styles/tests/angle-table_linear.yaml +++ b/unittest/force-styles/tests/angle-table_linear.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:52 2022 epsilon: 5e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full angle table diff --git a/unittest/force-styles/tests/bond-table_linear.yaml b/unittest/force-styles/tests/bond-table_linear.yaml index 2776121733..008742357a 100644 --- a/unittest/force-styles/tests/bond-table_linear.yaml +++ b/unittest/force-styles/tests/bond-table_linear.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:51 2022 epsilon: 2.5e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full bond table diff --git a/unittest/force-styles/tests/dihedral-table_cut_linear.yaml b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml index 5c8f53e31f..aa3bbd8ff3 100644 --- a/unittest/force-styles/tests/dihedral-table_cut_linear.yaml +++ b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml @@ -3,7 +3,7 @@ lammps_version: 17 Feb 2022 tags: unstable date_generated: Fri Mar 18 22:18:02 2022 epsilon: 1e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full dihedral table/cut diff --git a/unittest/force-styles/tests/dihedral-table_linear.yaml b/unittest/force-styles/tests/dihedral-table_linear.yaml index 30ac6b7f6d..de46cae001 100644 --- a/unittest/force-styles/tests/dihedral-table_linear.yaml +++ b/unittest/force-styles/tests/dihedral-table_linear.yaml @@ -3,7 +3,7 @@ lammps_version: 22 Dec 2022 tags: unstable date_generated: Mon Dec 26 16:49:31 2022 epsilon: 7.5e-14 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full dihedral table From 0d64aa375d6450aebc5c9abdea1ebcdbb2b0f2c0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jan 2024 04:05:34 -0500 Subject: [PATCH 29/89] tweak epsilon to pass numdiff tests --- unittest/force-styles/tests/angle-gaussian.yaml | 2 +- unittest/force-styles/tests/angle-mm3.yaml | 2 +- unittest/force-styles/tests/dihedral-charmmfsw.yaml | 2 +- unittest/force-styles/tests/dihedral-table_cut_spline.yaml | 2 +- unittest/force-styles/tests/dihedral-table_spline.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/unittest/force-styles/tests/angle-gaussian.yaml b/unittest/force-styles/tests/angle-gaussian.yaml index 0022862384..f8155fea72 100644 --- a/unittest/force-styles/tests/angle-gaussian.yaml +++ b/unittest/force-styles/tests/angle-gaussian.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:52 2022 -epsilon: 2.5e-13 +epsilon: 7.5e-12 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/angle-mm3.yaml b/unittest/force-styles/tests/angle-mm3.yaml index 731ca836cc..171f29715c 100644 --- a/unittest/force-styles/tests/angle-mm3.yaml +++ b/unittest/force-styles/tests/angle-mm3.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:52 2022 -epsilon: 2.5e-13 +epsilon: 1.5e-10 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-charmmfsw.yaml b/unittest/force-styles/tests/dihedral-charmmfsw.yaml index fa8e706578..ad9c5ca959 100644 --- a/unittest/force-styles/tests/dihedral-charmmfsw.yaml +++ b/unittest/force-styles/tests/dihedral-charmmfsw.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:02 2022 -epsilon: 2.5e-13 +epsilon: 2.5e-10 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml index be637652a0..61b3f04329 100644 --- a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml +++ b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:02 2022 -epsilon: 2.5e-13 +epsilon: 2.5e-12 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-table_spline.yaml b/unittest/force-styles/tests/dihedral-table_spline.yaml index bb38760762..d5441c13d7 100644 --- a/unittest/force-styles/tests/dihedral-table_spline.yaml +++ b/unittest/force-styles/tests/dihedral-table_spline.yaml @@ -1,7 +1,7 @@ --- lammps_version: 22 Dec 2022 date_generated: Mon Dec 26 16:49:37 2022 -epsilon: 1e-13 +epsilon: 5.0e-12 skip_tests: prerequisites: ! | atom full From f93032b903180288780f83410a7a2cdc6006808d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jan 2024 04:26:08 -0500 Subject: [PATCH 30/89] skip failing numdiff tests for now --- unittest/force-styles/tests/angle-cosine_delta.yaml | 2 +- unittest/force-styles/tests/angle-fourier_simple.yaml | 1 + unittest/force-styles/tests/dihedral-charmm.yaml | 2 +- unittest/force-styles/tests/improper-cossq.yaml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/unittest/force-styles/tests/angle-cosine_delta.yaml b/unittest/force-styles/tests/angle-cosine_delta.yaml index e56a51c9f0..ed2337e935 100644 --- a/unittest/force-styles/tests/angle-cosine_delta.yaml +++ b/unittest/force-styles/tests/angle-cosine_delta.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:51 2022 epsilon: 5e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full angle cosine/delta diff --git a/unittest/force-styles/tests/angle-fourier_simple.yaml b/unittest/force-styles/tests/angle-fourier_simple.yaml index 8fcecf85ad..e1a394ee3a 100644 --- a/unittest/force-styles/tests/angle-fourier_simple.yaml +++ b/unittest/force-styles/tests/angle-fourier_simple.yaml @@ -5,6 +5,7 @@ epsilon: 2.5e-13 prerequisites: ! | atom full angle fourier/simple +skip_tests: numdiff pre_commands: ! "" post_commands: ! "" input_file: in.fourmol diff --git a/unittest/force-styles/tests/dihedral-charmm.yaml b/unittest/force-styles/tests/dihedral-charmm.yaml index ddba14cb4f..cf407709b0 100644 --- a/unittest/force-styles/tests/dihedral-charmm.yaml +++ b/unittest/force-styles/tests/dihedral-charmm.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:01 2022 epsilon: 2.5e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full dihedral charmm diff --git a/unittest/force-styles/tests/improper-cossq.yaml b/unittest/force-styles/tests/improper-cossq.yaml index d52c50c517..4faaa2214a 100644 --- a/unittest/force-styles/tests/improper-cossq.yaml +++ b/unittest/force-styles/tests/improper-cossq.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:02 2022 epsilon: 2.5e-13 -skip_tests: +skip_tests: numdiff prerequisites: ! | atom full improper cossq From 9587e92a3c919f9e3e923eb9e8e03d2de3172e60 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jan 2024 10:33:13 -0500 Subject: [PATCH 31/89] increase numdiff fudge factor so that individual epsilons need to be changed less --- unittest/force-styles/test_angle_style.cpp | 2 +- unittest/force-styles/test_bond_style.cpp | 2 +- unittest/force-styles/test_dihedral_style.cpp | 2 +- unittest/force-styles/test_improper_style.cpp | 2 +- unittest/force-styles/tests/angle-gaussian.yaml | 2 +- unittest/force-styles/tests/angle-mm3.yaml | 2 +- unittest/force-styles/tests/dihedral-charmmfsw.yaml | 2 +- unittest/force-styles/tests/dihedral-table_cut_spline.yaml | 2 +- unittest/force-styles/tests/dihedral-table_spline.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/unittest/force-styles/test_angle_style.cpp b/unittest/force-styles/test_angle_style.cpp index 65e1699a85..010fabd6e2 100644 --- a/unittest/force-styles/test_angle_style.cpp +++ b/unittest/force-styles/test_angle_style.cpp @@ -564,7 +564,7 @@ TEST(AngleStyle, numdiff) if (!verbose) ::testing::internal::GetCapturedStdout(); Fix *ifix = lmp->modify->get_fix_by_id("diff"); if (ifix) { - double epsilon = test_config.epsilon * 1.0e7; + double epsilon = test_config.epsilon * 5.0e8; ErrorStats stats; double **f1 = lmp->atom->f; double **f2 = ifix->array_atom; diff --git a/unittest/force-styles/test_bond_style.cpp b/unittest/force-styles/test_bond_style.cpp index 6efb9978d1..185d28089e 100644 --- a/unittest/force-styles/test_bond_style.cpp +++ b/unittest/force-styles/test_bond_style.cpp @@ -567,7 +567,7 @@ TEST(BondStyle, numdiff) if (!verbose) ::testing::internal::GetCapturedStdout(); Fix *ifix = lmp->modify->get_fix_by_id("diff"); if (ifix) { - double epsilon = test_config.epsilon * 1.0e7; + double epsilon = test_config.epsilon * 5.0e8; ErrorStats stats; double **f1 = lmp->atom->f; double **f2 = ifix->array_atom; diff --git a/unittest/force-styles/test_dihedral_style.cpp b/unittest/force-styles/test_dihedral_style.cpp index 74ba3779c8..efc37b9e03 100644 --- a/unittest/force-styles/test_dihedral_style.cpp +++ b/unittest/force-styles/test_dihedral_style.cpp @@ -569,7 +569,7 @@ TEST(DihedralStyle, numdiff) if (!verbose) ::testing::internal::GetCapturedStdout(); Fix *ifix = lmp->modify->get_fix_by_id("diff"); if (ifix) { - double epsilon = test_config.epsilon * 1.0e7; + double epsilon = test_config.epsilon * 5.0e8; ErrorStats stats; double **f1 = lmp->atom->f; double **f2 = ifix->array_atom; diff --git a/unittest/force-styles/test_improper_style.cpp b/unittest/force-styles/test_improper_style.cpp index 7eaa72f67e..ba3618d3dc 100644 --- a/unittest/force-styles/test_improper_style.cpp +++ b/unittest/force-styles/test_improper_style.cpp @@ -561,7 +561,7 @@ TEST(ImproperStyle, numdiff) if (!verbose) ::testing::internal::GetCapturedStdout(); Fix *ifix = lmp->modify->get_fix_by_id("diff"); if (ifix) { - double epsilon = test_config.epsilon * 1.0e7; + double epsilon = test_config.epsilon * 5.0e8; ErrorStats stats; double **f1 = lmp->atom->f; double **f2 = ifix->array_atom; diff --git a/unittest/force-styles/tests/angle-gaussian.yaml b/unittest/force-styles/tests/angle-gaussian.yaml index f8155fea72..0022862384 100644 --- a/unittest/force-styles/tests/angle-gaussian.yaml +++ b/unittest/force-styles/tests/angle-gaussian.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:52 2022 -epsilon: 7.5e-12 +epsilon: 2.5e-13 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/angle-mm3.yaml b/unittest/force-styles/tests/angle-mm3.yaml index 171f29715c..9fb9460183 100644 --- a/unittest/force-styles/tests/angle-mm3.yaml +++ b/unittest/force-styles/tests/angle-mm3.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:52 2022 -epsilon: 1.5e-10 +epsilon: 2.5e-12 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-charmmfsw.yaml b/unittest/force-styles/tests/dihedral-charmmfsw.yaml index ad9c5ca959..6d2035acc5 100644 --- a/unittest/force-styles/tests/dihedral-charmmfsw.yaml +++ b/unittest/force-styles/tests/dihedral-charmmfsw.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:02 2022 -epsilon: 2.5e-10 +epsilon: 5.0e-12 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml index 61b3f04329..be637652a0 100644 --- a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml +++ b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml @@ -1,7 +1,7 @@ --- lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:18:02 2022 -epsilon: 2.5e-12 +epsilon: 2.5e-13 skip_tests: prerequisites: ! | atom full diff --git a/unittest/force-styles/tests/dihedral-table_spline.yaml b/unittest/force-styles/tests/dihedral-table_spline.yaml index d5441c13d7..10e56e4a6d 100644 --- a/unittest/force-styles/tests/dihedral-table_spline.yaml +++ b/unittest/force-styles/tests/dihedral-table_spline.yaml @@ -1,7 +1,7 @@ --- lammps_version: 22 Dec 2022 date_generated: Mon Dec 26 16:49:37 2022 -epsilon: 5.0e-12 +epsilon: 1.0e-13 skip_tests: prerequisites: ! | atom full From b6b2c029b6ce96fcee41ce43ddad60f33291c4e1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jan 2024 07:33:31 -0500 Subject: [PATCH 32/89] improve description of testing --- doc/src/Build_development.rst | 61 ++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index c674b2c258..36772c13f2 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -122,32 +122,39 @@ Code Coverage and Unit Testing (CMake only) ------------------------------------------- The LAMMPS code is subject to multiple levels of automated testing -during development: integration testing (i.e. whether the code compiles -on various platforms and with a variety of settings), unit testing -(i.e. whether certain individual parts of the code produce the expected -results for given inputs), run testing (whether selected complete input -decks run without crashing for multiple configurations), and regression -testing (i.e. whether selected input examples reproduce the same -results over a given number of steps and operations within a given -error margin). The status of this automated testing can be viewed on -`https://ci.lammps.org `_. +during development: + +- Integration testing (i.e. whether the code compiles + on various platforms and with a variety of compilers and settings), +- Unit testing (i.e. whether certain functions or classes of the code + produce the expected results for given inputs), +- Run testing (i.e. whether selected input decks can run to completion + without crashing for multiple configurations), +- Regression testing (i.e. whether selected input examples reproduce the + same results over a given number of steps and operations within a + given error margin). + +The status of this automated testing can be viewed on `https://ci.lammps.org +`_. The scripts and inputs for integration, run, and regression testing are maintained in a `separate repository `_ -of the LAMMPS project on GitHub. +of the LAMMPS project on GitHub. A few tests are also run as GitHub +Actions and their configuration files are in the ``.github/workflows/`` +folder of the LAMMPS git tree. -The unit testing facility is integrated into the CMake build process -of the LAMMPS source code distribution itself. It can be enabled by +The unit testing facility is integrated into the CMake build process of +the LAMMPS source code distribution itself. It can be enabled by setting ``-D ENABLE_TESTING=on`` during the CMake configuration step. -It requires the `YAML `_ library and development -headers (if those are not found locally a recent version will be -downloaded and compiled along with LAMMPS and the test program) to -compile and will download and compile a specific recent version of the -`Googletest `_ C++ test framework -for implementing the tests. +It requires the `YAML `_ library and matching +development headers to compile (if those are not found locally a recent +version of that library will be downloaded and compiled along with +LAMMPS and the test programs) and will download and compile a specific +version of the `GoogleTest `_ C++ +test framework that is used to implement the tests. -.. admonition:: Software version requirements for testing +.. admonition:: Software version and LAMMPS configuration requirements :class: note The compiler and library version requirements for the testing @@ -155,7 +162,7 @@ for implementing the tests. example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x (version 4.8.x) are not sufficient. The CMake configuration will try to detect incompatible versions and either skip incompatible tests or - stop with an error. Also the number of tests will depend on + stop with an error. Also the number of available tests will depend on installed LAMMPS packages, development environment, operating system, and configuration settings. @@ -234,12 +241,14 @@ will be skipped if prerequisite features are not available in LAMMPS. time. Preference is given to parts of the code base that are easy to test or commonly used. -Tests for styles of the same kind of style (e.g. pair styles or bond -styles) are performed with the same test executable using different -input files in YAML format. So to add a test for another style of the -same kind it may be sufficient to add a suitable YAML file. -:doc:`Detailed instructions for adding tests ` are -provided in the Programmer Guide part of the manual. +Many tests have special test programs that test individual functions or +classes. There are also special cases for the Fortran and Python +module. Tests for force computing or modifying styles (e.g. pair styles +or bond styles) are performed with the same test executable using input +files in YAML format. So to add a test for another style of this kind +it may be sufficient to add a suitable YAML file. :doc:`Detailed +instructions for adding tests ` are provided in the +Programmer Guide part of the manual. Unit tests for force styles ^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 89fd9ec5317bbfe1cdba9b14f6ad50c2e8062e5c Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Tue, 16 Jan 2024 23:04:59 +1000 Subject: [PATCH 33/89] improve ghost keyword comments in fix_property_atom.cpp --- src/fix_property_atom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index c3af7c2f1a..de96b5c39d 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -51,7 +51,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : nvalue = 0; values_peratom = 0; - // get "ghost" first for settings + // check for ghost keyword to use as add_custom() arg border = 0; while (iarg < narg) { @@ -182,7 +182,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : // optional args while (iarg < narg) { - if (strcmp(arg[iarg], "ghost") == 0) { + if (strcmp(arg[iarg], "ghost") == 0) { // skip here, since handled earlier iarg += 2; } else if (strcmp(arg[iarg], "writedata") == 0) { if (iarg + 2 > narg) error->all(FLERR, "Illegal fix property/atom command"); From b95706ca6409b1d663eafc0137f17efbdaeeac91 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Tue, 16 Jan 2024 23:35:40 +1000 Subject: [PATCH 34/89] make separate find_custom_ghost() and use four separate ghost info arrays --- src/AMOEBA/pair_amoeba.cpp | 12 ++++++--- src/atom.cpp | 55 +++++++++++++++++++++++++++++++++----- src/atom.h | 6 ++--- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index c94faf91a7..ee7e362487 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -831,17 +831,21 @@ void PairAmoeba::init_style() "xyzaxis", "polaxe", "pval"}; int const flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) int const cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 - int const border_check[6] = {1, 0, 0, 0, 0, 0}; // which types need ghost - int flag, cols, border; + int const ghost_check[6] = {1, 0, 0, 0, 0, 0}; // which types need ghost + int flag, cols, ghost; int index[6]; for (int i = 0; i < 6; i++) { - index[i] = atom->find_custom(names[i], flag, cols, border); + if (ghost_check[i]) { + index[i] = atom->find_custom_ghost(names[i], flag, cols, ghost); + } else { + index[i] = atom->find_custom(names[i], flag, cols); + } std::string err = ""; if (index[i] < 0) err = "was not defined"; else if (flag_check[i] != flag) err = "has the wrong type"; else if (cols_check[i] != cols) err = "has the wrong number of columns"; - else if (border_check[i] && !border) err = "must be set by fix property/atom with ghost yes"; + else if (ghost_check[i] && !ghost) err = "must be set by fix property/atom with ghost yes"; if (err != "") error->all(FLERR,"Pair {} per-atom variable {} {}", mystyle, names[i], err); } diff --git a/src/atom.cpp b/src/atom.cpp index 8ac72e8950..63df04aa14 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -234,6 +234,7 @@ Atom::Atom(LAMMPS *_lmp) : Pointers(_lmp), atom_style(nullptr), avec(nullptr), a darray = nullptr; icols = dcols = nullptr; ivname = dvname = ianame = daname = nullptr; + ivghost = dvghost = iaghost = daghost = nullptr; // initialize atom style and array existence flags @@ -333,6 +334,10 @@ Atom::~Atom() memory->sfree(darray); memory->sfree(icols); memory->sfree(dcols); + memory->destroy(ivghost); + memory->destroy(dvghost); + memory->destroy(iaghost); + memory->destroy(daghost); // delete user-defined molecules @@ -2599,13 +2604,24 @@ void Atom::update_callback(int ifix) if (extra_border[i] > ifix) extra_border[i]--; } +/** \brief Find a custom per-atom property with given name +\verbatim embed:rst + +This function returns the list index of a custom per-atom property +with the name "name", also returning by reference its data type and +number of values per atom. +\endverbatim + * \param name Name of the property (w/o a "i_" or "d_" or "i2_" or "d2_" prefix) + * \param &flag Returns data type of property: 0 for int, 1 for double + * \param &cols Returns number of values: 0 for a single value, 1 or more for a vector of values + * \return index of property in the respective list of properties + */ /* ---------------------------------------------------------------------- find custom per-atom vector with name return index if found, -1 if not found lists of names can have NULL entries if previously removed return flag = 0/1 for int/double return cols = 0/N for vector/array where N = # of columns - return border = 0/1 if fix property/atom has "ghost" no/yes ------------------------------------------------------------------------- */ int Atom::find_custom(const char *name, int &flag, int &cols) @@ -2643,10 +2659,30 @@ int Atom::find_custom(const char *name, int &flag, int &cols) return -1; } -int Atom::find_custom(const char *name, int &flag, int &cols, int &border) +/** \brief Find a custom per-atom property with given name and retrieve ghost property +\verbatim embed:rst + +This function returns the list index of a custom per-atom property +with the name "name", also returning by reference its data type, +number of values per atom, and if it is communicated to ghost particles. +Classes rarely need to check on ghost communication and so `find_custom` +is typically preferred to this function. See :doc:`pair amoeba ` +for an example where checking ghost communication is necessary. +\endverbatim + * \param name Name of the property (w/o a "i_" or "d_" or "i2_" or "d2_" prefix) + * \param &flag Returns data type of property: 0 for int, 1 for double + * \param &cols Returns number of values: 0 for a single value, 1 or more for a vector of values + * \param &ghost Returns whether property is communicated to ghost atoms: 0 for no, 1 for yes + * \return index of property in the respective list of properties + */ +int Atom::find_custom_ghost(const char *name, int &flag, int &cols, int &ghost) { int i = find_custom(name, flag, cols); - if (i != -1) border = custom_border[flag + (cols) ? 2 : 0][i]; + if (i == -1) return i; + if ((flag == 0) && (cols == 0)) ghost = ivghost[i]; + else if ((flag == 1) && (cols == 0)) ghost = dvghost[i]; + else if ((flag == 0) && (cols == 1)) ghost = iaghost[i]; + else if ((flag == 1) && (cols == 1)) ghost = daghost[i]; return i; } @@ -2660,9 +2696,10 @@ This function is called, e.g. from :doc:`fix property/atom `. * \param name Name of the property (w/o a "i_" or "d_" or "i2_" or "d2_" prefix) * \param flag Data type of property: 0 for int, 1 for double * \param cols Number of values: 0 for a single value, 1 or more for a vector of values + * \param ghost Whether property is communicated to ghost atoms: 0 for no, 1 for yes * \return index of property in the respective list of properties */ -int Atom::add_custom(const char *name, int flag, int cols, int border) +int Atom::add_custom(const char *name, int flag, int cols, int ghost) { int index = -1; @@ -2671,6 +2708,8 @@ int Atom::add_custom(const char *name, int flag, int cols, int border) nivector++; ivname = (char **) memory->srealloc(ivname,nivector*sizeof(char *),"atom:ivname"); ivname[index] = utils::strdup(name); + ivghost = (int *) memory->srealloc(ivghost,nivector*sizeof(int),"atom:ivghost"); + ivghost[index] = ghost; ivector = (int **) memory->srealloc(ivector,nivector*sizeof(int *),"atom:ivector"); memory->create(ivector[index],nmax,"atom:ivector"); @@ -2679,6 +2718,8 @@ int Atom::add_custom(const char *name, int flag, int cols, int border) ndvector++; dvname = (char **) memory->srealloc(dvname,ndvector*sizeof(char *),"atom:dvname"); dvname[index] = utils::strdup(name); + dvghost = (int *) memory->srealloc(dvghost,ndvector*sizeof(int),"atom:dvghost"); + dvghost[index] = ghost; dvector = (double **) memory->srealloc(dvector,ndvector*sizeof(double *),"atom:dvector"); memory->create(dvector[index],nmax,"atom:dvector"); @@ -2687,6 +2728,8 @@ int Atom::add_custom(const char *name, int flag, int cols, int border) niarray++; ianame = (char **) memory->srealloc(ianame,niarray*sizeof(char *),"atom:ianame"); ianame[index] = utils::strdup(name); + iaghost = (int *) memory->srealloc(iaghost,niarray*sizeof(int),"atom:iaghost"); + iaghost[index] = ghost; iarray = (int ***) memory->srealloc(iarray,niarray*sizeof(int **),"atom:iarray"); memory->create(iarray[index],nmax,cols,"atom:iarray"); icols = (int *) memory->srealloc(icols,niarray*sizeof(int),"atom:icols"); @@ -2697,6 +2740,8 @@ int Atom::add_custom(const char *name, int flag, int cols, int border) ndarray++; daname = (char **) memory->srealloc(daname,ndarray*sizeof(char *),"atom:daname"); daname[index] = utils::strdup(name); + daghost = (int *) memory->srealloc(daghost,ndarray*sizeof(int),"atom:daghost"); + daghost[index] = ghost; darray = (double ***) memory->srealloc(darray,ndarray*sizeof(double **),"atom:darray"); memory->create(darray[index],nmax,cols,"atom:darray"); dcols = (int *) memory->srealloc(dcols,ndarray*sizeof(int),"atom:dcols"); @@ -2705,8 +2750,6 @@ int Atom::add_custom(const char *name, int flag, int cols, int border) if (index < 0) error->all(FLERR,"Invalid call to Atom::add_custom()"); - else - custom_border[flag + (cols) ? 2 : 0].push_back(border); return index; } diff --git a/src/atom.h b/src/atom.h index 6f22ebd160..b515797bb3 100644 --- a/src/atom.h +++ b/src/atom.h @@ -244,7 +244,7 @@ class Atom : protected Pointers { int *icols, *dcols; char **ivname, **dvname, **ianame, **daname; int nivector, ndvector, niarray, ndarray; - std::array, 4> custom_border; + int *ivghost, *dvghost, *iaghost, *daghost; // molecule templates // each template can be a set of consecutive molecules @@ -366,8 +366,8 @@ class Atom : protected Pointers { void update_callback(int); int find_custom(const char *, int &, int &); - int find_custom(const char *, int &, int &, int &); - virtual int add_custom(const char *, int, int, int border = 0); + int find_custom_ghost(const char *, int &, int &, int &); + virtual int add_custom(const char *, int, int, int ghost = 0); virtual void remove_custom(int, int, int); void *extract(const char *); From 99e38ba55a585360826caac6bf8df38e62f20d4b Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Tue, 16 Jan 2024 23:44:00 +1000 Subject: [PATCH 35/89] fix whitespace --- src/atom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atom.cpp b/src/atom.cpp index 63df04aa14..a0cbe657d9 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2696,7 +2696,7 @@ This function is called, e.g. from :doc:`fix property/atom `. * \param name Name of the property (w/o a "i_" or "d_" or "i2_" or "d2_" prefix) * \param flag Data type of property: 0 for int, 1 for double * \param cols Number of values: 0 for a single value, 1 or more for a vector of values - * \param ghost Whether property is communicated to ghost atoms: 0 for no, 1 for yes + * \param ghost Whether property is communicated to ghost atoms: 0 for no, 1 for yes * \return index of property in the respective list of properties */ int Atom::add_custom(const char *name, int flag, int cols, int ghost) From 6f6a08c2512c7955b3f1589cf80a434e6dff4c47 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Wed, 17 Jan 2024 15:54:47 +1000 Subject: [PATCH 36/89] add ghost checking for custom peratom quantities amgroup and pval --- src/AMOEBA/pair_amoeba.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index ee7e362487..20c67ac90d 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -831,7 +831,7 @@ void PairAmoeba::init_style() "xyzaxis", "polaxe", "pval"}; int const flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) int const cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 - int const ghost_check[6] = {1, 0, 0, 0, 0, 0}; // which types need ghost + int const ghost_check[6] = {1, 1, 0, 0, 0, 1}; // which types need ghost; TO-DO: check int flag, cols, ghost; int index[6]; From d30483fa67c4de06d5fe88e0d1c6b58bb0aaa86c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 Jan 2024 12:26:17 -0500 Subject: [PATCH 37/89] fix MPI issue with PairAmoeba::print_settings() --- src/AMOEBA/pair_amoeba.cpp | 143 +++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 20c67ac90d..5d27a0e651 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -429,7 +429,7 @@ void PairAmoeba::compute(int eflag, int vflag) // output FF settings to screen and logfile // delay until here because RMS force accuracy is computed based on rpole - if (first_flag_compute && (comm->me == 0)) print_settings(); + if (first_flag_compute) print_settings(); first_flag_compute = 0; if (amoeba) pbc_xred(); @@ -1076,79 +1076,86 @@ void PairAmoeba::init_style() void PairAmoeba::print_settings() { std::string mesg = utils::uppercase(mystyle) + " force field settings\n"; - - if (amoeba) { - choose(HAL); - mesg += fmt::format(" hal: cut {} taper {} vscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), - special_hal[1],special_hal[2],special_hal[3],special_hal[4]); - } else { - choose(REPULSE); - mesg += fmt::format(" repulsion: cut {} taper {} rscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), - special_repel[1],special_repel[2],special_repel[3],special_repel[4]); - - choose(QFER); - mesg += fmt::format(" qxfer: cut {} taper {} mscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), - special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); - - if (use_dewald) { - choose(DISP_LONG); - mesg += fmt::format(" dispersion: cut {} aewald {} bsorder {} FFT {} {} {} " - "dspscale {} {} {} {}\n", sqrt(off2),aewald,bsdorder,ndfft1,ndfft2,ndfft3, - special_disp[1],special_disp[2],special_disp[3],special_disp[4]); - } else { - choose(DISP); - mesg += fmt::format(" dispersion: cut {} aewald {} dspscale {} {} {} {}\n", - sqrt(off2),aewald,special_disp[1], - special_disp[2],special_disp[3],special_disp[4]); - } - } + double estimated_mpole_accuracy = 0.0; if (use_ewald) { choose(MPOLE_LONG); - double estimated_accuracy = final_accuracy_mpole(); - mesg += fmt::format(" multipole: cut {} aewald {} bsorder {} FFT {} {} {}; " - "estimated absolute RMS force accuracy = {:.8g}; " - "estimated relative RMS force accuracy = {:.8g}; " - "mscale {} {} {} {}\n", - sqrt(off2),aewald,bseorder,nefft1,nefft2,nefft3, - estimated_accuracy,estimated_accuracy/two_charge_force, - special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); - } else { - choose(MPOLE); - mesg += fmt::format(" multipole: cut {} aewald {} mscale {} {} {} {}\n", sqrt(off2),aewald, - special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); + estimated_mpole_accuracy = final_accuracy_mpole(); } - if (use_ewald) { - choose(POLAR_LONG); - mesg += fmt::format(" polar: cut {} aewald {} bsorder {} FFT {} {} {}\n", - sqrt(off2),aewald,bsporder,nefft1,nefft2,nefft3); - mesg += fmt::format(" pscale {} {} {} {} piscale {} {} {} {} " - "wscale {} {} {} {} d/u scale {} {}\n", - special_polar_pscale[1],special_polar_pscale[2], - special_polar_pscale[3],special_polar_pscale[4], - special_polar_piscale[1],special_polar_piscale[2], - special_polar_piscale[3],special_polar_piscale[4], - special_polar_wscale[1],special_polar_wscale[2], - special_polar_wscale[3],special_polar_wscale[4], - polar_dscale,polar_uscale); - } else { - choose(POLAR); - mesg += fmt::format(" polar: cut {} aewald {}\n",sqrt(off2),aewald); - mesg += fmt::format(" pscale {} {} {} {} piscale {} {} {} {} " - "wscale {} {} {} {} d/u scale {} {}\n", - special_polar_pscale[1],special_polar_pscale[2], - special_polar_pscale[3],special_polar_pscale[4], - special_polar_piscale[1],special_polar_piscale[2], - special_polar_piscale[3],special_polar_piscale[4], - special_polar_wscale[1],special_polar_wscale[2], - special_polar_wscale[3],special_polar_wscale[4], - polar_dscale,polar_uscale); - } + if (comm->me == 0) { + if (amoeba) { + choose(HAL); + mesg += fmt::format(" hal: cut {} taper {} vscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), + special_hal[1],special_hal[2],special_hal[3],special_hal[4]); + } else { + choose(REPULSE); + mesg += fmt::format(" repulsion: cut {} taper {} rscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), + special_repel[1],special_repel[2],special_repel[3],special_repel[4]); - choose(USOLV); - mesg += fmt::format(" precondition: cut {}\n",sqrt(off2)); - utils::logmesg(lmp, mesg); + choose(QFER); + mesg += fmt::format(" qxfer: cut {} taper {} mscale {} {} {} {}\n", sqrt(off2),sqrt(cut2), + special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); + + if (use_dewald) { + choose(DISP_LONG); + mesg += fmt::format(" dispersion: cut {} aewald {} bsorder {} FFT {} {} {} " + "dspscale {} {} {} {}\n", sqrt(off2),aewald,bsdorder,ndfft1,ndfft2,ndfft3, + special_disp[1],special_disp[2],special_disp[3],special_disp[4]); + } else { + choose(DISP); + mesg += fmt::format(" dispersion: cut {} aewald {} dspscale {} {} {} {}\n", + sqrt(off2),aewald,special_disp[1], + special_disp[2],special_disp[3],special_disp[4]); + } + } + + if (use_ewald) { + choose(MPOLE_LONG); + mesg += fmt::format(" multipole: cut {} aewald {} bsorder {} FFT {} {} {}; " + "estimated absolute RMS force accuracy = {:.8g}; " + "estimated relative RMS force accuracy = {:.8g}; " + "mscale {} {} {} {}\n", + sqrt(off2),aewald,bseorder,nefft1,nefft2,nefft3, + estimated_mpole_accuracy,estimated_mpole_accuracy/two_charge_force, + special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); + } else { + choose(MPOLE); + mesg += fmt::format(" multipole: cut {} aewald {} mscale {} {} {} {}\n", sqrt(off2),aewald, + special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); + } + + if (use_ewald) { + choose(POLAR_LONG); + mesg += fmt::format(" polar: cut {} aewald {} bsorder {} FFT {} {} {}\n", + sqrt(off2),aewald,bsporder,nefft1,nefft2,nefft3); + mesg += fmt::format(" pscale {} {} {} {} piscale {} {} {} {} " + "wscale {} {} {} {} d/u scale {} {}\n", + special_polar_pscale[1],special_polar_pscale[2], + special_polar_pscale[3],special_polar_pscale[4], + special_polar_piscale[1],special_polar_piscale[2], + special_polar_piscale[3],special_polar_piscale[4], + special_polar_wscale[1],special_polar_wscale[2], + special_polar_wscale[3],special_polar_wscale[4], + polar_dscale,polar_uscale); + } else { + choose(POLAR); + mesg += fmt::format(" polar: cut {} aewald {}\n",sqrt(off2),aewald); + mesg += fmt::format(" pscale {} {} {} {} piscale {} {} {} {} " + "wscale {} {} {} {} d/u scale {} {}\n", + special_polar_pscale[1],special_polar_pscale[2], + special_polar_pscale[3],special_polar_pscale[4], + special_polar_piscale[1],special_polar_piscale[2], + special_polar_piscale[3],special_polar_piscale[4], + special_polar_wscale[1],special_polar_wscale[2], + special_polar_wscale[3],special_polar_wscale[4], + polar_dscale,polar_uscale); + } + + choose(USOLV); + mesg += fmt::format(" precondition: cut {}\n",sqrt(off2)); + utils::logmesg(lmp, mesg); + } } /* ---------------------------------------------------------------------- From 039ad4f4ae9afb9c50481c66fd83a4c3921efc82 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Mon, 22 Jan 2024 15:11:52 +1000 Subject: [PATCH 38/89] change Atom_KOKKOS::add_custom to match Atom, and tidy headers in atom.h --- src/KOKKOS/atom_kokkos.cpp | 12 +++++++++--- src/atom.h | 2 -- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/KOKKOS/atom_kokkos.cpp b/src/KOKKOS/atom_kokkos.cpp index 5fce797efa..af1816c1d3 100644 --- a/src/KOKKOS/atom_kokkos.cpp +++ b/src/KOKKOS/atom_kokkos.cpp @@ -300,7 +300,7 @@ void AtomKokkos::grow(unsigned int mask) return index in ivector or dvector of its location ------------------------------------------------------------------------- */ -int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) +int AtomKokkos::add_custom(const char *name, int flag, int cols, int ghost) { int index = -1; @@ -309,6 +309,8 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) nivector++; ivname = (char **) memory->srealloc(ivname, nivector * sizeof(char *), "atom:ivname"); ivname[index] = utils::strdup(name); + ivghost = (int *) memory->srealloc(ivghost,nivector * sizeof(int),"atom:ivghost"); + ivghost[index] = ghost; ivector = (int **) memory->srealloc(ivector, nivector * sizeof(int *), "atom:ivector"); memory->create(ivector[index], nmax, "atom:ivector"); @@ -317,6 +319,8 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) ndvector++; dvname = (char **) memory->srealloc(dvname, ndvector * sizeof(char *), "atom:dvname"); dvname[index] = utils::strdup(name); + dvghost = (int *) memory->srealloc(dvghost, ndvector * sizeof(int), "atom:dvghost"); + dvghost[index] = ghost; dvector = (double **) memory->srealloc(dvector, ndvector * sizeof(double *), "atom:dvector"); this->sync(Device, DVECTOR_MASK); memoryKK->grow_kokkos(k_dvector, dvector, ndvector, nmax, "atom:dvector"); @@ -327,6 +331,8 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) niarray++; ianame = (char **) memory->srealloc(ianame, niarray * sizeof(char *), "atom:ianame"); ianame[index] = utils::strdup(name); + iaghost = (int *) memory->srealloc(iaghost, niarray * sizeof(int), "atom:iaghost"); + iaghost[index] = ghost; iarray = (int ***) memory->srealloc(iarray, niarray * sizeof(int **), "atom:iarray"); memory->create(iarray[index], nmax, cols, "atom:iarray"); @@ -338,6 +344,8 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) ndarray++; daname = (char **) memory->srealloc(daname, ndarray * sizeof(char *), "atom:daname"); daname[index] = utils::strdup(name); + daghost = (int *) memory->srealloc(daghost, ndarray * sizeof(int), "atom:daghost"); + daghost[index] = ghost; darray = (double ***) memory->srealloc(darray, ndarray * sizeof(double **), "atom:darray"); memory->create(darray[index], nmax, cols, "atom:darray"); @@ -347,8 +355,6 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols, int border) if (index < 0) error->all(FLERR,"Invalid call to AtomKokkos::add_custom()"); - else - custom_border[flag + (cols) ? 2 : 0].push_back(border); return index; } diff --git a/src/atom.h b/src/atom.h index b515797bb3..4d26ab0abd 100644 --- a/src/atom.h +++ b/src/atom.h @@ -18,8 +18,6 @@ #include #include -#include -#include namespace LAMMPS_NS { From 28de91a2ccbd1ea5dacb559aafa2289fb3412294 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 Jan 2024 23:26:21 -0500 Subject: [PATCH 39/89] avoid uninitialized pointers --- src/compute_heat_flux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compute_heat_flux.cpp b/src/compute_heat_flux.cpp index 1b6fd27086..62b2c8b63b 100644 --- a/src/compute_heat_flux.cpp +++ b/src/compute_heat_flux.cpp @@ -32,7 +32,8 @@ using namespace LAMMPS_NS; ComputeHeatFlux::ComputeHeatFlux(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), - id_ke(nullptr), id_pe(nullptr), id_stress(nullptr) + id_ke(nullptr), id_pe(nullptr), id_stress(nullptr), + c_ke(nullptr), c_pe(nullptr), c_stress(nullptr) { if (narg != 6) error->all(FLERR,"Illegal compute heat/flux command"); From 14bf502abe8d47b9f66a3598b9ab8a14f43d8ef7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jan 2024 09:10:31 -0500 Subject: [PATCH 40/89] correct headings --- doc/src/Howto_structured_data.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/src/Howto_structured_data.rst b/doc/src/Howto_structured_data.rst index 29c65a7a34..8b9c3dbc80 100644 --- a/doc/src/Howto_structured_data.rst +++ b/doc/src/Howto_structured_data.rst @@ -52,8 +52,8 @@ JSON "ke": 2.4962152903997174569 } -YAML format thermo_style output -=============================== +YAML format thermo_style or dump_style output +============================================= Extracting data from log file ----------------------------- @@ -112,6 +112,9 @@ of that run: Number of runs: 2 TotEng = -4.62140097780047 +Extracting data from dump file +------------------------------ + .. versionadded:: 4May2022 YAML format output has been added to multiple commands in LAMMPS, From 0a1362654b35056725394952e2b7d24f39d433de Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jan 2024 16:23:14 -0500 Subject: [PATCH 41/89] make compiling QUIP library more reliable - replace any -std=f* flags when using GNU fortran with -std=gnu - cancel parallel make and require serial compile to avoid race condition accessing modules - increase maximum allowed size for arrays on the stack 100 times --- cmake/Modules/Packages/ML-QUIP.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/ML-QUIP.cmake b/cmake/Modules/Packages/ML-QUIP.cmake index a90b77190f..cdadec7d0e 100644 --- a/cmake/Modules/Packages/ML-QUIP.cmake +++ b/cmake/Modules/Packages/ML-QUIP.cmake @@ -18,7 +18,7 @@ if(DOWNLOAD_QUIP) set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n") set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) - set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n") + set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}} -fmax-stack-var-size=6553600\n") set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n") set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n") set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n") @@ -41,6 +41,11 @@ if(DOWNLOAD_QUIP) set(temp "${temp}HAVE_TURBOGAP=0\nHAVE_QR=1\nHAVE_THIRDPARTY=0\nHAVE_FX=0\nHAVE_SCME=0\nHAVE_MTP=0\n") set(temp "${temp}HAVE_MBD=0\nHAVE_TTM_NF=0\nHAVE_CH4=0\nHAVE_NETCDF4=0\nHAVE_MDCORE=0\nHAVE_ASAP=0\n") set(temp "${temp}HAVE_CGAL=0\nHAVE_METIS=0\nHAVE_LMTO_TBE=0\nHAVE_SCALAPACK=0\n") + # for gfortran, the -std= flag, if present, *must* be -std=gnu or else the compilation will fail. + if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + string(REGEX REPLACE -std=f[0-9]+ -std=gnu newtemp "${temp}") + set(temp "${newtemp}") + endif() file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}") message(STATUS "QUIP download via git requested - we will build our own") @@ -56,7 +61,7 @@ if(DOWNLOAD_QUIP) GIT_SUBMODULES "src/fox;src/GAP" PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config /arch/Makefile.lammps CONFIGURE_COMMAND env QUIP_ARCH=lammps make config - BUILD_COMMAND env QUIP_ARCH=lammps make libquip + BUILD_COMMAND env QUIP_ARCH=lammps make -j1 libquip INSTALL_COMMAND "" BUILD_IN_SOURCE YES BUILD_BYPRODUCTS /build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX} From 2ea200dc016e61e49f2ee1f8bbc53bafb104d9fb Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Sat, 27 Jan 2024 07:26:47 +1000 Subject: [PATCH 42/89] add ghost check to redID in pair_amoeba.cpp --- src/AMOEBA/pair_amoeba.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 5d27a0e651..142521f179 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -831,7 +831,7 @@ void PairAmoeba::init_style() "xyzaxis", "polaxe", "pval"}; int const flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) int const cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 - int const ghost_check[6] = {1, 1, 0, 0, 0, 1}; // which types need ghost; TO-DO: check + int const ghost_check[6] = {1, 1, 1, 0, 0, 1}; // which types need ghost; TO-DO: check int flag, cols, ghost; int index[6]; From 5c43b56699a7ea58c1e1b5bc900f0429fbda1ac4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jan 2024 16:47:22 -0500 Subject: [PATCH 43/89] silence compiler warning --- fortran/lammps.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index 071dffebc0..d0133f075c 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -1673,7 +1673,7 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: name REAL(KIND=c_double), INTENT(IN) :: val INTEGER :: err - TYPE(c_ptr) :: Cstr, Cname + TYPE(c_ptr) :: Cname Cname = f2c_string(name) err = lammps_set_internal_variable(self%handle, Cname, val) From a2b7a49c90c7f23615a9e96d10a94e56bdb0d720 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 26 Jan 2024 15:15:17 -0700 Subject: [PATCH 44/89] Remove HIP_PATH requirement from CMake build It is not recommended to set the HIP_PATH environment variable anymore as it may break hipcc in some cases. We only used it for adding the necessary CMAKE_PREFIX_PATH, which after the folder structure reorganization in 5.x was pointing to the same location anyway. Closes issue #3986 --- cmake/Modules/DetectHIPInstallation.cmake | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmake/Modules/DetectHIPInstallation.cmake b/cmake/Modules/DetectHIPInstallation.cmake index 0b425435b6..dfa9904723 100644 --- a/cmake/Modules/DetectHIPInstallation.cmake +++ b/cmake/Modules/DetectHIPInstallation.cmake @@ -1,11 +1,3 @@ -if(NOT DEFINED HIP_PATH) - if(NOT DEFINED ENV{HIP_PATH}) - message(FATAL_ERROR "HIP support requires HIP_PATH to be defined.\n" - "Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.") - else() - set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation") - endif() -endif() if(NOT DEFINED ROCM_PATH) if(NOT DEFINED ENV{ROCM_PATH}) set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation") @@ -13,4 +5,4 @@ if(NOT DEFINED ROCM_PATH) set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation") endif() endif() -list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH}) +list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}) From 84f86c2c15ee921aa209c2031817b10d73b5eab6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jan 2024 23:18:15 -0500 Subject: [PATCH 45/89] improve error message --- src/fix_nh_sphere.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index 0e427763e7..1835181606 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -50,8 +50,7 @@ FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) : if (strcmp(arg[iarg],"disc") == 0) { inertia = 0.5; if (domain->dimension != 2) - error->all(FLERR, - "Fix nvt/nph/npt sphere disc option requires 2d simulation"); + error->all(FLERR, "Fix {} disc option requires 2d simulation", style); } iarg++; } From a83a5165ee855838afd5e4e55e43f6fd5ffcb43d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 28 Jan 2024 11:30:11 -0500 Subject: [PATCH 46/89] simplify --- cmake/Modules/Packages/ML-QUIP.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/Packages/ML-QUIP.cmake b/cmake/Modules/Packages/ML-QUIP.cmake index cdadec7d0e..5cb5a0967e 100644 --- a/cmake/Modules/Packages/ML-QUIP.cmake +++ b/cmake/Modules/Packages/ML-QUIP.cmake @@ -18,7 +18,9 @@ if(DOWNLOAD_QUIP) set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n") set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) - set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}} -fmax-stack-var-size=6553600\n") + # quip library uses GNU fortran extensions. If any more restrictive standards are set, reset them + string(REGEX REPLACE -std=f[0-9]+ -std=gnu _fopt "${CMAKE_Fortran_FLAGS_${BTYPE}}") + set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${_fopt} -fmax-stack-var-size=6553600\n") set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n") set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n") set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n") @@ -41,11 +43,6 @@ if(DOWNLOAD_QUIP) set(temp "${temp}HAVE_TURBOGAP=0\nHAVE_QR=1\nHAVE_THIRDPARTY=0\nHAVE_FX=0\nHAVE_SCME=0\nHAVE_MTP=0\n") set(temp "${temp}HAVE_MBD=0\nHAVE_TTM_NF=0\nHAVE_CH4=0\nHAVE_NETCDF4=0\nHAVE_MDCORE=0\nHAVE_ASAP=0\n") set(temp "${temp}HAVE_CGAL=0\nHAVE_METIS=0\nHAVE_LMTO_TBE=0\nHAVE_SCALAPACK=0\n") - # for gfortran, the -std= flag, if present, *must* be -std=gnu or else the compilation will fail. - if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) - string(REGEX REPLACE -std=f[0-9]+ -std=gnu newtemp "${temp}") - set(temp "${newtemp}") - endif() file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}") message(STATUS "QUIP download via git requested - we will build our own") From ef1857d50de09d3a9a070e2da127a56a13dad8aa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jan 2024 15:48:30 -0500 Subject: [PATCH 47/89] programming style updates --- src/AMOEBA/pair_amoeba.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 142521f179..b0261921fe 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/ Sandia National Laboratories @@ -39,17 +38,19 @@ using namespace LAMMPS_NS; using MathSpecial::powint; -enum{INDUCE,RSD,SETUP_AMOEBA,SETUP_HIPPO,KMPOLE,AMGROUP,PVAL}; // forward comm -enum{FIELD,ZRSD,TORQUE,UFLD}; // reverse comm -enum{ARITHMETIC,GEOMETRIC,CUBIC_MEAN,R_MIN,SIGMA,DIAMETER,HARMONIC,HHG,W_H}; -enum{HAL,REPULSE,QFER,DISP,MPOLE,POLAR,USOLV,DISP_LONG,MPOLE_LONG,POLAR_LONG}; -enum{MPOLE_GRID,POLAR_GRID,POLAR_GRIDC,DISP_GRID,INDUCE_GRID,INDUCE_GRIDC}; -enum{MUTUAL,OPT,TCG,DIRECT}; -enum{GEAR,ASPC,LSQR}; +enum { INDUCE, RSD, SETUP_AMOEBA, SETUP_HIPPO, KMPOLE, AMGROUP, PVAL }; // forward comm +enum { FIELD, ZRSD, TORQUE, UFLD }; // reverse comm +enum { ARITHMETIC, GEOMETRIC, CUBIC_MEAN, R_MIN, SIGMA, DIAMETER, HARMONIC, HHG, W_H }; +enum { HAL, REPULSE, QFER, DISP, MPOLE, POLAR, USOLV, DISP_LONG, MPOLE_LONG, POLAR_LONG }; +enum { MPOLE_GRID, POLAR_GRID, POLAR_GRIDC, DISP_GRID, INDUCE_GRID, INDUCE_GRIDC }; +enum { MUTUAL, OPT, TCG, DIRECT }; +enum { GEAR, ASPC, LSQR }; #define DELTASTACK 16 #define DEBUG_AMOEBA 0 +// clang-format off + /* ---------------------------------------------------------------------- */ PairAmoeba::PairAmoeba(LAMMPS *lmp) : Pair(lmp) @@ -827,14 +828,15 @@ void PairAmoeba::init_style() // check if all custom atom arrays were set via fix property/atom - char const * names[6] = {"amtype", "amgroup", "redID", - "xyzaxis", "polaxe", "pval"}; - int const flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) - int const cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 - int const ghost_check[6] = {1, 1, 1, 0, 0, 1}; // which types need ghost; TO-DO: check - int flag, cols, ghost; - int index[6]; + // clang-format on + const char *names[6] = {"amtype", "amgroup", "redID", "xyzaxis", "polaxe", "pval"}; + const int flag_check[6] = {0, 0, 1, 1, 0, 1}; // correct type (0 int, 1 dbl) + const int cols_check[6] = {0, 0, 0, 3, 0, 0}; // xyzaxis 3 cols, all others 0 + const int ghost_check[6] = {1, 1, 1, 0, 0, 1}; // which types need ghost; TO-DO: check + int flag, cols, ghost, index[6]; + // clang-format off + for (int i = 0; i < 6; i++) { if (ghost_check[i]) { index[i] = atom->find_custom_ghost(names[i], flag, cols, ghost); From 87fd1c63df93442ca7c416098b78cd710410d0c4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jan 2024 15:52:04 -0500 Subject: [PATCH 48/89] whitespace --- src/AMOEBA/pair_amoeba.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index b0261921fe..14c2b9b855 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -836,7 +836,7 @@ void PairAmoeba::init_style() int flag, cols, ghost, index[6]; // clang-format off - + for (int i = 0; i < 6; i++) { if (ghost_check[i]) { index[i] = atom->find_custom_ghost(names[i], flag, cols, ghost); From 69279342434f3483ca1b3f52c3c5fc6ab588169f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jan 2024 21:12:41 -0500 Subject: [PATCH 49/89] make estimated accuracy output more readable --- src/AMOEBA/pair_amoeba.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index caf29b498a..4cb5c39b61 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -1114,10 +1114,10 @@ void PairAmoeba::print_settings() if (use_ewald) { choose(MPOLE_LONG); - mesg += fmt::format(" multipole: cut {} aewald {} bsorder {} FFT {} {} {}; " - "estimated absolute RMS force accuracy = {:.8g}; " - "estimated relative RMS force accuracy = {:.8g}; " - "mscale {} {} {} {}\n", + mesg += fmt::format(" multipole: cut {} aewald {} bsorder {} FFT {} {} {}\n" + " estimated absolute RMS force accuracy = {:.8g}\n" + " estimated relative RMS force accuracy = {:.8g}\n" + " mscale {} {} {} {}\n", sqrt(off2),aewald,bseorder,nefft1,nefft2,nefft3, estimated_mpole_accuracy,estimated_mpole_accuracy/two_charge_force, special_mpole[1],special_mpole[2],special_mpole[3],special_mpole[4]); From e319555f64cb9e2c47f6fc8b19c84e5ba9a8b6e1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 Jan 2024 12:54:03 -0500 Subject: [PATCH 50/89] merge lmpfftsettings_kokkos.h into lmpfftsettings.h --- src/KOKKOS/fftdata_kokkos.h | 21 +++++---------- src/KOKKOS/lmpfftsettings_kokkos.h | 43 ------------------------------ src/lmpfftsettings.h | 24 ++++++++++++++++- 3 files changed, 29 insertions(+), 59 deletions(-) delete mode 100644 src/KOKKOS/lmpfftsettings_kokkos.h diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index 15dca33bcc..7f900002e5 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -12,30 +12,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +// data types for 2d/3d FFTs + +#ifndef LMP_FFT_DATA_KOKKOS_H +#define LMP_FFT_DATA_KOKKOS_H + #include "kokkos_type.h" #ifndef MAX #define MAX(A,B) ((A) > (B) ? (A) : (B)) #endif -// data types for 2d/3d FFTs - -#ifndef LMP_FFT_DATA_KOKKOS_H -#define LMP_FFT_DATA_KOKKOS_H - -#include "lmpfftsettings_kokkos.h" +#include "lmpfftsettings.h" // ------------------------------------------------------------------------- -// Data types for single-precision complex - -#if FFT_PRECISION == 1 -#elif FFT_PRECISION == 2 -#else -#error "FFT_PRECISION needs to be either 1 (=single) or 2 (=double)" -#endif - - // with KOKKOS in CUDA or HIP mode we can only have // CUFFT/HIPFFT or KISSFFT, thus undefine all other // FFTs here, since they may be valid in fft3d.cpp diff --git a/src/KOKKOS/lmpfftsettings_kokkos.h b/src/KOKKOS/lmpfftsettings_kokkos.h deleted file mode 100644 index 6cea9bb63a..0000000000 --- a/src/KOKKOS/lmpfftsettings_kokkos.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - LAMMPS development team: developers@lammps.org - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -// common FFT library related defines and compilation settings - -#ifndef LMP_FFT_KOKKOS_SETTINGS_H -#define LMP_FFT_KOKKOS_SETTINGS_H - -#include "lmpfftsettings.h" - -// if user set FFTW, it means FFTW3 - -#ifdef FFT_KOKKOS_FFTW -#ifndef FFT_KOKKOS_FFTW3 -#define FFT_KOKKOS_FFTW3 -#endif -#endif - -// set strings for library info output - -#if defined(FFT_KOKKOS_FFTW3) -#define LMP_FFT_KOKKOS_LIB "FFTW3" -#elif defined(FFT_KOKKOS_MKL) -#define LMP_FFT_KOKKOS_LIB "MKL FFT" -#elif defined(FFT_KOKKOS_CUFFT) -#define LMP_FFT_KOKKOS_LIB "cuFFT" -#elif defined(FFT_KOKKOS_HIPFFT) -#define LMP_FFT_KOKKOS_LIB "hipFFT" -#else -#define LMP_FFT_KOKKOS_LIB "KISS FFT" -#endif - -#endif diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 7fad0de8c7..426726440e 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -16,7 +16,7 @@ #ifndef LMP_FFT_SETTINGS_H #define LMP_FFT_SETTINGS_H -// if user set FFTW, it means FFTW3 +// if a user sets FFTW, it means FFTW3 #ifdef FFT_FFTW #ifndef FFT_FFTW3 @@ -24,6 +24,14 @@ #endif #endif +#ifdef LMP_KOKKOS +#ifdef FFT_KOKKOS_FFTW +#ifndef FFT_KOKKOS_FFTW3 +#define FFT_KOKKOS_FFTW3 +#endif +#endif +#endif + // set strings for library info output #if defined(FFT_FFTW3) @@ -38,6 +46,20 @@ #define LMP_FFT_LIB "KISS FFT" #endif +#ifdef LMP_KOKKOS +#if defined(FFT_KOKKOS_FFTW3) +#define LMP_FFT_KOKKOS_LIB "FFTW3" +#elif defined(FFT_KOKKOS_MKL) +#define LMP_FFT_KOKKOS_LIB "MKL FFT" +#elif defined(FFT_KOKKOS_CUFFT) +#define LMP_FFT_KOKKOS_LIB "cuFFT" +#elif defined(FFT_KOKKOS_HIPFFT) +#define LMP_FFT_KOKKOS_LIB "hipFFT" +#else +#define LMP_FFT_KOKKOS_LIB "KISS FFT" +#endif +#endif + #ifdef FFT_SINGLE typedef float FFT_SCALAR; #define FFT_PRECISION 1 From de7c459b2f18e8aac01497129316a9e3ba6059c4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 Jan 2024 13:28:41 -0500 Subject: [PATCH 51/89] consolidate FFT settings in headers --- src/AMOEBA/amoeba_convolution.h | 12 +----------- src/INTEL/pppm_electrode_intel.cpp | 29 +++++++++++++++-------------- src/INTEL/pppm_electrode_intel.h | 3 --- src/KSPACE/msm.cpp | 4 ---- src/kspace.h | 8 -------- src/lmpfftsettings.h | 8 ++++++++ 6 files changed, 24 insertions(+), 40 deletions(-) diff --git a/src/AMOEBA/amoeba_convolution.h b/src/AMOEBA/amoeba_convolution.h index bed65149ec..60825bb8b6 100644 --- a/src/AMOEBA/amoeba_convolution.h +++ b/src/AMOEBA/amoeba_convolution.h @@ -15,17 +15,7 @@ #define LMP_AMOEBA_CONVOLUTION_H #include "pointers.h" - -#ifdef FFT_SINGLE -typedef float FFT_SCALAR; -#define LMP_FFT_PREC "single" -#define MPI_FFT_SCALAR MPI_FLOAT -#else - -typedef double FFT_SCALAR; -#define LMP_FFT_PREC "double" -#define MPI_FFT_SCALAR MPI_DOUBLE -#endif +#include "lmpfftsettings.h" namespace LAMMPS_NS { diff --git a/src/INTEL/pppm_electrode_intel.cpp b/src/INTEL/pppm_electrode_intel.cpp index 9f3c57b50e..11cda40748 100644 --- a/src/INTEL/pppm_electrode_intel.cpp +++ b/src/INTEL/pppm_electrode_intel.cpp @@ -42,6 +42,7 @@ #include "update.h" #include "wire_dipole.h" +#include #include #include @@ -164,7 +165,6 @@ void PPPMElectrodeIntel::setup() PPPMIntel::setup(); prd[0] /= wire_volfactor; prd[1] /= wire_volfactor; - } void PPPMElectrodeIntel::compute(int eflag, int vflag) @@ -280,7 +280,7 @@ void PPPMElectrodeIntel::compute(int eflag, int vflag) slabflag = 0; // bypass compute_second's slabcorr() PPPMIntel::compute_second(eflag, vflag); slabflag = tempslabflag; - boundcorr->compute_corr(qsum, eflag_atom, eflag_global, energy, eatom); + boundcorr->compute_corr(qsum, eflag_atom, eflag_global, energy, eatom); compute_vector_called = false; } @@ -333,7 +333,7 @@ void PPPMElectrodeIntel::compute_vector(double *vec, int sensor_grpbit, int sour // electrolyte density (without writing an additional function) FFT_SCALAR ***density_brick_real = density_brick; FFT_SCALAR *density_fft_real = density_fft; - if (neighbor->ago != 0) pack_buffers(); // since midstep positions may be outdated + if (neighbor->ago != 0) pack_buffers(); // since midstep positions may be outdated switch (fix->precision()) { case FixIntel::PREC_MODE_MIXED: make_rho_in_brick(fix->get_mixed_buffers(), source_grpbit, @@ -1202,22 +1202,23 @@ void PPPMElectrodeIntel::pack_buffers_q() { fix->start_watch(TIME_PACK); int packthreads; - if (comm->nthreads > INTEL_HTHREADS) packthreads = comm->nthreads; - else packthreads = 1; - #if defined(_OPENMP) - #pragma omp parallel if (packthreads > 1) - #endif + if (comm->nthreads > INTEL_HTHREADS) + packthreads = comm->nthreads; + else + packthreads = 1; +#if defined(_OPENMP) +#pragma omp parallel if (packthreads > 1) +#endif { int ifrom, ito, tid; - IP_PRE_omp_range_id_align(ifrom, ito, tid, atom->nlocal+atom->nghost, - packthreads, - sizeof(IntelBuffers::atom_t)); + IP_PRE_omp_range_id_align(ifrom, ito, tid, atom->nlocal + atom->nghost, packthreads, + sizeof(IntelBuffers::atom_t)); if (fix->precision() == FixIntel::PREC_MODE_MIXED) - fix->get_mixed_buffers()->thr_pack_q(ifrom,ito); + fix->get_mixed_buffers()->thr_pack_q(ifrom, ito); else if (fix->precision() == FixIntel::PREC_MODE_DOUBLE) - fix->get_double_buffers()->thr_pack_q(ifrom,ito); + fix->get_double_buffers()->thr_pack_q(ifrom, ito); else - fix->get_single_buffers()->thr_pack_q(ifrom,ito); + fix->get_single_buffers()->thr_pack_q(ifrom, ito); } fix->stop_watch(TIME_PACK); } diff --git a/src/INTEL/pppm_electrode_intel.h b/src/INTEL/pppm_electrode_intel.h index bfe325d9a1..e61641ea19 100644 --- a/src/INTEL/pppm_electrode_intel.h +++ b/src/INTEL/pppm_electrode_intel.h @@ -29,12 +29,9 @@ KSpaceStyle(pppm/electrode/intel,PPPMElectrodeIntel) #ifndef LMP_PPPM_ELECTRODE_INTEL_H #define LMP_PPPM_ELECTRODE_INTEL_H -#include "boundary_correction.h" #include "electrode_kspace.h" #include "fix_intel.h" -#include "pppm.h" #include "pppm_intel.h" -#include namespace LAMMPS_NS { diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 8f79ab408c..348135494e 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -140,10 +140,6 @@ void MSM::init() if ((order < 4) || (order > 10) || (order%2 != 0)) error->all(FLERR,"MSM order must be 4, 6, 8, or 10"); - if (sizeof(FFT_SCALAR) != 8) - error->all(FLERR,"Cannot (yet) use single precision with MSM " - "(remove -DFFT_SINGLE from Makefile and re-compile)"); - // compute two charge force two_charge(); diff --git a/src/kspace.h b/src/kspace.h index 61ab15c1d9..cc7d979d43 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -16,14 +16,6 @@ #include "pointers.h" // IWYU pragma: export -#ifdef FFT_SINGLE -typedef float FFT_SCALAR; -#define MPI_FFT_SCALAR MPI_FLOAT -#else -typedef double FFT_SCALAR; -#define MPI_FFT_SCALAR MPI_DOUBLE -#endif - namespace LAMMPS_NS { class KSpace : protected Pointers { diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 426726440e..3362866184 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -42,6 +42,14 @@ #define LMP_FFT_LIB "cuFFT" #elif defined(FFT_HIPFFT) #define LMP_FFT_LIB "hipFFT" +#elif defined(FFT_HEFFT) +#if defined(FFT_HEFFTE_FFTW) +#define LMP_FFT_LIB "HeFFTe (FFTW3)" +#elif defined(FFT_HEFFTE_MKL) +#define LMP_FFT_LIB "HeFFTe (MKL)" +#else +#define LMP_FFT_LIB "HeFFTe (native)" +#endif #else #define LMP_FFT_LIB "KISS FFT" #endif From 677c8258e22d943c64265b46c863b5ceb683303b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 Jan 2024 16:19:55 -0500 Subject: [PATCH 52/89] fix cmake issues: always build static heFFTe libs, fixup git hash, cmake output --- cmake/CMakeLists.txt | 19 ++++++++----------- cmake/Modules/Packages/KSPACE.cmake | 20 ++++++++++++++++---- src/lmpfftsettings.h | 18 +++++++++--------- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 76248445e9..cb029d4d20 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -971,14 +971,15 @@ if(PKG_KOKKOS) endif() endif() if(PKG_KSPACE) - if (LMP_HEFFTE) + if (FFT_USE_HEFFTE) message(STATUS "<<< FFT settings >>> -- Primary FFT lib: heFFTe") - if (HEFFTE_BACKEND) - message(STATUS "heFFTe backend: ${HEFFTE_BACKEND}") + if (FFT_HEFFTE_BACKEND) + message(STATUS "heFFTe backend: ${FFT_HEFFTE_BACKEND}") else() message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)") endif() + message(STATUS "Using distributed FFT algorithms from heFTTe") if(FFT_SINGLE) message(STATUS "Using single precision FFTs") else() @@ -997,14 +998,10 @@ if(PKG_KSPACE) else() message(STATUS "Using non-threaded FFTs") endif() - if (FFT_HEFFTE) - message(STATUS "Using distributed algorithms from heFTTe") - else() - message(STATUS "Using builtin distributed algorithms") - endif() - if(PKG_KOKKOS) - message(STATUS "Kokkos FFT: ${FFT_KOKKOS}") - endif() + message(STATUS "Using builtin distributed FFT algorithms") + endif() + if(PKG_KOKKOS) + message(STATUS "Kokkos FFT: ${FFT_KOKKOS}") endif() endif() if(BUILD_DOC) diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index 9c9c879cd4..2ce136aefb 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -50,7 +50,7 @@ option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the if(FFT_USE_HEFFTE) # if FFT_HEFFTE is enabled, switch the builtin FFT engine with Heffte set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL) - set(FFT_HEFFTE_BACKEND "" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL") + set(FFT_HEFFTE_BACKEND "${FFT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL") set_property(CACHE FFT_HEFFTE_BACKEND PROPERTY STRINGS ${FFT_HEFFTE_BACKEND_VALUES}) if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL @@ -60,24 +60,36 @@ if(FFT_USE_HEFFTE) set(HEFFTE_COMPONENTS "MKL") set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe") else() + set(HEFFTE_COMPONENTS "BUILTIN") message(WARNING "FFT_HEFFTE_BACKEND not selected, defaulting to the builtin 'stock' backend, which is intended for testing and is not optimized for production runs") endif() find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS}) if (NOT Heffte_FOUND) # download and build + if(BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS_WAS_ON YES) + set(BUILD_SHARED_LIBS OFF) + endif() + if(CMAKE_REQUEST_PIC) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() include(FetchContent) FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0 URL "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz" URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d ) FetchContent_Populate(HEFFTE_PROJECT) + # fixup git hash to show "(unknown)" to avoid compilation failures. It cannot derive the HeFFTe hash anyway. + file(READ ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h HEFFTE_CFG_FILE_TEXT) + string(REPLACE "@Heffte_GIT_HASH@" "(unknown)" HEFFTE_CFG_FILE_TEXT "${HEFFTE_CFG_FILE_TEXT}") + file(WRITE ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h "${HEFFTE_CFG_FILE_TEXT}") add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR}) - set_target_properties(lmp PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - set_target_properties(lammps PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") add_library(Heffte::Heffte INTERFACE IMPORTED GLOBAL) target_link_libraries(Heffte::Heffte INTERFACE Heffte) + if(BUILD_SHARED_LIBS_WAS_ON) + set(BUILD_SHARED_LIBS ON) + endif() endif() - target_compile_definitions(lammps PRIVATE -DFFT_HEFFTE "-DFFT_HEFFTE_${FFT_HEFFTE_BACKEND}") target_link_libraries(lammps PRIVATE Heffte::Heffte) endif() diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 3362866184..10c57ee449 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -34,7 +34,15 @@ // set strings for library info output -#if defined(FFT_FFTW3) +#if defined(FFT_HEFFTE) +#if defined(FFT_HEFFTE_FFTW) +#define LMP_FFT_LIB "HeFFTe(FFTW3)" +#elif defined(FFT_HEFFTE_MKL) +#define LMP_FFT_LIB "HeFFTe(MKL)" +#else +#define LMP_FFT_LIB "HeFFTe(native)" +#endif +#elif defined(FFT_FFTW3) #define LMP_FFT_LIB "FFTW3" #elif defined(FFT_MKL) #define LMP_FFT_LIB "MKL FFT" @@ -42,14 +50,6 @@ #define LMP_FFT_LIB "cuFFT" #elif defined(FFT_HIPFFT) #define LMP_FFT_LIB "hipFFT" -#elif defined(FFT_HEFFT) -#if defined(FFT_HEFFTE_FFTW) -#define LMP_FFT_LIB "HeFFTe (FFTW3)" -#elif defined(FFT_HEFFTE_MKL) -#define LMP_FFT_LIB "HeFFTe (MKL)" -#else -#define LMP_FFT_LIB "HeFFTe (native)" -#endif #else #define LMP_FFT_LIB "KISS FFT" #endif From 5599d1843af6c0f98f035640b0fd3b2d3ed511bc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 Jan 2024 19:56:36 -0500 Subject: [PATCH 53/89] update syntax --- unittest/formats/test_atom_styles.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/unittest/formats/test_atom_styles.cpp b/unittest/formats/test_atom_styles.cpp index 0a36ad8c0d..39e93b6edf 100644 --- a/unittest/formats/test_atom_styles.cpp +++ b/unittest/formats/test_atom_styles.cpp @@ -632,7 +632,7 @@ TEST_F(AtomStyleTest, atomic) ASSERT_EQ(lmp->atom->map_user, Atom::MAP_HASH); ASSERT_EQ(lmp->atom->map_tag_max, 3); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 2); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -846,7 +846,7 @@ TEST_F(AtomStyleTest, charge) ASSERT_EQ(lmp->atom->mass_setflag[2], 1); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); command("change_box all triclinic"); command("replicate 2 2 2 bbox"); END_HIDE_OUTPUT(); @@ -1004,7 +1004,7 @@ TEST_F(AtomStyleTest, sphere) ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2"); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("sphere")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -1310,7 +1310,7 @@ TEST_F(AtomStyleTest, ellipsoid) EXPECT_NEAR(bonus[3].quat[3], 0.25056280708573159, EPSILON); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nellipsoids, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -1600,7 +1600,7 @@ TEST_F(AtomStyleTest, line) EXPECT_NEAR(bonus[3].theta, MathConst::MY_PI / 6.0, EPSILON); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nlines, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -2008,7 +2008,7 @@ TEST_F(AtomStyleTest, tri) EXPECT_NEAR(bonus[3].c3[2], -0.15731490073748589, EPSILON); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->ntris, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -2583,7 +2583,7 @@ TEST_F(AtomStyleTest, body_nparticle) ASSERT_NE(bonus[3].dvalue, nullptr); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nbodies, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -2968,7 +2968,7 @@ TEST_F(AtomStyleTest, template) ASSERT_EQ(molatom[GETIDX(24)], -1); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 16); @@ -3396,7 +3396,7 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_EQ(molatom[GETIDX(24)], -1); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 16); @@ -3742,7 +3742,7 @@ TEST_F(AtomStyleTest, bond) BEGIN_HIDE_OUTPUT(); command("delete_bonds all bond 2"); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -4119,7 +4119,7 @@ TEST_F(AtomStyleTest, angle) BEGIN_HIDE_OUTPUT(); command("delete_bonds all angle 2"); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -4479,7 +4479,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) EXPECT_NEAR(bonus[3].quat[3], 0.25056280708573159, EPSILON); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nellipsoids, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); @@ -4775,7 +4775,7 @@ TEST_F(AtomStyleTest, property_atom) EXPECT_NEAR(three[GETIDX(3)], 0.5, EPSILON); BEGIN_HIDE_OUTPUT(); - command("reset_atom_ids"); + command("reset_atoms id"); command("change_box all triclinic"); END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 2); From 17f869bf5e78458385d6eacf180e2f0f57b50f8a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 Jan 2024 20:20:35 -0500 Subject: [PATCH 54/89] fix issues with reading and writing data files for systems without atom IDs --- src/atom_vec.cpp | 2 +- src/read_data.cpp | 17 ++++- src/write_data.cpp | 11 ++- unittest/formats/test_atom_styles.cpp | 106 ++++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index bfda951823..8ea1d145eb 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -1714,7 +1714,7 @@ void AtomVec::data_atom(double *coord, imageint imagetmp, const std::vectortag_enable && (tag[nlocal] <= 0)) || (!atom->tag_enable && (tag[nlocal] != 0))) error->one(FLERR, "Invalid atom ID {} in line {} of Atoms section of data file", tag[nlocal], nlocal + 1); diff --git a/src/read_data.cpp b/src/read_data.cpp index dcc0f7b46c..657369d5d0 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1465,8 +1465,23 @@ void ReadData::atoms() void ReadData::velocities() { + bigint nread = 0; int nchunk, eof; + // cannot map velocities to atoms without atom IDs + + if (!atom->tag_enable) { + if (me == 0) utils::logmesg(lmp, " skipping velocities without atom IDs ...\n"); + + while (nread < natoms) { + nchunk = MIN(natoms - nread, CHUNK); + eof = utils::read_lines_from_file(fp, nchunk, MAXLINE, buffer, me, world); + if (eof) error->all(FLERR, "Unexpected end of data file"); + nread += nchunk; + } + return; + } + if (me == 0) utils::logmesg(lmp, " reading velocities ...\n"); int mapflag = 0; @@ -1476,8 +1491,6 @@ void ReadData::velocities() atom->map_set(); } - bigint nread = 0; - while (nread < natoms) { nchunk = MIN(natoms - nread, CHUNK); eof = utils::read_lines_from_file(fp, nchunk, MAXLINE, buffer, me, world); diff --git a/src/write_data.cpp b/src/write_data.cpp index dd5b056ae8..5454edab44 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -191,8 +191,7 @@ void WriteData::write(const std::string &file) if (me == 0) { fp = fopen(file.c_str(),"w"); if (fp == nullptr) - error->one(FLERR,"Cannot open data file {}: {}", - file, utils::getsyserror()); + error->one(FLERR,"Cannot open data file {}: {}", file, utils::getsyserror()); } // proc 0 writes header, ntype-length arrays, force fields @@ -206,9 +205,15 @@ void WriteData::write(const std::string &file) } // per atom info in Atoms and Velocities sections + // must not write velocities without tags since we cannot read them back if (natoms) atoms(); - if (natoms) velocities(); + if (atom->tag_enable) { + if (natoms) velocities(); + } else { + if (me == 0) + error->warning(FLERR, "Not writing Velocities section of data file without atom IDs"); + } // molecular topology info if defined // do not write molecular topology for atom_style template diff --git a/unittest/formats/test_atom_styles.cpp b/unittest/formats/test_atom_styles.cpp index 39e93b6edf..1da2dfa33c 100644 --- a/unittest/formats/test_atom_styles.cpp +++ b/unittest/formats/test_atom_styles.cpp @@ -693,6 +693,112 @@ TEST_F(AtomStyleTest, atomic) EXPECT_NEAR(x[GETIDX(16)][2], 7.9, EPSILON); } +TEST_F(AtomStyleTest, no_tags) +{ + BEGIN_HIDE_OUTPUT(); + command("atom_modify id no"); + command("create_box 2 box"); + command("create_atoms 1 single -2.0 2.0 0.1"); + command("create_atoms 1 single -2.0 -2.0 -0.1"); + command("create_atoms 2 single 2.0 2.0 -0.1"); + command("create_atoms 2 single 2.0 -2.0 0.1"); + command("mass 1 4.0"); + command("mass 2 2.4"); + command("pair_coeff * *"); + END_HIDE_OUTPUT(); + + ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); + ASSERT_NE(lmp->atom->avec, nullptr); + ASSERT_EQ(lmp->atom->natoms, 4); + ASSERT_EQ(lmp->atom->nlocal, 4); + ASSERT_EQ(lmp->atom->nghost, 0); + ASSERT_NE(lmp->atom->nmax, -1); + ASSERT_EQ(lmp->atom->tag_enable, 0); + ASSERT_EQ(lmp->atom->molecular, Atom::ATOMIC); + ASSERT_EQ(lmp->atom->ntypes, 2); + + ASSERT_NE(lmp->atom->mass, nullptr); + ASSERT_NE(lmp->atom->mass_setflag, nullptr); + ASSERT_EQ(lmp->atom->sametag, nullptr); + ASSERT_EQ(lmp->atom->map_style, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_user, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_tag_max, -1); + ASSERT_EQ(lmp->atom->tag_consecutive(), 0); + + BEGIN_HIDE_OUTPUT(); + command("pair_coeff * *"); + command("write_data test_atom_styles.data nocoeff"); + command("clear"); + command("atom_style atomic"); + command("pair_style zero 4.0"); + command("atom_modify id no"); + command("units real"); + command("read_data test_atom_styles.data"); + END_HIDE_OUTPUT(); + ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); + ASSERT_NE(lmp->atom->avec, nullptr); + ASSERT_EQ(lmp->atom->natoms, 4); + ASSERT_EQ(lmp->atom->nlocal, 4); + ASSERT_EQ(lmp->atom->nghost, 0); + ASSERT_NE(lmp->atom->nmax, -1); + ASSERT_EQ(lmp->atom->tag_enable, 0); + ASSERT_EQ(lmp->atom->molecular, Atom::ATOMIC); + ASSERT_EQ(lmp->atom->ntypes, 2); + + ASSERT_NEAR(lmp->atom->mass[1], 4.0, EPSILON); + ASSERT_NEAR(lmp->atom->mass[2], 2.4, EPSILON); + ASSERT_EQ(lmp->atom->mass_setflag[1], 1); + ASSERT_EQ(lmp->atom->mass_setflag[2], 1); + ASSERT_EQ(lmp->atom->map_style, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_user, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_tag_max, -1); + ASSERT_EQ(lmp->atom->tag_consecutive(), 0); + + BEGIN_HIDE_OUTPUT(); + command("pair_coeff * *"); + command("write_restart test_atom_styles.restart"); + command("clear"); + command("read_restart test_atom_styles.restart"); + END_HIDE_OUTPUT(); + ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); + ASSERT_NE(lmp->atom->avec, nullptr); + ASSERT_EQ(lmp->atom->natoms, 4); + ASSERT_EQ(lmp->atom->nlocal, 4); + ASSERT_EQ(lmp->atom->nghost, 0); + ASSERT_NE(lmp->atom->nmax, -1); + ASSERT_EQ(lmp->atom->tag_enable, 0); + ASSERT_EQ(lmp->atom->molecular, Atom::ATOMIC); + ASSERT_EQ(lmp->atom->ntypes, 2); + ASSERT_EQ(lmp->atom->tag_consecutive(), 0); + + ASSERT_NEAR(lmp->atom->mass[1], 4.0, EPSILON); + ASSERT_NEAR(lmp->atom->mass[2], 2.4, EPSILON); + ASSERT_EQ(lmp->atom->mass_setflag[1], 1); + ASSERT_EQ(lmp->atom->mass_setflag[2], 1); + ASSERT_EQ(lmp->atom->map_style, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_user, Atom::MAP_NONE); + ASSERT_EQ(lmp->atom->map_tag_max, -1); + + BEGIN_HIDE_OUTPUT(); + command("comm_style tiled"); + command("change_box all triclinic"); + command("replicate 2 2 2"); + END_HIDE_OUTPUT(); + + ASSERT_EQ(lmp->atom->natoms, 32); + ASSERT_EQ(lmp->atom->nlocal, 32); + ASSERT_EQ(lmp->atom->nghost, 0); + ASSERT_NE(lmp->atom->nmax, -1); + ASSERT_EQ(lmp->atom->tag_enable, 0); + ASSERT_EQ(lmp->atom->molecular, Atom::ATOMIC); + ASSERT_EQ(lmp->atom->ntypes, 2); + ASSERT_EQ(lmp->atom->tag_consecutive(), 0); + ASSERT_EQ(lmp->atom->map_tag_max, -1); + + TEST_FAILURE(".*ERROR: Cannot use reset_atoms id unless atoms have IDs.*", + command("reset_atoms id");); +} + TEST_F(AtomStyleTest, charge) { BEGIN_HIDE_OUTPUT(); From adc79272c99af4940d6e2f7256b880f847ee7b20 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 00:12:04 -0500 Subject: [PATCH 55/89] update log files for current code --- examples/ASPHERE/dimer/in.dimer | 118 +-- examples/ASPHERE/dimer/in.dimer.mp | 118 +-- examples/ASPHERE/dimer/log.1Feb14.dimer.g++.8 | 286 ------ .../ASPHERE/dimer/log.1Feb14.dimer.mp.g++.8 | 237 ----- examples/ASPHERE/dimer/log.1Feb24.dimer.g++.1 | 312 +++++++ examples/ASPHERE/dimer/log.1Feb24.dimer.g++.4 | 312 +++++++ .../ASPHERE/dimer/log.1Feb24.dimer.mp.g++.1 | 328 +++++++ .../ASPHERE/dimer/log.1Feb24.dimer.mp.g++.4 | 328 +++++++ examples/ASPHERE/ellipsoid/in.ellipsoid | 2 +- examples/ASPHERE/ellipsoid/in.ellipsoid.mp | 2 +- .../ellipsoid/log.1Feb14.ellipsoid.g++.8 | 190 ---- .../ellipsoid/log.1Feb14.ellipsoid.mp.g++.8 | 247 ------ .../ellipsoid/log.1Feb24.ellipsoid.g++.1 | 346 ++++++++ .../ellipsoid/log.1Feb24.ellipsoid.g++.4 | 346 ++++++++ .../ellipsoid/log.1Feb24.ellipsoid.mp.g++.1 | 347 ++++++++ .../ellipsoid/log.1Feb24.ellipsoid.mp.g++.4 | 347 ++++++++ examples/ASPHERE/line/in.line | 60 +- examples/ASPHERE/line/in.line.srd | 122 +-- examples/ASPHERE/poly/in.poly | 138 +-- examples/ASPHERE/poly/in.poly.mp | 142 +-- examples/ASPHERE/poly/log.1Feb14.poly.g++.8 | 288 ------- .../ASPHERE/poly/log.1Feb14.poly.mp.g++.8 | 239 ------ examples/ASPHERE/poly/log.1Feb24.poly.g++.1 | 317 +++++++ examples/ASPHERE/poly/log.1Feb24.poly.g++.4 | 317 +++++++ .../ASPHERE/poly/log.1Feb24.poly.mp.g++.1 | 318 +++++++ .../ASPHERE/poly/log.1Feb24.poly.mp.g++.4 | 318 +++++++ examples/ASPHERE/star/in.star | 126 +-- examples/ASPHERE/star/in.star.mp | 128 +-- examples/ASPHERE/star/log.1Feb14.star.g++.8 | 290 ------- .../ASPHERE/star/log.1Feb14.star.mp.g++.8 | 291 ------- examples/ASPHERE/star/log.1Feb24.star.g++.1 | 321 +++++++ examples/ASPHERE/star/log.1Feb24.star.g++.4 | 321 +++++++ .../ASPHERE/star/log.1Feb24.star.mp.g++.1 | 322 +++++++ .../ASPHERE/star/log.1Feb24.star.mp.g++.4 | 322 +++++++ examples/ASPHERE/tri/in.tri.srd | 122 +-- .../ASPHERE/tri/log.15Aug23.tri.srd.g++.8 | 812 ------------------ examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.1 | 343 ++++++++ examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.4 | 343 ++++++++ 38 files changed, 6447 insertions(+), 3419 deletions(-) delete mode 100644 examples/ASPHERE/dimer/log.1Feb14.dimer.g++.8 delete mode 100644 examples/ASPHERE/dimer/log.1Feb14.dimer.mp.g++.8 create mode 100644 examples/ASPHERE/dimer/log.1Feb24.dimer.g++.1 create mode 100644 examples/ASPHERE/dimer/log.1Feb24.dimer.g++.4 create mode 100644 examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.1 create mode 100644 examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.4 delete mode 100644 examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.g++.8 delete mode 100644 examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.mp.g++.8 create mode 100644 examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.1 create mode 100644 examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.4 create mode 100644 examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.1 create mode 100644 examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.4 delete mode 100644 examples/ASPHERE/poly/log.1Feb14.poly.g++.8 delete mode 100644 examples/ASPHERE/poly/log.1Feb14.poly.mp.g++.8 create mode 100644 examples/ASPHERE/poly/log.1Feb24.poly.g++.1 create mode 100644 examples/ASPHERE/poly/log.1Feb24.poly.g++.4 create mode 100644 examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.1 create mode 100644 examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.4 delete mode 100644 examples/ASPHERE/star/log.1Feb14.star.g++.8 delete mode 100644 examples/ASPHERE/star/log.1Feb14.star.mp.g++.8 create mode 100644 examples/ASPHERE/star/log.1Feb24.star.g++.1 create mode 100644 examples/ASPHERE/star/log.1Feb24.star.g++.4 create mode 100644 examples/ASPHERE/star/log.1Feb24.star.mp.g++.1 create mode 100644 examples/ASPHERE/star/log.1Feb24.star.mp.g++.4 delete mode 100644 examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8 create mode 100644 examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.1 create mode 100644 examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.4 diff --git a/examples/ASPHERE/dimer/in.dimer b/examples/ASPHERE/dimer/in.dimer index 224db9937d..468ebffcdc 100644 --- a/examples/ASPHERE/dimer/in.dimer +++ b/examples/ASPHERE/dimer/in.dimer @@ -1,104 +1,104 @@ # SRD diffusion demo - dimer particles -units lj -atom_style sphere -atom_modify map array first big -dimension 2 +units lj +atom_style sphere +atom_modify map array first big +dimension 2 # read in clusters of rigid bodies -fix molprop all property/atom mol -read_data data.dimer fix molprop NULL Molecules +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules + +set type 1 mass 1.0 +group big type 1 +velocity big create 1.44 87287 loop geom -set type 1 mass 1.0 -group big type 1 -velocity big create 1.44 87287 loop geom - # equilibrate big particles -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 variable prefactor equal ramp(0,60) fix soft all adapt 1 pair soft a * * v_prefactor -fix 1 big rigid molecule -fix 2 all enforce2d +fix 1 big rigid molecule +fix 2 all enforce2d -#dump 1 all atom 10 dump.dimer.equil +#dump 1 all atom 10 dump.dimer.equil -thermo 100 -run 1000 +thermo 100 +run 1000 -#undump 1 +#undump 1 unfix soft -unfix 1 -unfix 2 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -create_atoms 2 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +create_atoms 2 region plane -set type 2 mass 0.1 -group small type 2 -velocity small create 1.0 593849 loop geom +set type 2 mass 0.1 +group small type 2 +velocity small create 1.0 593849 loop geom # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 -delete_atoms overlap 0.5 small big +delete_atoms overlap 0.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid molecule -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 collision slip inside ignore overlap yes -fix 3 all enforce2d +fix 1 big rigid molecule +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.dimer +#dump 1 all atom 1000 dump.dimer -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 -run 100000 +run 10000 diff --git a/examples/ASPHERE/dimer/in.dimer.mp b/examples/ASPHERE/dimer/in.dimer.mp index a637acaf87..1b54cc5eac 100644 --- a/examples/ASPHERE/dimer/in.dimer.mp +++ b/examples/ASPHERE/dimer/in.dimer.mp @@ -1,105 +1,105 @@ # SRD viscosity demo - dimer particles -units lj -atom_style sphere -atom_modify map array first big -dimension 2 +units lj +atom_style sphere +atom_modify map array first big +dimension 2 # read in clusters of rigid bodies -fix molprop all property/atom mol -read_data data.dimer fix molprop NULL Molecules +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules -set type 1 mass 1.0 -group big type 1 -velocity big create 1.44 87287 loop geom +set type 1 mass 1.0 +group big type 1 +velocity big create 1.44 87287 loop geom # equilibrate big particles -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 variable prefactor equal ramp(0,60) fix soft all adapt 1 pair soft a * * v_prefactor -fix 1 big rigid molecule -fix 2 all enforce2d +fix 1 big rigid molecule +fix 2 all enforce2d -#dump 1 all atom 10 dump.dimer.equil +#dump 1 all atom 10 dump.dimer.equil -thermo 100 -run 1000 +thermo 100 +run 1000 -#undump 1 +#undump 1 unfix soft -unfix 1 -unfix 2 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -create_atoms 2 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +create_atoms 2 region plane -set type 2 mass 0.1 -group small type 2 -velocity small create 1.0 593849 loop geom +set type 2 mass 0.1 +group small type 2 +velocity small create 1.0 593849 loop geom # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 -delete_atoms overlap 0.5 small big +delete_atoms overlap 0.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid molecule -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 collision slip inside ignore overlap yes -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d +fix 1 big rigid molecule +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 500 dump.dimer.mp +#dump 1 all atom 500 dump.dimer.mp -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 -run 50000 +run 25000 diff --git a/examples/ASPHERE/dimer/log.1Feb14.dimer.g++.8 b/examples/ASPHERE/dimer/log.1Feb14.dimer.g++.8 deleted file mode 100644 index e6cf1630da..0000000000 --- a/examples/ASPHERE/dimer/log.1Feb14.dimer.g++.8 +++ /dev/null @@ -1,286 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD diffusion demo - dimer particles - -units lj -atom_style sphere -atom_modify map array first big -dimension 2 - -# read in clusters of rigid bodies - -fix molprop all property/atom mol -read_data data.dimer fix molprop NULL Molecules - orthogonal box = (-9.34165 -9.34165 -0.5) to (9.34165 9.34165 0.5) - 4 by 2 by 1 MPI processor grid - reading atoms ... - 200 atoms - -set type 1 mass 1.0 - 200 settings made for mass -group big type 1 -200 atoms in group big -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 - -variable prefactor equal ramp(0,60) -fix soft all adapt 1 pair soft a * * v_prefactor - -fix 1 big rigid molecule -100 rigid bodies with 200 atoms -fix 2 all enforce2d - -#dump 1 all atom 10 dump.dimer.equil - -thermo 100 -run 1000 -Memory usage per processor = 3.1029 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 3.4028231 0 0 0.83369167 -0.55065517 - 100 9.5167872 2.392105 0 4.7237178 2.8319556 - 200 13.564465 3.0352634 0 6.3585572 3.6388732 - 300 13.133051 4.3835112 0 7.6011086 4.060051 - 400 14.584346 5.5141254 0 9.0872901 4.4231056 - 500 15.331515 6.6554832 0 10.411704 4.847642 - 600 16.953755 7.4794317 0 11.633102 5.2020696 - 700 16.503256 8.8572339 0 12.900532 5.6694613 - 800 17.006131 9.877343 0 14.043845 5.5483363 - 900 17.305927 11.081594 0 15.321546 6.2908201 - 1000 18.122491 12.126462 0 16.566472 5.7536055 -Loop time of 0.185949 on 8 procs for 1000 steps with 200 atoms - -Pair time (%) = 0.00187448 (1.00806) -Neigh time (%) = 0.000561714 (0.30208) -Comm time (%) = 0.0652371 (35.0833) -Outpt time (%) = 0.00209856 (1.12857) -Other time (%) = 0.116177 (62.4779) - -Nlocal: 25 ave 30 max 20 min -Histogram: 1 0 1 1 0 0 3 1 0 1 -Nghost: 28.375 ave 36 max 22 min -Histogram: 1 0 1 2 1 0 2 0 0 1 -Neighs: 33.125 ave 45 max 22 min -Histogram: 1 0 2 1 0 1 1 0 1 1 - -Total # of neighbors = 265 -Ave neighs/atom = 1.325 -Neighbor list builds = 99 -Dangerous builds = 96 - -#undump 1 -unfix soft -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -Lattice spacing in x,y,z = 0.108465 0.108465 0.108465 -create_atoms 2 region plane -Created 29929 atoms - -set type 2 mass 0.1 - 29929 settings made for mass -group small type 2 -29929 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 - -delete_atoms overlap 0.5 small big -Deleted 12759 atoms, new total = 17370 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big rigid molecule -100 rigid bodies with 200 atoms -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes -fix 3 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 1000 dump.dimer - -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 100000 -SRD info: - SRD/big particles = 17170 200 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 75 75 1 - SRD grid size: request, actual (xyz) = 0.25, 0.249111 0.249111 1 - SRD per actual grid cell = 5.5499 - SRD viscosity = 0.235551 - big/SRD mass density ratio = 0.142367 - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.20347 7.72323 - ave/max big velocity = 2.64047 6.60911 -Memory usage per processor = 7.0395 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 6.9744766 0 0.30175295 21.011259 26.207244 2.7219331 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 1.1941672 3369 0.24718395 20.578272 21.467926 9.8944086 13658 56 56 2 664 40320 5625 3369 1.1358997 0 4 0 - 2000 1.3247909 3390 0.24717547 20.48022 21.467189 6.5341926 13389 48 48 3 1988 40320 5625 3390 1.1814916 0 144 0 - 3000 1.386904 3355 0.24769415 20.478993 21.512237 6.1207029 13507 45 45 0 2871 40320 5625 3355 1.1657697 0 144 0 - 4000 1.1567347 3376 0.24573733 20.48052 21.342287 3.5540965 13475 46 46 0 3731 40320 5625 3376 1.1485984 0 144 0 - 5000 1.2565155 3376 0.24620928 20.447172 21.383276 2.5808161 13267 55 55 0 4559 40320 5625 3376 1.1778096 0 144 0 - 6000 1.1489985 3375 0.24520477 20.440031 21.296035 7.8204262 13362 59 59 0 5354 40320 5625 3375 1.1530517 0 144 0 - 7000 1.1608248 3399 0.24587989 20.489854 21.354669 7.9622779 13333 59 59 2 6254 40320 5625 3399 1.1809325 0 144 0 - 8000 1.1749441 3374 0.24700359 20.576929 21.452262 6.7498405 13495 64 64 0 7134 40320 5625 3374 1.1445035 0 144 0 - 9000 1.1285085 3405 0.24536183 20.468936 21.309675 5.8959937 13333 60 60 0 8008 40320 5625 3405 1.162836 0 144 0 - 10000 1.1462675 3425 0.24564758 20.480523 21.334492 7.0047543 13487 45 45 0 8967 40320 5625 3425 1.1881074 0 144 0 - 11000 1.2854766 3388 0.246088 20.415062 21.372742 7.8508136 13491 60 60 1 9833 40320 5625 3388 1.1698514 0 144 0 - 12000 1.2926536 3360 0.24602616 20.404345 21.367372 7.9286141 13142 64 64 1 11029 40320 5625 3360 1.1658039 0 161 0 - 13000 1.2289767 3412 0.24595657 20.44574 21.361328 2.2809592 13162 56 56 1 12018 40320 5625 3412 1.1665531 0 161 0 - 14000 1.3518235 3380 0.24629055 20.383226 21.390334 8.0062608 13310 59 59 7 13146 40320 5625 3380 1.1733296 0 161 0 - 15000 1.2971143 3355 0.24671134 20.46053 21.42688 9.7871945 12967 60 60 3 14084 40320 5625 3355 1.1703643 0 161 0 - 16000 1.4160948 3384 0.2478594 20.471598 21.526589 7.3141215 13123 56 56 1 14929 40320 5625 3384 1.1666782 0 161 0 - 17000 1.3172038 3391 0.247377 20.503375 21.484692 6.1541908 12957 54 54 0 15778 40320 5625 3391 1.1639931 0 161 0 - 18000 0.98748293 3369 0.2443499 20.486114 21.221789 4.0981146 13355 50 50 1 17031 40320 5625 3369 1.2083414 0 192 0 - 19000 1.4619261 3367 0.24867817 20.508564 21.597699 11.68547 13519 58 58 0 18334 40320 5625 3367 1.1667505 0 192 0 - 20000 1.44087 3391 0.24747923 20.420123 21.493571 4.0409936 13594 67 67 0 19303 40320 5625 3391 1.1869387 0 192 0 - 21000 1.1155365 3377 0.24474418 20.424957 21.256032 8.4985692 13423 52 52 0 20245 40320 5625 3377 1.1726608 0 192 0 - 22000 1.2045785 3382 0.24466159 20.351448 21.248859 7.0518674 13271 62 62 0 21128 40320 5625 3382 1.1658557 0 192 0 - 23000 1.2634616 3378 0.24571326 20.398918 21.340197 6.8382109 13246 61 61 1 22067 40320 5625 3378 1.170196 0 192 0 - 24000 1.365723 3375 0.24749053 20.477089 21.494552 5.9584152 13017 46 46 1 23017 40320 5625 3375 1.1841192 0 192 0 - 25000 1.1421045 3367 0.24497142 20.4249 21.275768 10.381661 13049 66 66 1 23907 40320 5625 3367 1.1856767 0 192 0 - 26000 1.4008939 3340 0.24678624 20.389719 21.433385 7.3799658 12971 53 53 5 24850 40320 5625 3340 1.1713233 0 192 0 - 27000 1.1835022 3379 0.24522732 20.416284 21.297993 7.2251705 12717 46 46 1 25723 40320 5625 3379 1.1798333 0 192 0 - 28000 1.0496668 3398 0.24461816 20.463086 21.245087 6.5485338 13385 60 60 0 26990 40320 5625 3398 1.1765205 0 192 0 - 29000 1.1779927 3453 0.24501083 20.401586 21.27919 4.8540048 13157 77 77 2 28023 40320 5625 3453 1.1741595 0 192 0 - 30000 1.2277637 3375 0.24554215 20.410652 21.325336 10.087705 12939 72 72 1 28855 40320 5625 3375 1.1627414 0 192 0 - 31000 1.1575066 3397 0.24504213 20.419566 21.281909 6.4849648 12977 66 66 0 29745 40320 5625 3397 1.1575018 0 192 0 - 32000 1.1752733 3381 0.2451073 20.41199 21.287569 7.2784509 12971 48 48 0 30561 40320 5625 3381 1.1790395 0 192 0 - 33000 1.1743895 3370 0.24485514 20.390748 21.265669 9.084299 12810 64 64 0 31342 40320 5625 3370 1.1429061 0 192 0 - 34000 1.2975876 3377 0.24608262 20.405573 21.372276 10.624304 12610 60 60 1 32140 40320 5625 3377 1.1685718 0 192 0 - 35000 1.7701252 3356 0.2497356 20.370794 21.689537 7.107766 12983 45 45 8 33862 40320 5625 3356 1.1720964 0 242 0 - 36000 1.2711521 3393 0.24675748 20.483878 21.430887 8.7087273 13175 60 60 0 34920 40320 5625 3393 1.1796212 0 242 0 - 37000 1.1140649 3373 0.24450996 20.405711 21.23569 8.0025138 12964 50 50 1 35770 40320 5625 3373 1.1772234 0 242 0 - 38000 1.3128798 3379 0.24583813 20.372946 21.351041 5.0554655 12939 56 56 1 36679 40320 5625 3379 1.1702949 0 242 0 - 39000 1.2093703 3365 0.24536578 20.409037 21.310018 5.6243735 12873 62 62 3 37511 40320 5625 3365 1.1751064 0 242 0 - 40000 1.2095402 3365 0.24485106 20.364207 21.265315 3.9565189 12876 54 54 1 38503 40320 5625 3365 1.1637516 0 242 0 - 41000 1.1146238 3350 0.24476111 20.427107 21.257502 6.5033046 12656 53 53 0 39313 40320 5625 3350 1.1553197 0 242 0 - 42000 1.2302245 3370 0.24452048 20.320087 21.236604 10.7363 12676 52 52 1 40108 40320 5625 3370 1.1492163 0 242 0 - 43000 1.2749689 3404 0.24511103 20.338041 21.287893 9.18604 13057 72 72 1 41014 40320 5625 3404 1.1572511 0 242 0 - 44000 1.1989211 3385 0.24450633 20.342179 21.235375 7.6714085 13086 52 53 1 41840 40320 5625 3385 1.1530041 0 242 0 - 45000 1.6465972 3370 0.249994 20.485264 21.711979 7.4908607 12894 58 58 7 43545 40320 5625 3370 1.1978571 0 361 0 - 46000 1.3082316 3412 0.24665637 20.447473 21.422106 8.9900563 13136 53 53 4 44510 40320 5625 3412 1.1686573 0 361 0 - 47000 1.2163258 3355 0.24493724 20.366636 21.272799 6.9309438 13020 56 56 0 45414 40320 5625 3355 1.1620943 0 361 0 - 48000 1.349966 3362 0.24683156 20.431596 21.437321 8.8527164 13044 64 64 1 46260 40320 5625 3362 1.1683452 0 361 0 - 49000 1.3903769 3347 0.24726403 20.439051 21.474881 5.9250552 13103 58 59 2 49229 40320 5625 3347 1.1924538 0 578 0 - 50000 1.2737918 3349 0.24563843 20.384723 21.333698 7.2419874 12892 41 41 1 50225 40320 5625 3349 1.1803233 0 578 0 - 51000 1.2229799 3355 0.24504936 20.371417 21.282537 8.5556146 12912 63 63 0 51096 40320 5625 3355 1.1333843 0 578 0 - 52000 1.2326547 3386 0.24596384 20.443632 21.361959 6.1757404 12790 66 66 1 52114 40320 5625 3386 1.1685608 0 578 0 - 53000 1.3695441 3389 0.24696147 20.428294 21.448604 8.7464732 12997 60 60 1 53115 40320 5625 3389 1.1631228 0 578 0 - 54000 1.0711204 3400 0.24322154 20.325806 21.12379 8.7228921 13005 56 56 0 53913 40320 5625 3400 1.1250986 0 578 0 - 55000 1.3412565 3360 0.24617922 20.381429 21.380665 6.9489559 12960 46 46 0 55249 40320 5625 3360 1.176467 0 578 0 - 56000 1.3910761 3355 0.2467942 20.397725 21.434077 6.6762734 12966 65 65 2 56653 40320 5625 3355 1.1715559 0 578 0 - 57000 1.1177307 3388 0.24424738 20.380176 21.212885 5.5073089 13153 62 62 1 57550 40320 5625 3388 1.1576307 0 578 0 - 58000 1.3136279 3365 0.24661231 20.439627 21.418279 9.1390284 12799 52 52 1 58366 40320 5625 3365 1.159026 0 578 0 - 59000 1.2667621 3374 0.24556104 20.383238 21.326976 3.4246418 13127 54 54 1 59170 40320 5625 3374 1.1461442 0 578 0 - 60000 1.1903121 3326 0.24492127 20.384629 21.271412 6.9439977 13078 47 47 2 60105 40320 5625 3326 1.1665886 0 578 0 - 61000 1.209313 3362 0.2455341 20.423699 21.324637 9.1212002 13225 61 61 4 61358 40320 5625 3362 1.1725894 0 578 0 - 62000 1.1720074 3366 0.24476301 20.384522 21.257667 7.7592884 13187 53 54 2 62257 40320 5625 3366 1.1599665 0 578 0 - 63000 1.2155508 3386 0.24486685 20.361101 21.266686 5.7864126 13090 42 42 0 63137 40320 5625 3386 1.1724234 0 578 0 - 64000 1.1967326 3379 0.2451834 20.402613 21.294179 4.8815049 13033 48 48 4 64152 40320 5625 3379 1.1818756 0 578 0 - 65000 1.1732378 3386 0.24500733 20.404824 21.278887 11.381026 12998 59 59 0 65071 40320 5625 3386 1.1625543 0 578 0 - 66000 1.1960739 3385 0.24407516 20.306852 21.197927 12.17249 12994 61 61 0 65941 40320 5625 3385 1.1826516 0 578 0 - 67000 1.3468331 3366 0.24657491 20.41164 21.415031 7.8115623 12894 62 62 1 66788 40320 5625 3366 1.1750424 0 578 0 - 68000 1.0742924 3369 0.24347736 20.345661 21.146009 9.5240252 13065 68 68 2 67665 40320 5625 3369 1.1561575 0 578 0 - 69000 1.1411254 3380 0.2450544 20.432836 21.282975 8.0392218 13134 49 49 1 68471 40320 5625 3380 1.1405485 0 578 0 - 70000 1.1585312 3388 0.24435206 20.358871 21.221977 7.5303626 13113 59 59 0 69320 40320 5625 3388 1.1726416 0 578 0 - 71000 1.3418857 3382 0.24598802 20.364355 21.36406 9.2840877 13265 68 68 0 70522 40320 5625 3382 1.1696767 0 578 0 - 72000 1.1547857 3388 0.24328952 20.26938 21.129695 7.9643121 13270 50 50 1 71384 40320 5625 3388 1.1647353 0 578 0 - 73000 1.1114283 3385 0.24397276 20.36102 21.189034 13.168935 13110 62 62 0 72335 40320 5625 3385 1.1625358 0 578 0 - 74000 1.6120075 3370 0.25009739 20.520013 21.720959 12.065782 12902 51 51 9 73743 40320 5625 3370 1.1873738 0 578 0 - 75000 1.3271087 3353 0.24600453 20.376798 21.365493 7.5902315 13076 51 51 1 74746 40320 5625 3353 1.1706259 0 578 0 - 76000 1.1908626 3386 0.2451628 20.405197 21.292389 6.8084086 13124 58 58 1 75702 40320 5625 3386 1.1765809 0 578 0 - 77000 1.042536 3391 0.24320847 20.345966 21.122655 6.4883579 12846 57 57 0 76930 40320 5625 3391 1.1769829 0 578 0 - 78000 1.3791243 3355 0.24628683 20.362563 21.390011 9.2397346 12897 56 56 12 78068 40320 5625 3355 1.1905167 0 578 0 - 79000 1.2058397 3391 0.2453076 20.406614 21.304965 9.7949819 13020 51 51 1 79065 40320 5625 3391 1.1777257 0 578 0 - 80000 1.0634737 3383 0.24440921 20.434652 21.22694 7.5296946 12973 61 61 2 80029 40320 5625 3383 1.1648017 0 578 0 - 81000 1.3768966 3373 0.24730623 20.452758 21.478546 7.1508584 13297 56 56 1 81172 40320 5625 3373 1.1740603 0 578 0 - 82000 1.3348382 3375 0.24680945 20.440946 21.4354 9.3251946 12822 56 56 2 82447 40320 5625 3375 1.1573749 0 578 0 - 83000 1.2042501 3393 0.24484972 20.368032 21.265198 7.5283729 12990 51 51 0 83344 40320 5625 3393 1.1833162 0 578 0 - 84000 1.1985223 3405 0.24537841 20.418216 21.311115 7.848856 13189 60 60 0 84147 40320 5625 3405 1.173911 0 578 0 - 85000 1.1811593 3391 0.24418657 20.32764 21.207604 8.3169438 13303 51 51 0 85022 40320 5625 3391 1.1586027 0 578 0 - 86000 1.2595689 3385 0.24556774 20.389179 21.327558 8.3808674 12966 56 56 1 85962 40320 5625 3385 1.1617838 0 578 0 - 87000 1.1419322 3356 0.24399697 20.340397 21.191137 6.8911116 13166 63 63 0 86753 40320 5625 3356 1.1729274 0 578 0 - 88000 1.275219 3380 0.24586129 20.403015 21.353053 6.838563 12963 56 56 0 87729 40320 5625 3380 1.1511968 0 578 0 - 89000 1.2794858 3366 0.24507826 20.33183 21.285047 9.3370019 12889 64 64 1 88575 40320 5625 3366 1.1660311 0 578 0 - 90000 1.0549593 3402 0.24289618 20.309589 21.095533 4.9944605 13076 59 59 1 89560 40320 5625 3402 1.1744335 0 578 0 - 91000 1.214812 3402 0.24442304 20.323106 21.228141 7.5681019 13229 44 44 1 90440 40320 5625 3402 1.1696689 0 578 0 - 92000 1.2019714 3374 0.24469176 20.356011 21.25148 7.6728432 13331 64 64 2 91243 40320 5625 3374 1.1678246 0 578 0 - 93000 1.0964004 3364 0.24364709 20.343931 21.16075 5.9650235 13086 55 55 0 92088 40320 5625 3364 1.1570838 0 578 0 - 94000 1.1722133 3393 0.24332541 20.259513 21.132812 7.1743779 13206 66 66 0 92858 40320 5625 3393 1.154328 0 578 0 - 95000 1.2413711 3373 0.24549874 20.396744 21.321566 8.131371 12967 61 61 1 93789 40320 5625 3373 1.1635681 0 578 0 - 96000 1.1702409 3363 0.24528289 20.430989 21.302819 11.399295 12776 63 63 0 94571 40320 5625 3363 1.1367365 0 578 0 - 97000 1.0696537 3368 0.242673 20.279258 21.07615 8.537175 13054 55 55 0 95403 40320 5625 3368 1.1648141 0 578 0 - 98000 1.1635952 3369 0.24486659 20.399785 21.266664 8.6714443 12750 70 70 0 96296 40320 5625 3369 1.1686272 0 578 0 - 99000 1.1286255 3397 0.24343772 20.30174 21.142566 6.7153212 12810 44 45 1 97021 40320 5625 3397 1.137818 0 578 0 - 100000 1.2847818 3367 0.24509282 20.329149 21.286312 8.7486629 13260 64 64 0 97855 40320 5625 3367 1.1597138 0 578 0 -Loop time of 20.8136 on 8 procs for 100000 steps with 17370 atoms - -Pair time (%) = 0.322913 (1.55145) -Neigh time (%) = 1.11753 (5.36921) -Comm time (%) = 1.72335 (8.27991) -Outpt time (%) = 0.00594518 (0.0285638) -Other time (%) = 17.6439 (84.7709) - -Nlocal: 2171.25 ave 2428 max 1747 min -Histogram: 1 0 0 0 1 1 2 1 0 2 -Nghost: 61.25 ave 69 max 54 min -Histogram: 1 1 0 1 1 1 0 2 0 1 -Neighs: 175.625 ave 225 max 132 min -Histogram: 1 1 1 1 1 0 1 0 0 2 - -Total # of neighbors = 1405 -Ave neighs/atom = 0.0808866 -Neighbor list builds = 5156 -Dangerous builds = 1 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/dimer/log.1Feb14.dimer.mp.g++.8 b/examples/ASPHERE/dimer/log.1Feb14.dimer.mp.g++.8 deleted file mode 100644 index 78fce92b49..0000000000 --- a/examples/ASPHERE/dimer/log.1Feb14.dimer.mp.g++.8 +++ /dev/null @@ -1,237 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD viscosity demo - dimer particles - -units lj -atom_style sphere -atom_modify map array first big -dimension 2 - -# read in clusters of rigid bodies - -fix molprop all property/atom mol -read_data data.dimer fix molprop NULL Molecules - orthogonal box = (-9.34165 -9.34165 -0.5) to (9.34165 9.34165 0.5) - 4 by 2 by 1 MPI processor grid - reading atoms ... - 200 atoms - -set type 1 mass 1.0 - 200 settings made for mass -group big type 1 -200 atoms in group big -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 - -variable prefactor equal ramp(0,60) -fix soft all adapt 1 pair soft a * * v_prefactor - -fix 1 big rigid molecule -100 rigid bodies with 200 atoms -fix 2 all enforce2d - -#dump 1 all atom 10 dump.dimer.equil - -thermo 100 -run 1000 -Memory usage per processor = 3.1029 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 3.4028231 0 0 0.83369167 -0.55065517 - 100 9.5167872 2.392105 0 4.7237178 2.8319556 - 200 13.564465 3.0352634 0 6.3585572 3.6388732 - 300 13.133051 4.3835112 0 7.6011086 4.060051 - 400 14.584346 5.5141254 0 9.0872901 4.4231056 - 500 15.331515 6.6554832 0 10.411704 4.847642 - 600 16.953755 7.4794317 0 11.633102 5.2020696 - 700 16.503256 8.8572339 0 12.900532 5.6694613 - 800 17.006131 9.877343 0 14.043845 5.5483363 - 900 17.305927 11.081594 0 15.321546 6.2908201 - 1000 18.122491 12.126462 0 16.566472 5.7536055 -Loop time of 0.0603173 on 8 procs for 1000 steps with 200 atoms - -Pair time (%) = 0.00182396 (3.02395) -Neigh time (%) = 0.000557959 (0.92504) -Comm time (%) = 0.0127766 (21.1823) -Outpt time (%) = 0.000280827 (0.465583) -Other time (%) = 0.0448779 (74.4031) - -Nlocal: 25 ave 30 max 20 min -Histogram: 1 0 1 1 0 0 3 1 0 1 -Nghost: 28.375 ave 36 max 22 min -Histogram: 1 0 1 2 1 0 2 0 0 1 -Neighs: 33.125 ave 45 max 22 min -Histogram: 1 0 2 1 0 1 1 0 1 1 - -Total # of neighbors = 265 -Ave neighs/atom = 1.325 -Neighbor list builds = 99 -Dangerous builds = 96 - -#undump 1 -unfix soft -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -Lattice spacing in x,y,z = 0.108465 0.108465 0.108465 -create_atoms 2 region plane -Created 29929 atoms - -set type 2 mass 0.1 - 29929 settings made for mass -group small type 2 -29929 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 - -delete_atoms overlap 0.5 small big -Deleted 12759 atoms, new total = 17370 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big rigid molecule -100 rigid bodies with 200 atoms -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 500 dump.dimer.mp - -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 50000 -SRD info: - SRD/big particles = 17170 200 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 75 75 1 - SRD grid size: request, actual (xyz) = 0.25, 0.249111 0.249111 1 - SRD per actual grid cell = 5.5499 - SRD viscosity = 0.235551 - big/SRD mass density ratio = 0.142367 - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.20347 7.72323 - ave/max big velocity = 2.64047 6.60911 -Memory usage per processor = 7.0395 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 6.9744766 0 0.30175295 21.011259 26.207244 2.7219331 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 1.906187 3319 0.25279446 20.53509 21.955199 9.3471734 14560 77 77 9 6051 40320 5625 3319 1.2073941 0 1062 0 - 2000 1.6009081 3420 0.25060769 20.572601 21.765278 12.835365 13521 63 63 1 7515 40320 5625 3420 1.1621445 0 1062 0 - 3000 1.8288965 3342 0.25195284 20.519576 21.882104 7.1720562 13550 62 62 1 8561 40320 5625 3342 1.1411375 0 1062 0 - 4000 1.8940522 3383 0.25185767 20.462769 21.873838 7.3011842 13210 55 55 0 9536 40320 5625 3383 1.1541274 0 1062 0 - 5000 1.7848964 3377 0.25063675 20.438054 21.767801 5.7235852 13258 60 60 1 10628 40320 5625 3377 1.1401366 0 1062 0 - 6000 2.0436442 3393 0.2528503 20.437534 21.960048 4.3266887 13369 65 65 1 11693 40320 5625 3393 1.1363335 0 1062 0 - 7000 2.0248598 3377 0.25304247 20.468218 21.976738 9.1535003 13126 69 69 2 12819 40320 5625 3377 1.1556137 0 1062 0 - 8000 1.9627172 3397 0.25201977 20.425693 21.887917 7.9563872 13216 58 58 3 14113 40320 5625 3397 1.144738 0 1062 0 - 9000 2.4805409 3385 0.25688024 20.462046 22.310049 6.0178529 13031 42 42 1 15329 40320 5625 3385 1.1667813 0 1062 0 - 10000 2.534712 3377 0.25802283 20.520922 22.409283 5.8494568 12804 49 50 1 16835 40320 5625 3377 1.1559636 0 1062 0 - 11000 2.4295377 3368 0.25671703 20.485869 22.295874 7.0797587 13097 56 56 2 18180 40320 5625 3368 1.1634145 0 1062 0 - 12000 2.5699389 3377 0.25784825 20.479516 22.39412 10.440503 13263 63 63 5 19848 40320 5625 3377 1.1714081 0 1062 0 - 13000 2.5416625 3359 0.25893582 20.595038 22.488576 6.823793 12926 57 57 1 21307 40320 5625 3359 1.1478982 0 1062 0 - 14000 2.9400702 3353 0.26140738 20.512878 22.703231 10.592709 12848 67 67 0 22782 40320 5625 3353 1.1642018 0 1062 0 - 15000 2.7315042 3364 0.26050572 20.589951 22.624922 7.6633608 12640 49 49 0 24273 40320 5625 3364 1.1532394 0 1062 0 - 16000 2.7176527 3389 0.25840703 20.418 22.442651 8.0150175 13019 59 59 1 25970 40320 5625 3389 1.1555937 0 1062 0 - 17000 2.883266 3355 0.26040537 20.468173 22.616206 6.053208 12916 54 54 1 27532 40320 5625 3355 1.1363169 0 1062 0 - 18000 2.8072496 3369 0.26013039 20.500924 22.592325 5.7179969 12989 45 45 0 29011 40320 5625 3369 1.1341799 0 1062 0 - 19000 2.8007066 3372 0.2602809 20.51887 22.605396 8.9063895 12817 59 59 1 30504 40320 5625 3372 1.1253001 0 1062 0 - 20000 3.0147455 3352 0.26233709 20.537991 22.783977 10.01786 13099 63 63 2 32100 40320 5625 3352 1.1263738 0 1062 0 - 21000 2.5502874 3354 0.25762968 20.475174 22.375138 7.4525361 12917 55 55 3 33904 40320 5625 3354 1.1432482 0 1062 0 - 22000 2.5643661 3357 0.25754499 20.45733 22.367782 9.5567227 12893 58 58 0 35500 40320 5625 3357 1.1309581 0 1062 0 - 23000 2.8451307 3387 0.26090715 20.540164 22.659786 7.8308779 12735 65 65 2 37080 40320 5625 3387 1.1666359 0 1062 0 - 24000 2.6241046 3341 0.25916876 20.553849 22.508807 9.7905794 12815 54 54 1 38864 40320 5625 3341 1.1422596 0 1062 0 - 25000 2.6054468 3374 0.25897446 20.550874 22.491932 9.4099539 13094 59 59 4 40505 40320 5625 3374 1.1887482 0 1062 0 - 26000 3.1370949 3356 0.26301193 20.50545 22.842586 9.930938 12785 59 59 0 42126 40320 5625 3356 1.1539158 0 1062 0 - 27000 2.757373 3361 0.26029623 20.552484 22.606727 7.4336931 12687 59 59 2 43728 40320 5625 3361 1.1408006 0 1062 0 - 28000 2.9939441 3393 0.26250984 20.568491 22.79898 9.201853 12802 66 66 0 45174 40320 5625 3393 1.1429688 0 1062 0 - 29000 3.1611971 3376 0.26252235 20.444974 22.800066 8.2146139 13042 48 48 0 46696 40320 5625 3376 1.1370708 0 1062 0 - 30000 2.2624796 3374 0.25475303 20.439753 22.125301 9.3304907 13249 53 53 1 48164 40320 5625 3374 1.1062325 0 1062 0 - 31000 2.6864602 3393 0.2607928 20.648442 22.649855 7.6108593 13028 58 58 0 49556 40320 5625 3393 1.1154125 0 1062 0 - 32000 2.8404087 3377 0.26037369 20.497351 22.613455 6.9017135 13055 63 63 1 51004 40320 5625 3377 1.1320087 0 1062 0 - 33000 2.8467378 3365 0.26095982 20.543541 22.664361 7.194747 13306 58 58 0 52481 40320 5625 3365 1.1312548 0 1062 0 - 34000 3.0833296 3382 0.26259198 20.509033 22.806114 7.44833 12988 59 60 1 54049 40320 5625 3382 1.1447344 0 1062 0 - 35000 3.1068536 3382 0.26441995 20.650266 22.964872 9.3804156 13139 54 54 0 55749 40320 5625 3382 1.1272861 0 1062 0 - 36000 2.6998442 3369 0.25864735 20.452138 22.463522 6.3327985 13317 52 52 0 57348 40320 5625 3369 1.1312386 0 1062 0 - 37000 2.600171 3376 0.25882039 20.541424 22.478551 9.3909788 12841 57 57 0 58880 40320 5625 3376 1.1319429 0 1062 0 - 38000 2.3962821 3367 0.25728672 20.560122 22.345352 7.4364329 13039 66 66 0 60627 40320 5625 3367 1.1468141 0 1062 0 - 39000 2.8548804 3422 0.26044489 20.492753 22.619638 6.0832552 13249 50 50 0 62327 40320 5625 3422 1.1442726 0 1062 0 - 40000 2.7721124 3375 0.25927374 20.452701 22.517924 10.368128 13197 55 55 1 63903 40320 5625 3375 1.140807 0 1062 0 - 41000 3.0463159 3378 0.26123216 20.418508 22.688013 10.179554 13030 64 64 0 65629 40320 5625 3378 1.1277894 0 1062 0 - 42000 2.9625288 3388 0.26205988 20.552817 22.759901 8.8326646 12958 64 64 0 67242 40320 5625 3388 1.159201 0 1062 0 - 43000 2.7524867 3347 0.2592403 20.464417 22.51502 10.30221 12815 65 65 2 68734 40320 5625 3347 1.1444123 0 1062 0 - 44000 2.8779981 3354 0.26009923 20.44551 22.589618 12.127509 12743 67 67 3 70309 40320 5625 3354 1.1467915 0 1062 0 - 45000 2.7833999 3365 0.25968205 20.479753 22.553386 8.6942365 12909 46 47 0 71846 40320 5625 3365 1.1480348 0 1062 0 - 46000 2.6564678 3370 0.25935897 20.546258 22.525327 9.2618375 12923 61 61 1 73491 40320 5625 3370 1.1528284 0 1062 0 - 47000 2.821625 3414 0.25999655 20.47859 22.5807 7.5359036 12861 55 55 2 75201 40320 5625 3414 1.1395745 0 1062 0 - 48000 2.9301623 3351 0.26139433 20.519127 22.702098 9.5177842 13037 49 49 2 76819 40320 5625 3351 1.1472505 0 1062 0 - 49000 2.528824 3390 0.25834586 20.553364 22.437338 8.953785 13127 49 49 0 78450 40320 5625 3390 1.1495903 0 1062 0 - 50000 3.0054471 3375 0.261046 20.432787 22.671845 7.9749959 13089 56 56 2 80717 40320 5625 3375 1.1574724 0 1062 0 -Loop time of 10.5055 on 8 procs for 50000 steps with 17370 atoms - -Pair time (%) = 0.156617 (1.49081) -Neigh time (%) = 0.556925 (5.30126) -Comm time (%) = 0.902042 (8.58637) -Outpt time (%) = 0.00305247 (0.0290559) -Other time (%) = 8.88688 (84.5925) - -Nlocal: 2171.25 ave 2567 max 1849 min -Histogram: 2 0 0 1 1 2 1 0 0 1 -Nghost: 62.625 ave 71 max 57 min -Histogram: 2 0 1 0 2 2 0 0 0 1 -Neighs: 168.25 ave 232 max 120 min -Histogram: 1 0 1 2 2 1 0 0 0 1 - -Total # of neighbors = 1346 -Ave neighs/atom = 0.0774899 -Neighbor list builds = 2599 -Dangerous builds = 17 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.1 b/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.1 new file mode 100644 index 0000000000..b74a5c42a9 --- /dev/null +++ b/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.1 @@ -0,0 +1,312 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - dimer particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 200 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 200 settings made for mass +group big type 1 +200 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.dimer.equil + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 27 27 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.557 | 5.557 | 5.557 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 3.4028231 0 0 0.83369167 -0.55065517 + 100 9.5167872 2.392105 0 4.7237178 2.8319556 + 200 13.564465 3.0352634 0 6.3585572 3.6388732 + 300 13.133051 4.3835112 0 7.6011086 4.060051 + 400 14.576837 5.5141059 0 9.0854309 4.422762 + 500 15.227825 6.6472106 0 10.378028 4.8598912 + 600 16.93219 7.454865 0 11.603251 5.2908894 + 700 16.573769 8.7323442 0 12.792918 5.3544684 + 800 17.482599 9.7221047 0 14.005341 5.6200973 + 900 18.548144 10.739353 0 15.283649 4.7817995 + 1000 18.068079 12.058417 0 16.485096 6.5773091 +Loop time of 0.0511113 on 1 procs for 1000 steps with 200 atoms + +Performance: 8452141.519 tau/day, 19565.142 timesteps/s, 3.913 Matom-step/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0095507 | 0.0095507 | 0.0095507 | 0.0 | 18.69 +Neigh | 0.0042239 | 0.0042239 | 0.0042239 | 0.0 | 8.26 +Comm | 0.002203 | 0.002203 | 0.002203 | 0.0 | 4.31 +Output | 8.8531e-05 | 8.8531e-05 | 8.8531e-05 | 0.0 | 0.17 +Modify | 0.03336 | 0.03336 | 0.03336 | 0.0 | 65.27 +Other | | 0.001685 | | | 3.30 + +Nlocal: 200 ave 200 max 200 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 64 ave 64 max 64 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 275 ave 275 max 275 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 275 +Ave neighs/atom = 1.375 +Neighbor list builds = 193 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 29929 atoms + using lattice units in orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + create_atoms CPU = 0.007 seconds + +set type 2 mass 0.1 +Setting atom values ... + 29929 settings made for mass +group small type 2 +29929 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 12776 atoms, new total = 17353 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.dimer + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 17153 200 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 75 75 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24911072 0.24911072 1 + SRD per actual grid cell = 5.544404 + SRD viscosity = 0.23553122 + big/SRD mass density ratio = 0.14250828 + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.191188 7.6900178 + ave/max big velocity = 2.6813242 7.1846104 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 18.683304, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 26.77 | 26.77 | 26.77 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 6.8392143 0 0.297476 20.71529 25.810505 4.0555741 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.2285566 3375 0.24673495 20.492683 21.407958 5.237464 13477 54 54 1 652 16900 5625 3375 1.1653557 0 15 0 + 2000 1.3561011 3395 0.24763991 20.476182 21.486477 9.2878509 13435 67 67 0 1504 16900 5625 3395 1.1651182 0 15 0 + 3000 1.2445369 3352 0.24713723 20.515681 21.442861 8.0289529 13186 62 63 2 2379 16900 5625 3352 1.1746721 0 15 0 + 4000 1.1058201 3389 0.24596239 20.51709 21.340926 10.003266 13466 66 66 0 3264 16900 5625 3389 1.1671415 0 15 0 + 5000 1.0584198 3407 0.24539623 20.503281 21.291804 9.1119405 13254 64 64 0 4189 16900 5625 3407 1.1687685 0 15 0 + 6000 1.3335611 3360 0.24737788 20.470239 21.463742 8.6885126 13281 62 62 1 5031 16900 5625 3360 1.1568996 0 15 0 + 7000 1.1384759 3401 0.24570869 20.47075 21.318914 9.1801119 13059 47 47 1 5878 16900 5625 3401 1.182474 0 15 0 + 8000 1.2982334 3397 0.24667224 20.435333 21.402517 6.5904007 13405 56 56 0 6729 16900 5625 3397 1.169017 0 24 0 + 9000 1.0456752 3381 0.24504517 20.482316 21.261344 10.497413 13205 81 81 2 7706 16900 5625 3381 1.1694675 0 24 0 + 10000 1.2222547 3394 0.24653264 20.479825 21.390405 8.7495888 13296 68 68 1 8581 16900 5625 3394 1.1613437 0 24 0 +Loop time of 7.18514 on 1 procs for 10000 steps with 17353 atoms + +Performance: 120248.165 tau/day, 1391.761 timesteps/s, 24.151 Matom-step/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.14497 | 0.14497 | 0.14497 | 0.0 | 2.02 +Neigh | 0.031835 | 0.031835 | 0.031835 | 0.0 | 0.44 +Comm | 0.094201 | 0.094201 | 0.094201 | 0.0 | 1.31 +Output | 0.00082765 | 0.00082765 | 0.00082765 | 0.0 | 0.01 +Modify | 6.8507 | 6.8507 | 6.8507 | 0.0 | 95.35 +Other | | 0.06259 | | | 0.87 + +Nlocal: 17353 ave 17353 max 17353 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1334 ave 1334 max 1334 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1334 +Ave neighs/atom = 0.076874316 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:07 diff --git a/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.4 b/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.4 new file mode 100644 index 0000000000..447feb886d --- /dev/null +++ b/examples/ASPHERE/dimer/log.1Feb24.dimer.g++.4 @@ -0,0 +1,312 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - dimer particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 200 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 200 settings made for mass +group big type 1 +200 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.dimer.equil + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 27 27 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.553 | 5.553 | 5.553 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 3.4028231 0 0 0.83369167 -0.55065517 + 100 9.5167872 2.392105 0 4.7237178 2.8319556 + 200 13.564465 3.0352634 0 6.3585572 3.6388732 + 300 13.133051 4.3835112 0 7.6011086 4.060051 + 400 14.576837 5.5141059 0 9.0854309 4.422762 + 500 15.227825 6.6472106 0 10.378028 4.8598912 + 600 16.93219 7.454865 0 11.603251 5.2908894 + 700 16.573769 8.7323442 0 12.792918 5.3544684 + 800 17.482599 9.7221047 0 14.005341 5.6200973 + 900 18.548144 10.739353 0 15.283649 4.7817995 + 1000 18.068079 12.058417 0 16.485096 6.5773093 +Loop time of 0.0424792 on 4 procs for 1000 steps with 200 atoms + +Performance: 10169676.521 tau/day, 23540.918 timesteps/s, 4.708 Matom-step/s +98.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0022758 | 0.0023448 | 0.002442 | 0.1 | 5.52 +Neigh | 0.0011082 | 0.0011236 | 0.0011582 | 0.1 | 2.64 +Comm | 0.0099484 | 0.010092 | 0.010247 | 0.1 | 23.76 +Output | 9.551e-05 | 0.00010604 | 0.00013381 | 0.0 | 0.25 +Modify | 0.026025 | 0.026222 | 0.026405 | 0.1 | 61.73 +Other | | 0.00259 | | | 6.10 + +Nlocal: 50 ave 55 max 47 min +Histogram: 2 0 0 0 0 1 0 0 0 1 +Nghost: 33.75 ave 38 max 32 min +Histogram: 2 1 0 0 0 0 0 0 0 1 +Neighs: 68.75 ave 77 max 64 min +Histogram: 2 0 0 1 0 0 0 0 0 1 + +Total # of neighbors = 275 +Ave neighs/atom = 1.375 +Neighbor list builds = 193 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 29929 atoms + using lattice units in orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + create_atoms CPU = 0.002 seconds + +set type 2 mass 0.1 +Setting atom values ... + 29929 settings made for mass +group small type 2 +29929 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 12776 atoms, new total = 17353 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.dimer + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 17153 200 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 75 75 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24911072 0.24911072 1 + SRD per actual grid cell = 5.544404 + SRD viscosity = 0.23553122 + big/SRD mass density ratio = 0.14250828 + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.191188 7.6900178 + ave/max big velocity = 2.6813242 7.1846103 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 18.683304, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 13.2 | 13.21 | 13.22 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 6.8392143 0 0.297476 20.71529 25.810505 4.0555746 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.1648085 3389 0.24643931 20.514525 21.382307 5.5927686 13390 59 59 0 1015 28224 5625 3389 1.1513276 0 111 0 + 2000 1.1870311 3385 0.24701637 20.548037 21.432375 5.9269821 13271 57 57 2 1878 28224 5625 3385 1.1619099 0 111 0 + 3000 1.1362839 3365 0.24577276 20.477942 21.324474 5.1621045 13244 59 60 1 2778 28224 5625 3365 1.1807679 0 111 0 + 4000 1.3023748 3390 0.24679509 20.442907 21.413176 5.6127077 13413 65 65 1 3705 28224 5625 3390 1.1726946 0 111 0 + 5000 1.195496 3387 0.2458055 20.43667 21.327314 6.1843476 13248 51 51 1 4638 28224 5625 3387 1.1730279 0 111 0 + 6000 1.2389419 3387 0.24546635 20.374876 21.297888 5.5909826 13184 54 54 1 5494 28224 5625 3387 1.1859134 0 111 0 + 7000 1.2068912 3378 0.24564722 20.414447 21.313581 8.5604547 13188 57 57 1 6428 28224 5625 3378 1.1499181 0 111 0 + 8000 1.1014154 3374 0.24514746 20.449665 21.270219 7.3483529 13179 63 63 0 7591 28224 5625 3374 1.1769322 0 121 0 + 9000 1.356464 3388 0.24749513 20.463349 21.473915 7.6809833 13138 50 50 2 8485 28224 5625 3388 1.1448659 0 121 0 + 10000 1.1632951 3402 0.24560819 20.44354 21.310195 9.5738599 13323 64 67 0 9304 28224 5625 3402 1.1550136 0 121 0 +Loop time of 2.47185 on 4 procs for 10000 steps with 17353 atoms + +Performance: 349536.432 tau/day, 4045.561 timesteps/s, 70.203 Matom-step/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.037524 | 0.039903 | 0.042215 | 1.1 | 1.61 +Neigh | 0.01053 | 0.010805 | 0.011068 | 0.2 | 0.44 +Comm | 0.14536 | 0.14822 | 0.15102 | 0.6 | 6.00 +Output | 0.00051847 | 0.00054674 | 0.0006272 | 0.0 | 0.02 +Modify | 2.2276 | 2.2334 | 2.2381 | 0.3 | 90.35 +Other | | 0.03895 | | | 1.58 + +Nlocal: 4338.25 ave 4488 max 4277 min +Histogram: 2 1 0 0 0 0 0 0 0 1 +Nghost: 76.75 ave 85 max 69 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 331.25 ave 355 max 306 min +Histogram: 1 0 0 1 0 0 1 0 0 1 + +Total # of neighbors = 1325 +Ave neighs/atom = 0.076355673 +Neighbor list builds = 507 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.1 b/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.1 new file mode 100644 index 0000000000..8c426db53c --- /dev/null +++ b/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.1 @@ -0,0 +1,328 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - dimer particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 200 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 200 settings made for mass +group big type 1 +200 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.dimer.equil + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 27 27 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.557 | 5.557 | 5.557 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 3.4028231 0 0 0.83369167 -0.55065517 + 100 9.5167872 2.392105 0 4.7237178 2.8319556 + 200 13.564465 3.0352634 0 6.3585572 3.6388732 + 300 13.133051 4.3835112 0 7.6011086 4.060051 + 400 14.576837 5.5141059 0 9.0854309 4.422762 + 500 15.227825 6.6472106 0 10.378028 4.8598912 + 600 16.93219 7.454865 0 11.603251 5.2908894 + 700 16.573769 8.7323442 0 12.792918 5.3544684 + 800 17.482599 9.7221047 0 14.005341 5.6200973 + 900 18.548144 10.739353 0 15.283649 4.7817995 + 1000 18.068079 12.058417 0 16.485096 6.5773091 +Loop time of 0.0502552 on 1 procs for 1000 steps with 200 atoms + +Performance: 8596132.389 tau/day, 19898.455 timesteps/s, 3.980 Matom-step/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0095071 | 0.0095071 | 0.0095071 | 0.0 | 18.92 +Neigh | 0.0042809 | 0.0042809 | 0.0042809 | 0.0 | 8.52 +Comm | 0.0022049 | 0.0022049 | 0.0022049 | 0.0 | 4.39 +Output | 0.0001259 | 0.0001259 | 0.0001259 | 0.0 | 0.25 +Modify | 0.032467 | 0.032467 | 0.032467 | 0.0 | 64.60 +Other | | 0.00167 | | | 3.32 + +Nlocal: 200 ave 200 max 200 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 64 ave 64 max 64 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 275 ave 275 max 275 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 275 +Ave neighs/atom = 1.375 +Neighbor list builds = 193 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 29929 atoms + using lattice units in orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + create_atoms CPU = 0.006 seconds + +set type 2 mass 0.1 +Setting atom values ... + 29929 settings made for mass +group small type 2 +29929 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 12776 atoms, new total = 17353 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 500 dump.dimer.mp + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 25000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 17153 200 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 75 75 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24911072 0.24911072 1 + SRD per actual grid cell = 5.544404 + SRD viscosity = 0.23553122 + big/SRD mass density ratio = 0.14250828 + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.191188 7.6900178 + ave/max big velocity = 2.6813242 7.1846104 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 18.683304, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 26.77 | 26.77 | 26.77 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 6.8392143 0 0.297476 20.71529 25.810505 4.0555741 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.3421139 3394 0.24797209 20.515424 21.515299 5.9986227 13474 52 52 1 704 16900 5625 3394 1.1328453 0 14 0 + 2000 1.3372296 3366 0.24694513 20.429958 21.426194 9.640193 13302 74 74 0 1516 16900 5625 3366 1.1634167 0 14 0 + 3000 1.4022742 3360 0.24799552 20.472637 21.517331 5.9446731 13483 47 47 0 2989 16900 5625 3360 1.1774442 0 217 0 + 4000 1.6325677 3376 0.25066282 20.532497 21.74876 6.9698781 13206 61 61 2 4198 16900 5625 3376 1.1749717 0 217 0 + 5000 2.0992887 3391 0.25484065 20.547279 22.111249 10.648531 13414 62 69 1 6389 16900 5625 3391 1.1862903 0 412 0 + 6000 1.7584548 3388 0.25126127 20.490636 21.800684 8.68036 13456 58 58 0 7672 16900 5625 3388 1.1553986 0 412 0 + 7000 2.2384486 3343 0.25650382 20.58791 22.255554 12.008146 13187 59 59 0 8879 16900 5625 3343 1.1728994 0 412 0 + 8000 2.4981644 3380 0.25734806 20.467672 22.328804 6.7156077 13383 51 51 0 10085 16900 5625 3380 1.156205 0 412 0 + 9000 2.4321991 3384 0.25838085 20.606426 22.418415 9.9820399 12847 55 55 0 11445 16900 5625 3384 1.156145 0 412 0 + 10000 2.2560205 3387 0.25541566 20.480404 22.161139 10.87418 13022 66 66 0 12863 16900 5625 3387 1.1559136 0 412 0 + 11000 2.2321955 3378 0.25533735 20.491359 22.154345 8.510825 13175 70 70 1 14273 16900 5625 3378 1.1470284 0 412 0 + 12000 2.2715125 3377 0.25469529 20.40636 22.098637 9.0604601 13146 68 68 0 15742 16900 5625 3377 1.171755 0 412 0 + 13000 2.3766974 3364 0.25667348 20.499635 22.270275 10.766786 12829 60 60 1 17214 16900 5625 3364 1.130354 0 412 0 + 14000 2.5659704 3347 0.25802994 20.47632 22.387967 8.2568074 13090 66 66 1 18767 16900 5625 3347 1.1609852 0 412 0 + 15000 2.3235671 3400 0.25603152 20.483517 22.214574 5.4785711 13389 50 50 0 20173 16900 5625 3400 1.149754 0 412 0 + 16000 2.6335413 3373 0.25956137 20.558854 22.520843 4.7121947 13027 58 58 1 21668 16900 5625 3373 1.1308267 0 412 0 + 17000 2.5603168 3410 0.25744829 20.430065 22.337501 6.1898616 13218 51 51 1 23170 16900 5625 3410 1.1285699 0 412 0 + 18000 2.7801428 3362 0.26002524 20.489884 22.56109 8.9919312 13002 57 57 3 24829 16900 5625 3362 1.1610153 0 412 0 + 19000 2.7869738 3364 0.26033026 20.51126 22.587555 9.6539159 13085 46 46 0 26476 16900 5625 3364 1.1431913 0 412 0 + 20000 2.678182 3383 0.2586317 20.444934 22.44018 7.3468277 12939 42 42 0 27992 16900 5625 3383 1.143534 0 412 0 + 21000 2.8094503 3375 0.26088069 20.542272 22.635313 8.2257869 13449 52 52 0 29570 16900 5625 3375 1.1375499 0 412 0 + 22000 3.2220363 3377 0.26464914 20.561866 22.962283 6.6329375 13178 65 65 6 31203 16900 5625 3377 1.1683184 0 412 0 + 23000 3.2268368 3339 0.26414495 20.514543 22.918536 4.6879815 12589 51 51 0 32929 16900 5625 3339 1.1378613 0 412 0 + 24000 2.6062461 3380 0.25967238 20.588821 22.530474 10.036449 12745 53 54 0 34460 16900 5625 3380 1.1396017 0 412 0 + 25000 3.2519674 3373 0.26376614 20.462953 22.885669 7.7592712 12856 52 52 1 36172 16900 5625 3373 1.1858891 0 412 0 +Loop time of 20.7208 on 1 procs for 25000 steps with 17353 atoms + +Performance: 104243.242 tau/day, 1206.519 timesteps/s, 20.937 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.39343 | 0.39343 | 0.39343 | 0.0 | 1.90 +Neigh | 0.09039 | 0.09039 | 0.09039 | 0.0 | 0.44 +Comm | 0.26483 | 0.26483 | 0.26483 | 0.0 | 1.28 +Output | 0.0021023 | 0.0021023 | 0.0021023 | 0.0 | 0.01 +Modify | 19.785 | 19.785 | 19.785 | 0.0 | 95.49 +Other | | 0.1847 | | | 0.89 + +Nlocal: 17353 ave 17353 max 17353 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 146 ave 146 max 146 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1326 ave 1326 max 1326 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1326 +Ave neighs/atom = 0.0764133 +Neighbor list builds = 1290 +Dangerous builds = 0 +Total wall time: 0:00:21 diff --git a/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.4 b/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.4 new file mode 100644 index 0000000000..0cced46f26 --- /dev/null +++ b/examples/ASPHERE/dimer/log.1Feb24.dimer.mp.g++.4 @@ -0,0 +1,328 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - dimer particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.dimer fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 200 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 200 settings made for mass +group big type 1 +200 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.dimer.equil + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 27 27 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.553 | 5.553 | 5.553 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 3.4028231 0 0 0.83369167 -0.55065517 + 100 9.5167872 2.392105 0 4.7237178 2.8319556 + 200 13.564465 3.0352634 0 6.3585572 3.6388732 + 300 13.133051 4.3835112 0 7.6011086 4.060051 + 400 14.576837 5.5141059 0 9.0854309 4.422762 + 500 15.227825 6.6472106 0 10.378028 4.8598912 + 600 16.93219 7.454865 0 11.603251 5.2908894 + 700 16.573769 8.7323442 0 12.792918 5.3544684 + 800 17.482599 9.7221047 0 14.005341 5.6200973 + 900 18.548144 10.739353 0 15.283649 4.7817995 + 1000 18.068079 12.058417 0 16.485096 6.5773093 +Loop time of 0.0421376 on 4 procs for 1000 steps with 200 atoms + +Performance: 10252121.014 tau/day, 23731.762 timesteps/s, 4.746 Matom-step/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.002222 | 0.0023177 | 0.0024199 | 0.2 | 5.50 +Neigh | 0.0010943 | 0.0011428 | 0.001174 | 0.1 | 2.71 +Comm | 0.0097533 | 0.009878 | 0.010001 | 0.1 | 23.44 +Output | 9.4323e-05 | 0.0001028 | 0.00012783 | 0.0 | 0.24 +Modify | 0.02557 | 0.026225 | 0.026638 | 0.3 | 62.24 +Other | | 0.002471 | | | 5.86 + +Nlocal: 50 ave 55 max 47 min +Histogram: 2 0 0 0 0 1 0 0 0 1 +Nghost: 33.75 ave 38 max 32 min +Histogram: 2 1 0 0 0 0 0 0 0 1 +Neighs: 68.75 ave 77 max 64 min +Histogram: 2 0 0 1 0 0 0 0 0 1 + +Total # of neighbors = 275 +Ave neighs/atom = 1.375 +Neighbor list builds = 193 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 29929 atoms + using lattice units in orthogonal box = (-9.341652 -9.341652 -0.5) to (9.341652 9.341652 0.5) + create_atoms CPU = 0.002 seconds + +set type 2 mass 0.1 +Setting atom values ... + 29929 settings made for mass +group small type 2 +29929 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 12776 atoms, new total = 17353 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 100 rigid bodies with 200 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 500 dump.dimer.mp + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 25000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 17153 200 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 75 75 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24911072 0.24911072 1 + SRD per actual grid cell = 5.544404 + SRD viscosity = 0.23553122 + big/SRD mass density ratio = 0.14250828 + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.191188 7.6900178 + ave/max big velocity = 2.6813242 7.1846103 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 18.683304, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 13.2 | 13.21 | 13.22 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 6.8392143 0 0.297476 20.71529 25.810505 4.0555746 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.2739082 3360 0.24704957 20.486195 21.435256 3.6693454 13497 46 46 2 816 28224 5625 3360 1.1564821 0 54 0 + 2000 1.3843858 3380 0.24759985 20.451634 21.483001 5.2299666 13363 70 70 0 1671 28224 5625 3380 1.170199 0 54 0 + 3000 1.3942166 3373 0.24823326 20.499268 21.537959 7.7943821 13214 59 59 2 2600 28224 5625 3373 1.1539593 0 54 0 + 4000 1.6387342 3366 0.24966206 20.441071 21.661928 4.3859226 13280 49 49 2 3568 28224 5625 3366 1.176006 0 54 0 + 5000 1.8677297 3388 0.25278915 20.541792 21.933251 5.9053775 13238 68 68 2 4553 28224 5625 3388 1.1728833 0 54 0 + 6000 1.8884914 3372 0.25216944 20.472555 21.879481 7.5864922 13142 62 62 1 5645 28224 5625 3372 1.1733967 0 54 0 + 7000 2.0575519 3387 0.25374609 20.483403 22.016279 6.9842803 13101 41 41 0 6805 28224 5625 3387 1.1503024 0 54 0 + 8000 1.9800593 3373 0.252975 20.474232 21.949376 8.3493951 13176 63 64 1 8166 28224 5625 3373 1.1621339 0 67 0 + 9000 2.2288114 3403 0.25526729 20.487802 22.148267 6.7676677 12866 61 61 1 9360 28224 5625 3403 1.1446891 0 67 0 + 10000 2.4854456 3339 0.25713924 20.45903 22.310687 9.3781009 12692 65 65 1 10680 28224 5625 3339 1.1417733 0 67 0 + 11000 2.5850677 3335 0.25820147 20.476975 22.402851 9.9421534 12954 70 70 2 11964 28224 5625 3335 1.1497985 0 67 0 + 12000 2.5087529 3358 0.25746572 20.469992 22.339013 9.9566718 12959 58 58 0 13462 28224 5625 3358 1.1365643 0 98 0 + 13000 2.5480838 3371 0.25761214 20.453395 22.351717 8.6628089 13142 54 54 3 14985 28224 5625 3371 1.1510123 0 98 0 + 14000 2.946645 3384 0.26176446 20.516743 22.711994 8.5668798 12579 53 53 0 16336 28224 5625 3384 1.1546089 0 98 0 + 15000 4.025292 3338 0.27188564 20.591315 23.590157 9.8722859 12824 50 50 15 18115 28224 5625 3338 1.164518 0 122 0 + 16000 2.2744945 3376 0.25598709 20.516221 22.21072 9.1890215 13020 52 52 0 19689 28224 5625 3376 1.1439385 0 122 0 + 17000 2.3857021 3353 0.25662954 20.489114 22.266462 10.24809 12776 51 51 0 21158 28224 5625 3353 1.1435041 0 122 0 + 18000 2.9678193 3330 0.26255063 20.56918 22.780206 8.6799225 12810 49 49 2 23066 28224 5625 3330 1.1567395 0 133 0 + 19000 2.7464034 3368 0.2613984 20.634162 22.680232 9.5420188 12746 47 47 3 24675 28224 5625 3368 1.1426658 0 133 0 + 20000 2.8228684 3367 0.26137363 20.575046 22.678083 8.0865322 12886 51 51 0 26119 28224 5625 3367 1.1484398 0 133 0 + 21000 2.8903033 3389 0.26173565 20.556218 22.709494 11.038294 13152 41 41 1 27685 28224 5625 3389 1.1398936 0 133 0 + 22000 2.8279828 3331 0.26058759 20.503035 22.609882 8.3647396 12895 57 57 1 29333 28224 5625 3331 1.1551348 0 133 0 + 23000 2.9320035 3376 0.26178899 20.529779 22.714121 7.1841698 13077 54 54 1 30908 28224 5625 3376 1.1453809 0 133 0 + 24000 2.8508425 3366 0.26104722 20.525884 22.649762 10.680819 13019 58 58 4 32831 28224 5625 3366 1.1391852 0 154 0 + 25000 2.7878254 3333 0.25961 20.448132 22.525062 11.149479 12960 57 57 1 34494 28224 5625 3333 1.172964 0 154 0 +Loop time of 6.5335 on 4 procs for 25000 steps with 17353 atoms + +Performance: 330603.792 tau/day, 3826.433 timesteps/s, 66.400 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.097519 | 0.10401 | 0.10744 | 1.2 | 1.59 +Neigh | 0.027038 | 0.028067 | 0.028678 | 0.4 | 0.43 +Comm | 0.39354 | 0.39697 | 0.40246 | 0.6 | 6.08 +Output | 0.0013442 | 0.0014045 | 0.0015827 | 0.3 | 0.02 +Modify | 5.8667 | 5.8905 | 5.9143 | 0.8 | 90.16 +Other | | 0.1126 | | | 1.72 + +Nlocal: 4338.25 ave 4476 max 4199 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Nghost: 78.5 ave 83 max 75 min +Histogram: 1 0 1 0 0 1 0 0 0 1 +Neighs: 328 ave 352 max 309 min +Histogram: 1 0 0 2 0 0 0 0 0 1 + +Total # of neighbors = 1312 +Ave neighs/atom = 0.075606523 +Neighbor list builds = 1274 +Dangerous builds = 0 +Total wall time: 0:00:06 diff --git a/examples/ASPHERE/ellipsoid/in.ellipsoid b/examples/ASPHERE/ellipsoid/in.ellipsoid index 1ee59597da..de972e02f6 100644 --- a/examples/ASPHERE/ellipsoid/in.ellipsoid +++ b/examples/ASPHERE/ellipsoid/in.ellipsoid @@ -116,4 +116,4 @@ thermo 1000 #dump 2 all image 1000 image.*.jpg type type zoom 1.6 #dump_modify 2 pad 6 adiam 1 1 adiam 2 0.2 -run 100000 +run 10000 diff --git a/examples/ASPHERE/ellipsoid/in.ellipsoid.mp b/examples/ASPHERE/ellipsoid/in.ellipsoid.mp index 31fe79eb58..9af32cd2d5 100644 --- a/examples/ASPHERE/ellipsoid/in.ellipsoid.mp +++ b/examples/ASPHERE/ellipsoid/in.ellipsoid.mp @@ -117,4 +117,4 @@ thermo 1000 #dump 1 all image 500 image.*.jpg type type zoom 1.6 #dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 -run 50000 +run 10000 diff --git a/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.g++.8 b/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.g++.8 deleted file mode 100644 index 1b9fc31a5a..0000000000 --- a/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.g++.8 +++ /dev/null @@ -1,190 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD diffusion demo - ellipsoids - -units lj -atom_style ellipsoid -atom_modify first big -dimension 2 - -# create big ellipsoidal particles - -lattice sq 0.14 -Lattice spacing in x,y,z = 2.67261 2.67261 2.67261 -region box block 0 10 0 10 -0.5 0.5 -create_box 2 box -Created orthogonal box = (0 0 -1.33631) to (26.7261 26.7261 1.33631) - 4 by 2 by 1 MPI processor grid -create_atoms 1 region box -Created 100 atoms - -set type 1 mass 1.0 - 100 settings made for mass -set type 1 shape 3.0 1.0 1.0 - 100 settings made for shape -group big type 1 -100 atoms in group big -set group big quat/random 29898 - 100 settings made for quat/random - -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style gayberne 1.0 3.0 1.0 4.0 -pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 -pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 -pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big nve/asphere -fix 2 all enforce2d - -compute rot big temp/asphere - -#dump 1 all custom 10 dump.ellipsoid.equil id type x y z # quatw quati quatj quatk - -thermo_style custom step temp c_rot epair etotal press -thermo 100 - -run 1000 -Memory usage per processor = 3.31932 Mbytes -Step Temp rot E_pair TotEng Press - 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 - 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 - 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 - 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 - 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 - 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 - 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 - 700 2.9593679 2.8231211 -0.40051714 2.5292571 1.1630889 - 800 2.7632971 2.9060854 -0.52075339 2.2149107 0.77106814 - 900 2.9905601 2.8869672 -0.49099457 2.4696599 0.69616725 - 1000 2.8470146 2.9004954 -0.51281252 2.305732 0.68820531 -Loop time of 0.0485955 on 8 procs for 1000 steps with 100 atoms - -Pair time (%) = 0.0201517 (41.4682) -Neigh time (%) = 0.000492364 (1.01319) -Comm time (%) = 0.0191883 (39.4858) -Outpt time (%) = 0.000273198 (0.562188) -Other time (%) = 0.00848994 (17.4706) - -Nlocal: 12.5 ave 16 max 8 min -Histogram: 1 1 0 0 0 3 0 0 1 2 -Nghost: 34.125 ave 42 max 28 min -Histogram: 1 0 2 2 0 1 0 1 0 1 -Neighs: 46.125 ave 65 max 20 min -Histogram: 1 0 1 0 1 2 0 0 1 2 - -Total # of neighbors = 369 -Ave neighs/atom = 3.69 -Neighbor list builds = 174 -Dangerous builds = 0 - -#undump 1 -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 120.0 -Lattice spacing in x,y,z = 0.0912871 0.0912871 0.0912871 -create_atoms 2 region plane -Created 85849 atoms - -set type 2 mass 0.01 - 85849 settings made for mass -group small type 2 -85849 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 2.0 - -neigh_modify one 10000 - -delete_atoms overlap 1.6 small big -Deleted 71060 atoms, new total = 14889 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style gayberne 1.0 3.0 1.0 4.0 -pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 -pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 -pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.0005 - -fix 1 big nve/asphere -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 -fix 3 all enforce2d - -# diagnostics - -compute tbig big temp/asphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all custom 1000 dump.ellipsoid id type x y z # quatw quati quatj quatk - -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 100000 -SRD info: - SRD/big particles = 14789 100 - big particle diameter max/min = 3 1 - SRD temperature & lamda = 1 0.1 - SRD max distance & max velocity = 0.4 40 - SRD grid counts: 107 107 1 - SRD grid size: request, actual (xyz) = 0.25, 0.249777 0.249777 2.67261 - SRD per actual grid cell = 1.92757 - SRD viscosity = 0.688101 - big/SRD mass density ratio = 1.37367 - # of rescaled SRD velocities = 0 - ave/max small velocity = 13.3093 24.3359 - ave/max big velocity = 2.08028 5.05671 -Memory usage per processor = 10.9077 Mbytes -Step Temp rot 2[9] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 2.9004954 2.9004954 0 0.025582146 -0.51281252 3.8089257 0.89865242 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 3.3106106 3.3106106 1.0635866 0.029956176 -0.47263474 4.4601751 1.8111247 14000 35 160 0 224946 98040 11449 4182 1.0635866 1047 50 0 - 2000 2.2814487 2.2814487 1.2237286 0.017972589 -0.72341981 2.6759388 1.3454977 15318 47 276 0 528340 98040 11449 4136 1.2237286 2383 50 0 - 3000 4.2476485 4.2476485 1.2992612 0.038526442 -0.59279435 5.7362019 1.6896403 16506 63 410 0 830594 98040 11449 4172 1.2992612 3834 50 0 - 4000 2.4798681 2.4798681 1.3453264 0.022837826 -0.29467953 3.4003239 2.0765724 17201 51 403 0 1185573 98040 11449 4233 1.3453264 5456 50 0 - 5000 3.0852629 3.0852629 1.3915904 0.02760985 -0.48621111 4.1108305 1.2676357 17540 61 591 0 1594856 98040 11449 4306 1.3915904 7419 50 0 - 6000 6.7201122 6.7201122 1.3649223 0.064627842 -0.39052776 9.6224394 2.5524159 17997 59 564 0 2010250 98040 11449 4213 1.3649223 9280 50 0 - 7000 2.720343 2.720343 1.3909677 0.024282471 -0.43789405 3.6154171 1.5288376 17922 64 342 0 2392388 98040 11449 4228 1.3909677 10947 50 0 - 8000 1.9181626 1.9181626 1.3514483 0.014305579 -0.72810462 2.1299577 0.89423917 18188 42 260 0 2751626 98040 11449 4236 1.3514483 12556 50 0 - 9000 2.9090186 2.9090186 1.3688847 0.02558926 -0.52445278 3.8099849 1.1756318 18536 63 440 0 3112508 98040 11449 4227 1.3688847 14164 50 0 - 10000 1.9647403 1.9647403 1.3979066 0.015375037 -0.63827389 2.2891892 0.65597214 18817 60 466 0 3501352 98040 11449 4257 1.3979066 16016 50 0 - 11000 1.9989051 1.9989051 1.3872043 0.016191243 -0.56765443 2.4107142 0.80582429 18756 58 767 0 3856028 98040 11449 4254 1.3872043 17611 50 0 - 12000 1.7538755 1.7538755 1.4594883 0.013930543 -0.53915598 2.0741185 1.0563875 18602 58 335 0 4248666 98040 11449 4251 1.4594883 19350 50 0 - 13000 13.730871 13.730871 1.4864545 0.13447802 -0.43656501 20.022433 3.6701166 19144 74 681 0 4708523 98040 11449 4104 1.4864545 21589 50 0 - 14000 5.1078782 5.1078782 1.3637807 0.049721182 -0.20775172 7.4029868 2.559935 18494 65 713 0 5139143 98040 11449 4167 1.3637807 23555 50 0 - 15000 2.5843962 2.5843962 1.3450247 0.022294373 -0.53134114 3.3194092 1.1069147 18489 52 260 0 5489252 98040 11449 4262 1.3450247 25209 50 0 -ERROR: Lost atoms: original 14889 current 14819 (../thermo.cpp:392) diff --git a/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.mp.g++.8 b/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.mp.g++.8 deleted file mode 100644 index 052f3116f6..0000000000 --- a/examples/ASPHERE/ellipsoid/log.1Feb14.ellipsoid.mp.g++.8 +++ /dev/null @@ -1,247 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD viscosity demo - ellipsoids - -units lj -atom_style ellipsoid -atom_modify first big -dimension 2 - -# create big ellipsoidal particles - -lattice sq 0.14 -Lattice spacing in x,y,z = 2.67261 2.67261 2.67261 -region box block 0 10 0 10 -0.5 0.5 -create_box 2 box -Created orthogonal box = (0 0 -1.33631) to (26.7261 26.7261 1.33631) - 4 by 2 by 1 MPI processor grid -create_atoms 1 region box -Created 100 atoms - -set type 1 mass 1.0 - 100 settings made for mass -set type 1 shape 3.0 1.0 1.0 - 100 settings made for shape -group big type 1 -100 atoms in group big -set group big quat/random 29898 - 100 settings made for quat/random - -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style gayberne 1.0 3.0 1.0 4.0 -pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 -pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 -pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big nve/asphere -fix 2 all enforce2d - -compute rot big temp/asphere - -#dump 1 all custom 10 dump.ellipsoid.equil id type x y z # quatw quati quatj quatk - -thermo_style custom step temp c_rot epair etotal press -thermo 100 - -run 1000 -Memory usage per processor = 3.31932 Mbytes -Step Temp rot E_pair TotEng Press - 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 - 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 - 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 - 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 - 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 - 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 - 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 - 700 2.9593679 2.8231211 -0.40051714 2.5292571 1.1630889 - 800 2.7632971 2.9060854 -0.52075339 2.2149107 0.77106814 - 900 2.9905601 2.8869672 -0.49099457 2.4696599 0.69616725 - 1000 2.8470146 2.9004954 -0.51281252 2.305732 0.68820531 -Loop time of 0.0581853 on 8 procs for 1000 steps with 100 atoms - -Pair time (%) = 0.0202803 (34.8546) -Neigh time (%) = 0.000480682 (0.826122) -Comm time (%) = 0.0264942 (45.5342) -Outpt time (%) = 0.000326395 (0.560958) -Other time (%) = 0.0106037 (18.2241) - -Nlocal: 12.5 ave 16 max 8 min -Histogram: 1 1 0 0 0 3 0 0 1 2 -Nghost: 34.125 ave 42 max 28 min -Histogram: 1 0 2 2 0 1 0 1 0 1 -Neighs: 46.125 ave 65 max 20 min -Histogram: 1 0 1 0 1 2 0 0 1 2 - -Total # of neighbors = 369 -Ave neighs/atom = 3.69 -Neighbor list builds = 174 -Dangerous builds = 0 - -#undump 1 -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 120.0 -Lattice spacing in x,y,z = 0.0912871 0.0912871 0.0912871 -create_atoms 2 region plane -Created 85849 atoms - -set type 2 mass 0.01 - 85849 settings made for mass -group small type 2 -85849 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 2.0 - -neigh_modify one 10000 - -delete_atoms overlap 1.6 small big -Deleted 71060 atoms, new total = 14889 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style gayberne 1.0 3.0 1.0 4.0 -pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 -pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 -pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.0005 - -fix 1 big nve/asphere -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 -fix 3 small viscosity 20 x y 50 -fix 4 all enforce2d - -# diagnostics - -compute tbig big temp/asphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all custom 500 dump.ellipsoid.mp id type x y z # quatw quati quatj quatk - -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 50000 -SRD info: - SRD/big particles = 14789 100 - big particle diameter max/min = 3 1 - SRD temperature & lamda = 1 0.1 - SRD max distance & max velocity = 0.4 40 - SRD grid counts: 107 107 1 - SRD grid size: request, actual (xyz) = 0.25, 0.249777 0.249777 2.67261 - SRD per actual grid cell = 1.92757 - SRD viscosity = 0.688101 - big/SRD mass density ratio = 1.37367 - # of rescaled SRD velocities = 0 - ave/max small velocity = 13.3093 24.3359 - ave/max big velocity = 2.08028 5.05671 -Memory usage per processor = 10.9077 Mbytes -Step Temp rot 2[9] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 2.9004954 2.9004954 0 0.025582146 -0.51281252 3.8089257 0.89865242 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 3.1663129 3.1663129 1.0612788 0.028825811 -0.42593131 4.291875 1.8917479 14347 45 319 0 247730 98040 11449 4128 1.0612788 1160 50 0 - 2000 2.3854865 2.3854865 1.2711805 0.019550917 -0.6434388 2.910936 1.4342405 15199 41 151 0 526468 98040 11449 4191 1.2711805 2321 50 0 - 3000 2.6796789 2.6796789 1.2494843 0.023573743 -0.48282696 3.5098946 1.6090734 16441 52 230 0 827117 98040 11449 4203 1.2494843 3659 50 0 - 4000 2.7945661 2.7945661 1.3021617 0.024256529 -0.5523488 3.6115547 1.2702377 16935 52 474 0 1127934 98040 11449 4215 1.3021617 4966 50 0 - 5000 2.7061959 2.7061959 1.338483 0.023736966 -0.498035 3.5341969 1.2801942 17578 49 277 0 1435089 98040 11449 4261 1.338483 6351 50 0 - 6000 3.2698703 3.2698703 1.3285507 0.029840303 -0.42918398 4.4429227 1.4528039 17882 63 228 0 1776449 98040 11449 4252 1.3285507 7935 50 0 - 7000 3.9340641 3.9340641 1.3823898 0.035368008 -0.59581277 5.2659427 1.1321242 18069 49 462 0 2090062 98040 11449 4265 1.3823898 9343 50 0 - 8000 3.6037728 3.6037728 1.4150583 0.032400676 -0.54548483 4.8241367 1.2091317 18275 56 369 0 2486575 98040 11449 4229 1.4150583 11121 50 0 - 9000 105.15275 105.15275 1.3630934 1.0504642 -0.27397996 156.40361 23.278069 18139 107 732 0 2861341 98040 11449 4217 1.3630934 12781 50 0 - 10000 3.5224307 3.5224307 1.3897056 0.0324883 -0.4112387 4.837183 1.6093705 19100 61 347 0 3248400 98040 11449 4204 1.3897056 14424 50 0 - 11000 4.1949959 4.1949959 1.421272 0.03853305 -0.51335814 5.7371858 1.3586332 18670 52 590 0 3722041 98040 11449 4263 1.421272 16373 50 0 - 12000 3.1692742 3.1692742 1.3999982 0.028463927 -0.48422456 4.237994 1.1713046 18787 61 323 0 4117517 98040 11449 4202 1.3999982 18125 50 0 - 13000 3.5868757 3.5868757 1.3193021 0.032298734 -0.53548629 4.8089585 1.0664078 18572 67 224 0 4417636 98040 11449 4277 1.3193021 19546 50 0 - 14000 3.708681 3.708681 1.317797 0.033355183 -0.55968141 4.9662533 1.3959088 18284 67 207 0 4675359 98040 11449 4253 1.317797 20631 50 0 - 15000 3.7410393 3.7410393 1.4017441 0.033377852 -0.60452027 4.9696283 1.2506767 18385 51 189 0 4956150 98040 11449 4275 1.4017441 21763 50 0 - 16000 5.3298522 5.3298522 1.3456075 0.049673767 -0.54555257 7.3959272 1.841432 18693 63 549 0 5301393 98040 11449 4196 1.3456075 23216 50 0 - 17000 3.7425275 3.7425275 1.321554 0.036608704 -0.12569607 5.4506699 2.3767421 18377 68 526 0 5637038 98040 11449 4261 1.321554 24829 50 0 - 18000 6.1904009 6.1904009 1.3905006 0.05857936 -0.50181651 8.7218809 1.7936734 18422 63 522 0 6049781 98040 11449 4280 1.3905006 26646 50 0 - 19000 3.1770374 3.1770374 1.3694174 0.028096405 -0.55051202 4.1832737 0.98036773 18342 54 343 0 6383253 98040 11449 4239 1.3694174 28038 50 0 - 20000 3.5793112 3.5793112 1.3160294 0.031413769 -0.65597761 4.677196 1.0713128 18739 60 272 0 6692090 98040 11449 4262 1.3160294 29389 50 0 - 21000 3.2300481 3.2300481 1.3407923 0.027955254 -0.65051393 4.1622578 0.89783071 18582 55 456 0 6999361 98040 11449 4237 1.3407923 30653 50 0 - 22000 3.5879886 3.5879886 1.3790201 0.031692391 -0.6274228 4.7186802 0.97752405 18768 63 552 0 7350833 98040 11449 4308 1.3790201 32120 50 0 - 23000 3.5666316 3.5666316 1.4123826 0.031275136 -0.6577261 4.656555 0.99950405 18864 49 231 0 7741276 98040 11449 4265 1.4123826 33939 50 0 - 24000 3.7306353 3.7306353 1.3854831 0.032426295 -0.7306956 4.827951 0.93575015 18488 63 552 0 8096740 98040 11449 4238 1.3854831 35503 50 0 - 25000 4.2971901 4.2971901 1.4207289 0.038358698 -0.69158669 5.7112265 1.0308127 18922 58 430 0 8518804 98040 11449 4254 1.4207289 37429 50 0 - 26000 9.514164 9.514164 1.4209186 0.09200552 -0.47740255 13.698702 2.4102159 18934 63 570 0 8931705 98040 11449 4233 1.4209186 39132 50 0 - 27000 3.9153535 3.9153535 1.3814961 0.036650525 -0.37698007 5.4568967 1.4531475 19153 65 553 0 9277922 98040 11449 4299 1.3814961 40660 50 0 - 28000 3.6560048 3.6560048 1.3520603 0.033100525 -0.51910991 4.9283372 1.3474705 19529 59 447 0 9642607 98040 11449 4278 1.3520603 42335 50 0 - 29000 14.835118 14.835118 1.3981622 0.14535835 -0.4619207 21.642405 3.6917556 19265 52 102 0 9937354 98040 11449 4224 1.3981622 43664 50 0 - 30000 5.3595251 5.3595251 1.3636194 0.050893845 -0.40810785 7.5775845 1.7023989 19065 43 131 0 10261222 98040 11449 4170 1.3636194 45193 50 0 - 31000 5.1821698 5.1821698 1.3180039 0.049074014 -0.41480304 7.30663 1.6943582 19142 58 282 0 10584027 98040 11449 4228 1.3180039 46636 50 0 - 32000 4.3056534 4.3056534 1.3508467 0.040670309 -0.36002116 6.0554024 1.7875405 19065 36 284 0 10933981 98040 11449 4286 1.3508467 48240 50 0 - 33000 3.8277999 3.8277999 1.3770405 0.034411971 -0.57982354 5.1235984 1.1046562 18838 71 729 0 11329901 98040 11449 4257 1.3770405 50046 50 0 - 34000 4.6562056 4.6562056 1.3938501 0.043777831 -0.41966518 6.5180812 1.3815841 18914 61 269 0 11758952 98040 11449 4221 1.3938501 51773 50 0 - 35000 3.4251492 3.4251492 1.3813031 0.031876928 -0.35731644 4.7461558 1.4152845 18838 60 283 0 12159425 98040 11449 4238 1.3813031 53477 50 0 - 36000 4.2565688 4.2565688 1.3474871 0.039214915 -0.5035788 5.8387088 1.1222014 18765 56 240 0 12568711 98040 11449 4249 1.3474871 55170 50 0 - 37000 5.3745505 5.3745505 1.4215553 0.053606226 -0.02664916 7.981431 2.8011643 19103 58 504 0 12941065 98040 11449 4270 1.4215553 56743 50 0 - 38000 4.0346121 4.0346121 1.4354472 0.036753623 -0.53932498 5.472247 1.1475792 18829 62 623 0 13351480 98040 11449 4226 1.4354472 58443 50 0 - 39000 4.0471971 4.0471971 1.417888 0.037884509 -0.3896991 5.6406246 1.3824278 19047 70 579 0 13752101 98040 11449 4219 1.417888 60208 50 0 - 40000 4.1611575 4.1611575 1.3712048 0.039505792 -0.31810741 5.8820173 1.6615204 18811 65 378 0 14143802 98040 11449 4313 1.3712048 61793 50 0 - 41000 4.852673 4.852673 1.3719985 0.044831688 -0.5554927 6.67499 1.2744313 18899 53 414 0 14505662 98040 11449 4274 1.3719985 63358 50 0 - 42000 4.8338875 4.8338875 1.3595624 0.045465888 -0.43307636 6.7694161 1.6297026 18708 46 360 0 14839866 98040 11449 4224 1.3595624 64895 50 0 - 43000 5.0243115 5.0243115 1.4371431 0.047111836 -0.47174292 7.0144813 1.5899963 18704 55 291 0 15195383 98040 11449 4209 1.4371431 66440 50 0 - 44000 7.2748224 7.2748224 1.3693754 0.069498669 -0.49182853 10.347657 1.9007074 18751 73 423 0 15572639 98040 11449 4253 1.3693754 68148 50 0 - 45000 5.4888002 5.4888002 1.3501677 0.050885254 -0.60200685 7.5763055 1.2841374 18662 51 314 0 15972088 98040 11449 4227 1.3501677 69998 50 0 - 46000 3.2144774 3.2144774 1.3342547 0.028194354 -0.59171403 4.1978573 0.9459541 18948 50 534 0 16308430 98040 11449 4253 1.3342547 71549 50 0 - 47000 4.0640905 4.0640905 1.3473081 0.036715084 -0.58898597 5.4665088 1.2043249 19188 57 236 0 16670321 98040 11449 4239 1.3473081 73216 50 0 - 48000 3.7843815 3.7843815 1.3413467 0.034360184 -0.52284075 5.1158877 1.1195984 19477 57 283 0 17000588 98040 11449 4307 1.3413467 74662 50 0 - 49000 4.3042567 4.3042567 1.354248 0.039635615 -0.51199566 5.9013468 1.410884 19628 68 456 0 17319627 98040 11449 4277 1.354248 75983 50 0 - 50000 4.015575 4.015575 1.3058373 0.036258162 -0.58472888 5.3984778 0.84500807 19257 63 416 0 17675269 98040 11449 4254 1.3058373 77468 50 0 -Loop time of 11.9502 on 8 procs for 50000 steps with 14889 atoms - -Pair time (%) = 1.09132 (9.13222) -Neigh time (%) = 0.959464 (8.02883) -Comm time (%) = 1.19057 (9.96277) -Outpt time (%) = 0.00310364 (0.0259714) -Other time (%) = 8.70577 (72.8502) - -Nlocal: 1861.12 ave 1979 max 1606 min -Histogram: 1 0 0 0 1 1 1 0 0 4 -Nghost: 35 ave 39 max 32 min -Histogram: 1 0 2 0 3 1 0 0 0 1 -Neighs: 46 ave 61 max 31 min -Histogram: 1 1 0 1 1 0 2 0 1 1 - -Total # of neighbors = 368 -Ave neighs/atom = 0.0247162 -Neighbor list builds = 2624 -Dangerous builds = 0 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.1 b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.1 new file mode 100644 index 0000000000..bb4e063020 --- /dev/null +++ b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.1 @@ -0,0 +1,346 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - ellipsoids + +units lj +atom_style ellipsoid +atom_modify first big +dimension 2 + +# create big ellipsoidal particles + +lattice sq 0.14 +Lattice spacing in x,y,z = 2.6726124 2.6726124 2.6726124 +region box block 0 10 0 10 -0.5 0.5 +create_box 2 box +Created orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.000 seconds + +set type 1 mass 1.0 +Setting atom values ... + 100 settings made for mass +set type 1 shape 3.0 1.0 1.0 +Setting atom values ... + 100 settings made for shape +group big type 1 +100 atoms in group big +set group big quat/random 29898 +Setting atom values ... + 100 settings made for quat/random + +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve/asphere +fix 2 all enforce2d + +compute rot big temp/asphere +compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez + +#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +thermo_style custom step temp c_rot epair etotal press +thermo 100 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- pair gayberne command: doi:10.1063/1.3058435 + +@Article{Brown09, + author = {W. M. Brown and M. K. Petersen and S. J. Plimpton and G. S. Grest}, + title = {Liquid Crystal Nanodroplets in Solution}, + journal = {J.~Chem.\ Phys.}, + year = 2009, + volume = 130, + number = 4, + pages = {044901} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 13 13 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.611 | 4.611 | 4.611 Mbytes + Step Temp c_rot E_pair TotEng Press + 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 + 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 + 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 + 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 + 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 + 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 + 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 + 700 2.9593679 2.8231211 -0.40051715 2.5292571 1.1630889 + 800 2.7632972 2.9060854 -0.52075351 2.2149107 0.7710678 + 900 2.9905597 2.8869667 -0.49099378 2.4696603 0.69616841 + 1000 2.8470138 2.9005012 -0.51282088 2.3057228 0.68817567 +Loop time of 0.192737 on 1 procs for 1000 steps with 100 atoms + +Performance: 2241395.423 tau/day, 5188.415 timesteps/s, 518.842 katom-step/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.17225 | 0.17225 | 0.17225 | 0.0 | 89.37 +Neigh | 0.0025287 | 0.0025287 | 0.0025287 | 0.0 | 1.31 +Comm | 0.0023396 | 0.0023396 | 0.0023396 | 0.0 | 1.21 +Output | 0.00025405 | 0.00025405 | 0.00025405 | 0.0 | 0.13 +Modify | 0.013955 | 0.013955 | 0.013955 | 0.0 | 7.24 +Other | | 0.001413 | | | 0.73 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 77 ave 77 max 77 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 369 ave 369 max 369 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 369 +Ave neighs/atom = 3.69 +Neighbor list builds = 174 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 120.0 +Lattice spacing in x,y,z = 0.091287093 0.091287093 0.091287093 +create_atoms 2 region plane +Created 85849 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.015 seconds + +set type 2 mass 0.01 +Setting atom values ... + 85849 settings made for mass +group small type 2 +85849 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 2.0 + +neigh_modify one 10000 + +delete_atoms overlap 1.6 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 20 20 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 71060 atoms, new total = 14889 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.0005 + +fix 1 big nve/asphere +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/asphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all custom 1000 dump.ellipsoid id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +#dump 2 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 2 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14789 100 + big particle diameter max/min = 3 1 + SRD temperature & lamda = 1 0.1 + SRD max distance & max velocity = 0.4 40 + SRD grid counts: 107 107 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24977686 0.24977686 2.6726124 + SRD per actual grid cell = 1.9275711 + SRD viscosity = 0.68810145 + big/SRD mass density ratio = 1.3736715 + # of rescaled SRD velocities = 0 + ave/max small velocity = 13.30933 24.335888 + ave/max big velocity = 2.0802836 5.05672 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 26.726124, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 43.23 | 43.23 | 43.23 Mbytes + Step Temp c_rot f_2[9] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 2.9005012 2.9005012 0 0.025582147 -0.51282088 3.8089259 0.8986241 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 2.1884096 2.1884096 0.81792923 0.016786763 -0.7613492 2.4993811 1.1765894 13834 35 35 0 241 38416 11449 4172 0.81792923 16 50 0 + 2000 1.2708697 1.2708697 0.90821156 0.0069438942 -0.8597194 1.0338764 0.9801188 14658 35 35 0 372 38416 11449 4281 0.90821156 16 50 0 + 3000 1.1130928 1.1130928 0.9590586 0.0052557024 -0.8759868 0.78252152 0.70461705 15267 28 28 0 519 38416 11449 4292 0.9590586 16 50 0 + 4000 0.8649005 0.8649005 0.9947477 0.0026217985 -0.89834217 0.39035958 0.77420962 15681 36 36 0 698 38416 11449 4339 0.9947477 16 50 0 + 5000 1.1743692 1.1743692 0.98116608 0.0069116456 -0.72073526 1.0290749 0.8829165 15974 37 37 0 881 38416 11449 4328 0.98116608 16 50 0 + 6000 1.0190814 1.0190814 1.0138428 0.0048088112 -0.80244733 0.7159839 0.79743882 16092 36 36 0 1090 38416 11449 4319 1.0138428 16 50 0 + 7000 1.0824823 1.0824823 1.0415165 0.0049127988 -0.88143205 0.73146661 0.48157537 16178 46 46 0 1328 38416 11449 4370 1.0415165 23 50 0 + 8000 1.0482457 1.0482457 1.0336952 0.0051802902 -0.79059275 0.7712934 0.75744414 16622 33 33 0 1579 38416 11449 4340 1.0336952 24 50 0 + 9000 0.98889815 0.98889815 1.0126005 0.00397567 -0.88152073 0.59193751 0.52056685 16877 41 41 0 1811 38416 11449 4370 1.0126005 27 50 0 + 10000 0.96559538 0.96559538 1.0234124 0.0045683795 -0.7585511 0.68018602 0.70666049 16833 32 32 0 2038 38416 11449 4330 1.0234124 27 50 0 +Loop time of 9.04639 on 1 procs for 10000 steps with 14889 atoms + +Performance: 47753.873 tau/day, 1105.414 timesteps/s, 16.459 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.862 | 1.862 | 1.862 | 0.0 | 20.58 +Neigh | 0.018395 | 0.018395 | 0.018395 | 0.0 | 0.20 +Comm | 0.060502 | 0.060502 | 0.060502 | 0.0 | 0.67 +Output | 0.00092704 | 0.00092704 | 0.00092704 | 0.0 | 0.01 +Modify | 7.0482 | 7.0482 | 7.0482 | 0.0 | 77.91 +Other | | 0.05636 | | | 0.62 + +Nlocal: 14889 ave 14889 max 14889 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 79 ave 79 max 79 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 416 ave 416 max 416 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 416 +Ave neighs/atom = 0.02794009 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.4 b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.4 new file mode 100644 index 0000000000..7a4f323cfe --- /dev/null +++ b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.g++.4 @@ -0,0 +1,346 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - ellipsoids + +units lj +atom_style ellipsoid +atom_modify first big +dimension 2 + +# create big ellipsoidal particles + +lattice sq 0.14 +Lattice spacing in x,y,z = 2.6726124 2.6726124 2.6726124 +region box block 0 10 0 10 -0.5 0.5 +create_box 2 box +Created orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + 2 by 2 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 100 settings made for mass +set type 1 shape 3.0 1.0 1.0 +Setting atom values ... + 100 settings made for shape +group big type 1 +100 atoms in group big +set group big quat/random 29898 +Setting atom values ... + 100 settings made for quat/random + +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve/asphere +fix 2 all enforce2d + +compute rot big temp/asphere +compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez + +#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +thermo_style custom step temp c_rot epair etotal press +thermo 100 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- pair gayberne command: doi:10.1063/1.3058435 + +@Article{Brown09, + author = {W. M. Brown and M. K. Petersen and S. J. Plimpton and G. S. Grest}, + title = {Liquid Crystal Nanodroplets in Solution}, + journal = {J.~Chem.\ Phys.}, + year = 2009, + volume = 130, + number = 4, + pages = {044901} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 13 13 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.61 | 4.61 | 4.61 Mbytes + Step Temp c_rot E_pair TotEng Press + 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 + 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 + 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 + 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 + 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 + 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 + 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 + 700 2.9593679 2.8231211 -0.40051715 2.5292571 1.1630889 + 800 2.7632972 2.9060855 -0.52075354 2.2149107 0.77106773 + 900 2.9905599 2.8869667 -0.49099386 2.4696604 0.69616823 + 1000 2.8470131 2.9005016 -0.51282147 2.3057215 0.68817329 +Loop time of 0.0666302 on 4 procs for 1000 steps with 100 atoms + +Performance: 6483542.632 tau/day, 15008.201 timesteps/s, 1.501 Matom-step/s +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.039208 | 0.042833 | 0.045871 | 1.2 | 64.29 +Neigh | 0.00065929 | 0.00071982 | 0.00076852 | 0.0 | 1.08 +Comm | 0.013998 | 0.017169 | 0.02087 | 1.9 | 25.77 +Output | 0.00018817 | 0.00020663 | 0.00025962 | 0.0 | 0.31 +Modify | 0.0035046 | 0.0035933 | 0.003701 | 0.1 | 5.39 +Other | | 0.002109 | | | 3.16 + +Nlocal: 25 ave 27 max 24 min +Histogram: 2 0 0 1 0 0 0 0 0 1 +Nghost: 42.25 ave 45 max 38 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Neighs: 92.25 ave 104 max 85 min +Histogram: 1 0 1 1 0 0 0 0 0 1 + +Total # of neighbors = 369 +Ave neighs/atom = 3.69 +Neighbor list builds = 174 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 120.0 +Lattice spacing in x,y,z = 0.091287093 0.091287093 0.091287093 +create_atoms 2 region plane +Created 85849 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.004 seconds + +set type 2 mass 0.01 +Setting atom values ... + 85849 settings made for mass +group small type 2 +85849 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 2.0 + +neigh_modify one 10000 + +delete_atoms overlap 1.6 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 20 20 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 71060 atoms, new total = 14889 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.0005 + +fix 1 big nve/asphere +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/asphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all custom 1000 dump.ellipsoid id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +#dump 2 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 2 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14789 100 + big particle diameter max/min = 3 1 + SRD temperature & lamda = 1 0.1 + SRD max distance & max velocity = 0.4 40 + SRD grid counts: 107 107 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24977686 0.24977686 2.6726124 + SRD per actual grid cell = 1.9275711 + SRD viscosity = 0.68810145 + big/SRD mass density ratio = 1.3736715 + # of rescaled SRD velocities = 0 + ave/max small velocity = 13.30933 24.335888 + ave/max big velocity = 2.080284 5.0567191 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 26.726124, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 16.89 | 16.9 | 16.91 Mbytes + Step Temp c_rot f_2[9] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 2.9005016 2.9005016 0 0.025582147 -0.51282147 3.8089259 0.89862191 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 2.7138279 2.7138279 0.82437872 0.023781703 -0.50274582 3.5408578 1.6816604 13758 32 34 0 274 66564 11449 4238 0.82437872 24 50 0 + 2000 1.3183118 1.3183118 0.91362053 0.0077748292 -0.80669023 1.1575943 1.1678425 14118 23 23 0 414 66564 11449 4269 0.91362053 24 50 0 + 3000 1.3117991 1.3117991 0.96889539 0.0065133847 -0.98480276 0.96977785 0.51801823 14675 35 36 0 588 66564 11449 4291 0.96889539 26 50 0 + 4000 1.1034132 1.1034132 0.95899765 0.0042496304 -1.0113582 0.63272747 0.6382343 15146 38 38 0 776 66564 11449 4309 0.95899765 26 50 0 + 5000 1.0814177 1.0814177 1.0037423 0.0047549676 -0.90334518 0.70796713 0.76138491 15275 40 40 0 973 66564 11449 4285 1.0037423 26 50 0 + 6000 1.0515425 1.0515425 0.98728204 0.0041039749 -0.95575757 0.61104083 0.61253791 15685 34 34 0 1205 66564 11449 4328 0.98728204 26 50 0 + 7000 0.96229389 0.96229389 1.0146054 0.0031968892 -0.95783307 0.47598483 0.4469161 15944 43 43 0 1412 66564 11449 4391 1.0146054 27 50 0 + 8000 0.98798058 0.98798058 0.99692702 0.0037348841 -0.91600418 0.55608689 0.50558822 16250 43 43 0 1637 66564 11449 4330 0.99692702 27 50 0 + 9000 1.0120554 1.0120554 1.0099521 0.0039518454 -0.91957229 0.58839026 0.4092229 16367 43 44 0 1899 66564 11449 4309 1.0099521 27 50 0 + 10000 1.104152 1.104152 0.9993147 0.0053713858 -0.84544079 0.79974564 0.5119979 16331 50 50 0 2108 66564 11449 4353 0.9993147 27 50 0 +Loop time of 2.95619 on 4 procs for 10000 steps with 14889 atoms + +Performance: 146134.205 tau/day, 3382.736 timesteps/s, 50.366 Matom-step/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.48773 | 0.52727 | 0.62879 | 8.1 | 17.84 +Neigh | 0.0070094 | 0.0072204 | 0.0076255 | 0.3 | 0.24 +Comm | 0.12898 | 0.22553 | 0.265 | 11.8 | 7.63 +Output | 0.0005957 | 0.00064777 | 0.00075264 | 0.0 | 0.02 +Modify | 2.1317 | 2.1512 | 2.166 | 0.9 | 72.77 +Other | | 0.04427 | | | 1.50 + +Nlocal: 3722.25 ave 3968 max 3389 min +Histogram: 1 0 0 0 1 0 0 0 1 1 +Nghost: 39.75 ave 44 max 35 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 101 ave 125 max 86 min +Histogram: 1 0 1 1 0 0 0 0 0 1 + +Total # of neighbors = 404 +Ave neighs/atom = 0.027134126 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.1 b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.1 new file mode 100644 index 0000000000..d7d2b9831f --- /dev/null +++ b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.1 @@ -0,0 +1,347 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - ellipsoids + +units lj +atom_style ellipsoid +atom_modify first big +dimension 2 + +# create big ellipsoidal particles + +lattice sq 0.14 +Lattice spacing in x,y,z = 2.6726124 2.6726124 2.6726124 +region box block 0 10 0 10 -0.5 0.5 +create_box 2 box +Created orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.000 seconds + +set type 1 mass 1.0 +Setting atom values ... + 100 settings made for mass +set type 1 shape 3.0 1.0 1.0 +Setting atom values ... + 100 settings made for shape +group big type 1 +100 atoms in group big +set group big quat/random 29898 +Setting atom values ... + 100 settings made for quat/random + +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve/asphere +fix 2 all enforce2d + +compute rot big temp/asphere +compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez + +#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +thermo_style custom step temp c_rot epair etotal press +thermo 100 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- pair gayberne command: doi:10.1063/1.3058435 + +@Article{Brown09, + author = {W. M. Brown and M. K. Petersen and S. J. Plimpton and G. S. Grest}, + title = {Liquid Crystal Nanodroplets in Solution}, + journal = {J.~Chem.\ Phys.}, + year = 2009, + volume = 130, + number = 4, + pages = {044901} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 13 13 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.611 | 4.611 | 4.611 Mbytes + Step Temp c_rot E_pair TotEng Press + 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 + 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 + 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 + 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 + 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 + 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 + 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 + 700 2.9593679 2.8231211 -0.40051715 2.5292571 1.1630889 + 800 2.7632972 2.9060854 -0.52075351 2.2149107 0.7710678 + 900 2.9905597 2.8869667 -0.49099378 2.4696603 0.69616841 + 1000 2.8470138 2.9005012 -0.51282088 2.3057228 0.68817567 +Loop time of 0.192844 on 1 procs for 1000 steps with 100 atoms + +Performance: 2240155.241 tau/day, 5185.545 timesteps/s, 518.554 katom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.17225 | 0.17225 | 0.17225 | 0.0 | 89.32 +Neigh | 0.0025614 | 0.0025614 | 0.0025614 | 0.0 | 1.33 +Comm | 0.0024746 | 0.0024746 | 0.0024746 | 0.0 | 1.28 +Output | 0.0001406 | 0.0001406 | 0.0001406 | 0.0 | 0.07 +Modify | 0.014112 | 0.014112 | 0.014112 | 0.0 | 7.32 +Other | | 0.001306 | | | 0.68 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 77 ave 77 max 77 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 369 ave 369 max 369 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 369 +Ave neighs/atom = 3.69 +Neighbor list builds = 174 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 120.0 +Lattice spacing in x,y,z = 0.091287093 0.091287093 0.091287093 +create_atoms 2 region plane +Created 85849 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.015 seconds + +set type 2 mass 0.01 +Setting atom values ... + 85849 settings made for mass +group small type 2 +85849 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 2.0 + +neigh_modify one 10000 + +delete_atoms overlap 1.6 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 20 20 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 71060 atoms, new total = 14889 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.0005 + +fix 1 big nve/asphere +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 +fix 3 small viscosity 20 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/asphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all custom 500 dump.ellipsoid id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14789 100 + big particle diameter max/min = 3 1 + SRD temperature & lamda = 1 0.1 + SRD max distance & max velocity = 0.4 40 + SRD grid counts: 107 107 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24977686 0.24977686 2.6726124 + SRD per actual grid cell = 1.9275711 + SRD viscosity = 0.68810145 + big/SRD mass density ratio = 1.3736715 + # of rescaled SRD velocities = 0 + ave/max small velocity = 13.30933 24.335888 + ave/max big velocity = 2.0802836 5.05672 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 26.726124, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 43.23 | 43.23 | 43.23 Mbytes + Step Temp c_rot f_2[9] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 2.9005012 2.9005012 0 0.025582147 -0.51282088 3.8089259 0.8986241 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 2.3102693 2.3102693 0.82371999 0.019779507 -0.49733043 2.9449709 1.9807143 13954 30 30 0 277 38416 11449 4255 0.82371999 15 50 0 + 2000 1.5312119 1.5312119 0.90846884 0.008532096 -1.011162 1.2703438 0.58038663 14523 37 37 0 439 38416 11449 4257 0.90846884 20 50 0 + 3000 1.3603443 1.3603443 0.95241399 0.0085403252 -0.75534393 1.271569 1.2262133 14864 34 35 0 599 38416 11449 4287 0.95241399 20 50 0 + 4000 2.2408861 2.2408861 0.99089404 0.016876315 -0.82620566 2.5127146 1.2664088 15457 35 35 0 809 38416 11449 4272 0.99089404 21 50 0 + 5000 1.7110067 1.7110067 0.99729333 0.011146301 -0.88982716 1.6595728 0.97334407 15555 36 36 0 1026 38416 11449 4324 0.99729333 24 50 0 + 6000 1.684666 1.684666 1.0235606 0.009751253 -1.0582882 1.4518641 0.62435255 15752 45 46 0 1256 38416 11449 4303 1.0235606 24 50 0 + 7000 2.1142261 2.1142261 1.0160206 0.014786886 -0.94857757 2.2016194 0.7761903 16144 30 30 0 1492 38416 11449 4401 1.0160206 27 50 0 + 8000 2.5622926 2.5622926 1.0125365 0.019933518 -0.84991443 2.9679015 0.93716383 16302 43 43 0 1720 38416 11449 4346 1.0125365 27 50 0 + 9000 2.6593623 2.6593623 1.0110535 0.020725053 -0.87669675 3.0857531 0.97818336 16856 44 44 0 2000 38416 11449 4298 1.0110535 30 50 0 + 10000 2.7567851 2.7567851 1.0379053 0.021598993 -0.8917358 3.2158741 0.74950846 16770 50 53 0 2284 38416 11449 4316 1.0379053 30 50 0 +Loop time of 9.02679 on 1 procs for 10000 steps with 14889 atoms + +Performance: 47857.551 tau/day, 1107.814 timesteps/s, 16.494 Matom-step/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.8454 | 1.8454 | 1.8454 | 0.0 | 20.44 +Neigh | 0.018708 | 0.018708 | 0.018708 | 0.0 | 0.21 +Comm | 0.059853 | 0.059853 | 0.059853 | 0.0 | 0.66 +Output | 0.00081453 | 0.00081453 | 0.00081453 | 0.0 | 0.01 +Modify | 7.0469 | 7.0469 | 7.0469 | 0.0 | 78.07 +Other | | 0.05507 | | | 0.61 + +Nlocal: 14889 ave 14889 max 14889 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 75 ave 75 max 75 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 382 ave 382 max 382 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 382 +Ave neighs/atom = 0.025656525 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.4 b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.4 new file mode 100644 index 0000000000..b5a10d0871 --- /dev/null +++ b/examples/ASPHERE/ellipsoid/log.1Feb24.ellipsoid.mp.g++.4 @@ -0,0 +1,347 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - ellipsoids + +units lj +atom_style ellipsoid +atom_modify first big +dimension 2 + +# create big ellipsoidal particles + +lattice sq 0.14 +Lattice spacing in x,y,z = 2.6726124 2.6726124 2.6726124 +region box block 0 10 0 10 -0.5 0.5 +create_box 2 box +Created orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + 2 by 2 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 100 settings made for mass +set type 1 shape 3.0 1.0 1.0 +Setting atom values ... + 100 settings made for shape +group big type 1 +100 atoms in group big +set group big quat/random 29898 +Setting atom values ... + 100 settings made for quat/random + +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve/asphere +fix 2 all enforce2d + +compute rot big temp/asphere +compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez + +#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +thermo_style custom step temp c_rot epair etotal press +thermo 100 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- pair gayberne command: doi:10.1063/1.3058435 + +@Article{Brown09, + author = {W. M. Brown and M. K. Petersen and S. J. Plimpton and G. S. Grest}, + title = {Liquid Crystal Nanodroplets in Solution}, + journal = {J.~Chem.\ Phys.}, + year = 2009, + volume = 130, + number = 4, + pages = {044901} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 13 13 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.61 | 4.61 | 4.61 Mbytes + Step Temp c_rot E_pair TotEng Press + 0 1.44 0.95677852 2.7038078 4.1294078 10.518912 + 100 2.5524145 2.801098 -0.37027046 2.1566199 0.84703874 + 200 2.6266386 2.7938164 -0.35322565 2.2471465 1.004886 + 300 2.9987557 2.9499545 -0.58917376 2.3795944 0.73081788 + 400 2.8557446 2.8208128 -0.39904801 2.4281391 0.91808964 + 500 2.4399047 2.8255746 -0.40056447 2.0149412 1.0538908 + 600 2.854258 2.9166789 -0.53424483 2.2914706 0.8117508 + 700 2.9593679 2.8231211 -0.40051715 2.5292571 1.1630889 + 800 2.7632972 2.9060855 -0.52075354 2.2149107 0.77106773 + 900 2.9905599 2.8869667 -0.49099386 2.4696604 0.69616823 + 1000 2.8470131 2.9005016 -0.51282147 2.3057215 0.68817329 +Loop time of 0.0905036 on 4 procs for 1000 steps with 100 atoms + +Performance: 4773291.472 tau/day, 11049.286 timesteps/s, 1.105 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.039039 | 0.053443 | 0.065528 | 5.0 | 59.05 +Neigh | 0.00068257 | 0.00086692 | 0.0010442 | 0.0 | 0.96 +Comm | 0.016567 | 0.028689 | 0.043189 | 6.8 | 31.70 +Output | 0.00016989 | 0.00018594 | 0.0002316 | 0.0 | 0.21 +Modify | 0.0035809 | 0.0043052 | 0.0050755 | 1.0 | 4.76 +Other | | 0.003013 | | | 3.33 + +Nlocal: 25 ave 27 max 24 min +Histogram: 2 0 0 1 0 0 0 0 0 1 +Nghost: 42.25 ave 45 max 38 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Neighs: 92.25 ave 104 max 85 min +Histogram: 1 0 1 1 0 0 0 0 0 1 + +Total # of neighbors = 369 +Ave neighs/atom = 3.69 +Neighbor list builds = 174 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 120.0 +Lattice spacing in x,y,z = 0.091287093 0.091287093 0.091287093 +create_atoms 2 region plane +Created 85849 atoms + using lattice units in orthogonal box = (0 0 -1.3363062) to (26.726124 26.726124 1.3363062) + create_atoms CPU = 0.007 seconds + +set type 2 mass 0.01 +Setting atom values ... + 85849 settings made for mass +group small type 2 +85849 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 2.0 + +neigh_modify one 10000 + +delete_atoms overlap 1.6 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 20 20 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 71060 atoms, new total = 14889 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style gayberne 1.0 3.0 1.0 4.0 +pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1 +pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0 +pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.0005 + +fix 1 big nve/asphere +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 collision noslip search 0.2 inside ignore exact no bounce 50 +fix 3 small viscosity 20 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/asphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all custom 500 dump.ellipsoid id type x y z c_0[*] +#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk # colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14789 100 + big particle diameter max/min = 3 1 + SRD temperature & lamda = 1 0.1 + SRD max distance & max velocity = 0.4 40 + SRD grid counts: 107 107 1 + SRD grid size: request, actual (xyz) = 0.25, 0.24977686 0.24977686 2.6726124 + SRD per actual grid cell = 1.9275711 + SRD viscosity = 0.68810145 + big/SRD mass density ratio = 1.3736715 + # of rescaled SRD velocities = 0 + ave/max small velocity = 13.30933 24.335888 + ave/max big velocity = 2.080284 5.0567191 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 26.726124, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gayberne, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 16.89 | 16.9 | 16.91 Mbytes + Step Temp c_rot f_2[9] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 2.9005016 2.9005016 0 0.025582147 -0.51282147 3.8089259 0.89862191 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 2.5269102 2.5269102 0.8207596 0.022784455 -0.37271861 3.3923775 2.0963085 13925 34 34 0 322 66564 11449 4235 0.8207596 24 50 0 + 2000 1.3685596 1.3685596 0.89115879 0.0089112146 -0.71236311 1.3267907 1.3970875 14444 25 25 0 454 66564 11449 4278 0.89115879 25 50 0 + 3000 1.5234001 1.5234001 0.9828293 0.0090168318 -0.92735003 1.3425161 0.70104224 14946 37 37 0 608 66564 11449 4331 0.9828293 27 50 0 + 4000 2.2536932 2.2536932 0.97648579 0.017005211 -0.82609701 2.5319058 1.190307 15428 43 43 0 827 66564 11449 4346 0.97648579 32 50 0 + 5000 1.8106358 1.8106358 1.0143347 0.012032652 -0.90630586 1.7915415 0.83451531 15438 26 26 0 1039 66564 11449 4314 1.0143347 32 50 0 + 6000 1.9880605 1.9880605 1.0142917 0.013767418 -0.91237924 2.0498309 0.87383026 15688 37 37 0 1279 66564 11449 4353 1.0142917 32 50 0 + 7000 2.4772098 2.4772098 0.99457682 0.018062012 -1.0017896 2.689253 0.74369504 15723 38 38 0 1521 66564 11449 4293 0.99457682 32 50 0 + 8000 2.5749419 2.5749419 1.0337514 0.019908918 -0.87242464 2.9642389 1.0460672 15932 33 34 0 1805 66564 11449 4320 1.0337514 32 50 0 + 9000 2.4877578 2.4877578 1.0366259 0.019125113 -0.85922105 2.847538 0.95616808 16292 52 53 0 2099 66564 11449 4291 1.0366259 33 50 0 + 10000 2.8498311 2.8498311 1.0117104 0.022669267 -0.87102125 3.3752271 0.98313087 16736 38 38 0 2415 66564 11449 4366 1.0117104 35 50 0 +Loop time of 3.0339 on 4 procs for 10000 steps with 14889 atoms + +Performance: 142390.919 tau/day, 3296.086 timesteps/s, 49.075 Matom-step/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.46168 | 0.52303 | 0.69055 | 13.4 | 17.24 +Neigh | 0.0068493 | 0.0072892 | 0.0081958 | 0.6 | 0.24 +Comm | 0.12806 | 0.2911 | 0.34961 | 17.5 | 9.59 +Output | 0.00055286 | 0.00057977 | 0.00065772 | 0.0 | 0.02 +Modify | 2.1454 | 2.1674 | 2.1833 | 0.9 | 71.44 +Other | | 0.04447 | | | 1.47 + +Nlocal: 3722.25 ave 4163 max 3210 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 46.25 ave 49 max 43 min +Histogram: 1 0 0 1 0 0 0 0 1 1 +Neighs: 102.5 ave 143 max 79 min +Histogram: 2 0 0 0 1 0 0 0 0 1 + +Total # of neighbors = 410 +Ave neighs/atom = 0.027537108 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/ASPHERE/line/in.line b/examples/ASPHERE/line/in.line index 815eacfa35..f4c672f19c 100644 --- a/examples/ASPHERE/line/in.line +++ b/examples/ASPHERE/line/in.line @@ -1,44 +1,44 @@ # Aspherical shear demo - 2d line box and triangle mixture, implicit solvent -units lj -atom_style line -dimension 2 +units lj +atom_style line +dimension 2 -read_data data.line +read_data data.line -velocity all create 1.44 320984 loop geom +velocity all create 1.44 320984 loop geom -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -neigh_modify exclude molecule/intra all +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude molecule/intra all -pair_style line/lj 2.5 -pair_coeff * * 1.0 1.0 1.0 0.25 2.5 +pair_style line/lj 2.5 +pair_coeff * * 1.0 1.0 1.0 0.25 2.5 -fix 2 all rigid molecule langevin 2.0 2.0 1.0 492983 +fix 2 all rigid molecule langevin 2.0 2.0 1.0 492983 -fix 3 all deform 1 x scale 0.3 y scale 0.3 -fix 4 all enforce2d +fix 3 all deform 1 x scale 0.3 y scale 0.3 +fix 4 all enforce2d -compute 10 all property/atom end1x end1y end2x end2y +compute 10 all property/atom end1x end1y end2x end2y -#dump 1 all custom 500 dump1.atom id type x y z ix iy iz -#dump 2 all custom 500 dump1.line id type & -# c_10[1] c_10[2] c_10[3] c_10[4] +#dump 1 all custom 500 dump1.atom id type x y z ix iy iz +#dump 2 all custom 500 dump1.line id type & +# c_10[1] c_10[2] c_10[3] c_10[4] -timestep 0.004 +timestep 0.004 -compute 1 all erotate/asphere -compute 2 all ke -compute 3 all pe -variable toteng equal (c_1+c_2+c_3)/atoms +compute 1 all erotate/asphere +compute 2 all ke +compute 3 all pe +variable toteng equal (c_1+c_2+c_3)/atoms compute_modify thermo_temp extra/dof -350 -thermo 1000 -thermo_style custom step f_2 pe ke c_1 c_2 c_3 v_toteng +thermo 1000 +thermo_style custom step f_2 pe ke c_1 c_2 c_3 v_toteng -run 10000 +run 10000 #undump 1 #undump 2 @@ -46,10 +46,10 @@ unfix 3 change_box all triclinic -#dump 1 all custom 500 dump2.atom id type x y z ix iy iz -#dump 2 all custom 500 dump2.line id type & -# c_10[1] c_10[2] c_10[3] c_10[4] +#dump 1 all custom 500 dump2.atom id type x y z ix iy iz +#dump 2 all custom 500 dump2.line id type & +# c_10[1] c_10[2] c_10[3] c_10[4] -fix 3 all deform 1 xy erate 0.01 units box +fix 3 all deform 1 xy erate 0.01 units box -run 100000 +run 10000 diff --git a/examples/ASPHERE/line/in.line.srd b/examples/ASPHERE/line/in.line.srd index a32bde0b76..6a99ce6bb1 100644 --- a/examples/ASPHERE/line/in.line.srd +++ b/examples/ASPHERE/line/in.line.srd @@ -1,107 +1,107 @@ # Aspherical shear demo - 2d line boxes, solvated by SRD particles -units lj -atom_style line -atom_modify first big -dimension 2 +units lj +atom_style line +atom_modify first big +dimension 2 -read_data data.line.srd +read_data data.line.srd # add small particles as hi density lattice -lattice sq 0.4 -region plane block INF INF INF INF -0.001 0.001 -lattice sq 10.0 -create_atoms 2 region plane +lattice sq 0.4 +region plane block INF INF INF INF -0.001 0.001 +lattice sq 10.0 +create_atoms 2 region plane -group big type 1 -group small type 2 -set group small mass 0.01 +group big type 1 +group small type 2 +set group small mass 0.01 # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 1.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 +pair_style lj/cut 1.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 -delete_atoms overlap 1.5 small big +delete_atoms overlap 1.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -velocity small create 1.44 87287 loop geom +velocity small create 1.44 87287 loop geom -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes -neigh_modify exclude molecule/intra big include big +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes +neigh_modify exclude molecule/intra big include big -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style line/lj 2.5 -pair_coeff 1 1 1.0 1.0 1.0 1.0 2.5 -pair_coeff 2 2 0.0 0.0 0.0 1.0 0.0 -pair_coeff 1 2 1.0 0.0 0.0 1.0 0.0 +pair_style line/lj 2.5 +pair_coeff 1 1 1.0 1.0 1.0 1.0 2.5 +pair_coeff 2 2 0.0 0.0 0.0 1.0 0.0 +pair_coeff 1 2 1.0 0.0 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid molecule -fix 2 small srd 20 big 1.0 0.25 49894 & - search 0.2 cubic warn 0.0001 shift yes 49829 & - overlap yes collision noslip +fix 1 big rigid molecule +fix 2 small srd 20 big 1.0 0.25 49894 & + search 0.2 cubic warn 0.0001 shift yes 49829 & + overlap yes collision noslip -fix 3 all deform 1 x scale 0.35 y scale 0.35 -fix 4 all enforce2d +fix 3 all deform 1 x scale 0.35 y scale 0.35 +fix 4 all enforce2d # diagnostics -compute tsmall small temp/deform -compute tbig big temp -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) +compute tsmall small temp/deform +compute tbig big temp +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) compute_modify tbig extra/dof -350 -compute 1 big erotate/asphere -compute 2 all ke -compute 3 all pe -variable toteng equal (c_1+c_2+c_3)/atoms +compute 1 big erotate/asphere +compute 2 all ke +compute 3 all pe +variable toteng equal (c_1+c_2+c_3)/atoms -thermo 1000 -thermo_style custom step c_tsmall f_2[9] c_1 etotal & - v_pebig v_ebig press -thermo_modify temp tbig +thermo 1000 +thermo_style custom step c_tsmall f_2[9] c_1 etotal & + v_pebig v_ebig press +thermo_modify temp tbig -compute 10 big property/atom end1x end1y end2x end2y +compute 10 big property/atom end1x end1y end2x end2y -#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump1.line.srd id type & -# c_10[1] c_10[2] c_10[3] c_10[4] +#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump1.line.srd id type & +# c_10[1] c_10[2] c_10[3] c_10[4] -run 10000 +run 10000 #undump 1 #undump 2 -unfix 3 +unfix 3 change_box all triclinic -fix 2 small srd 20 big 1.0 0.25 49894 & - search 0.2 cubic warn 0.0001 shift yes 49829 & - overlap yes collision noslip tstat yes +fix 2 small srd 20 big 1.0 0.25 49894 & + search 0.2 cubic warn 0.0001 shift yes 49829 & + overlap yes collision noslip tstat yes -#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump2.line.srd id type & -# c_10[1] c_10[2] c_10[3] c_10[4] +#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump2.line.srd id type & +# c_10[1] c_10[2] c_10[3] c_10[4] -fix 3 all deform 1 xy erate 0.05 units box remap v +fix 3 all deform 1 xy erate 0.05 units box remap v -run 40000 +run 40000 diff --git a/examples/ASPHERE/poly/in.poly b/examples/ASPHERE/poly/in.poly index 68bd2a6bbc..41bec14075 100644 --- a/examples/ASPHERE/poly/in.poly +++ b/examples/ASPHERE/poly/in.poly @@ -1,114 +1,114 @@ # SRD diffusion demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -fix 1 big nve -fix 2 all enforce2d +fix 1 big nve +fix 2 all enforce2d -#dump 1 all atom 10 dump.poly.equil +#dump 1 all atom 10 dump.poly.equil -run 1000 +run 1000 -#undump 1 -unfix 1 -unfix 2 +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & search 0.2 inside ignore -fix 3 all enforce2d +fix 3 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.poly +#dump 1 all atom 1000 dump.poly -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 100000 +run 10000 diff --git a/examples/ASPHERE/poly/in.poly.mp b/examples/ASPHERE/poly/in.poly.mp index 8fa5d24a55..259ef2ab48 100644 --- a/examples/ASPHERE/poly/in.poly.mp +++ b/examples/ASPHERE/poly/in.poly.mp @@ -1,115 +1,115 @@ # SRD viscosity demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -fix 1 big nve -fix 2 all enforce2d +fix 1 big nve +fix 2 all enforce2d -#dump 1 all atom 10 dump.poly.equil +#dump 1 all atom 10 dump.poly.equil -run 1000 +run 1000 -#undump 1 -unfix 1 -unfix 2 +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 inside ignore -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 inside ignore +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 500 dump.poly.mp +#dump 1 all atom 500 dump.poly.mp -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 50000 +run 10000 diff --git a/examples/ASPHERE/poly/log.1Feb14.poly.g++.8 b/examples/ASPHERE/poly/log.1Feb14.poly.g++.8 deleted file mode 100644 index 7a145a73db..0000000000 --- a/examples/ASPHERE/poly/log.1Feb14.poly.g++.8 +++ /dev/null @@ -1,288 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD diffusion demo - poydisperse spheres - -units lj -atom_style sphere -atom_modify first big -dimension 2 - -# create big particles with 3 different types and diameters - -lattice sq 0.3 -Lattice spacing in x,y,z = 1.82574 1.82574 1.82574 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -Created orthogonal box = (0 0 -0.912871) to (18.2574 18.2574 0.912871) - 2 by 4 by 1 MPI processor grid -create_atoms 1 region box -Created 100 atoms - -group big type 1 -100 atoms in group big -set group big type/fraction 2 0.33 394895 - 35 settings made for type/fraction -set group big type/fraction 3 0.5 989894 - 57 settings made for type/fraction -group big type 2 3 -100 atoms in group big - -set type 1*3 mass 1.0 - 100 settings made for mass -velocity big create 1.44 87287 loop geom - -# equilibrate big particles, repulsive only to prevent aggregation - -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big nve -fix 2 all enforce2d - -#dump 1 all atom 10 dump.poly.equil - -run 1000 -Memory usage per processor = 2.7472 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -0.16013916 0 1.2654608 1.1298975 - 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 -Loop time of 0.0221665 on 8 procs for 1000 steps with 100 atoms - -Pair time (%) = 0.000323534 (1.45957) -Neigh time (%) = 0.000274181 (1.23692) -Comm time (%) = 0.0146933 (66.2864) -Outpt time (%) = 2.864e-05 (0.129204) -Other time (%) = 0.00684676 (30.8879) - -Nlocal: 12.5 ave 18 max 10 min -Histogram: 1 3 1 1 0 1 0 0 0 1 -Nghost: 27.75 ave 31 max 24 min -Histogram: 1 0 1 0 2 2 0 0 0 2 -Neighs: 19 ave 30 max 16 min -Histogram: 4 1 2 0 0 0 0 0 0 1 - -Total # of neighbors = 152 -Ave neighs/atom = 1.52 -Neighbor list builds = 115 -Dangerous builds = 0 - -#undump 1 -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -Lattice spacing in x,y,z = 0.0632456 0.0632456 0.0632456 -create_atoms 4 region plane -Created 83521 atoms - -set type 4 mass 0.1 - 83521 settings made for mass -group small type 4 -83521 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set *-4 cutoffs to non-zero values - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 - -delete_atoms overlap 1.0 small big -Deleted 63410 atoms, new total = 20211 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore -fix 3 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 1000 dump.poly - -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 - -run 100000 -SRD info: - SRD/big particles = 20111 100 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 73 73 1 - SRD grid size: request, actual (xyz) = 0.25, 0.250102 0.250102 1.82574 - SRD per actual grid cell = 4.93717 - SRD viscosity = 0.23322 - big/SRD mass density ratio = 0.161311 -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875) - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.19344 7.74495 - ave/max big velocity = 1.43991 3.5724 -Memory usage per processor = 11.8633 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] - 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 - 1000 0.84607633 3934 0.0065245151 0.058016014 1.3186697 4.2649214 7470 26 26 0 665 36480 5329 3934 0.95810956 0 2 - 2000 0.86586785 3944 0.0045898954 -0.36247933 0.92766376 2.1563866 7786 30 30 0 1374 36480 5329 3944 1.0799777 0 49 - 3000 0.78968677 4001 0.00417319 -0.33318986 0.84344343 1.9302042 7957 34 34 0 2129 36480 5329 4001 1.1247747 0 49 - 4000 0.7110667 4005 0.0031642256 -0.41996775 0.63952164 1.9679689 8188 24 24 0 2925 36480 5329 4005 1.1345941 0 49 - 5000 0.80379425 4052 0.0038912991 -0.41118297 0.78647047 1.6851034 8326 30 30 0 3794 36480 5329 4052 1.1310774 0 49 - 6000 0.96927432 4048 0.0054656969 -0.33954674 1.104672 1.8976158 8380 23 23 0 4643 36480 5329 4048 1.1861264 0 49 - 7000 0.75821666 4050 0.0036201309 -0.39807817 0.73166465 1.6087451 8450 51 51 0 5699 36480 5329 4050 1.1664119 0 49 - 8000 0.8712338 4035 0.0047243103 -0.343308 0.95483036 1.4707918 8458 42 42 0 6974 36480 5329 4035 1.1947807 0 91 - 9000 0.87995969 4048 0.0042778416 -0.44654537 0.86459457 1.5567027 8379 36 36 0 7965 36480 5329 4048 1.1675384 0 91 - 10000 0.83009098 4053 0.0042178709 -0.38436167 0.85247389 1.9119485 8373 34 34 0 8952 36480 5329 4053 1.1933986 0 91 - 11000 0.73595909 4015 0.0037439098 -0.33989742 0.75668162 1.6495307 8333 22 22 0 9983 36480 5329 4015 1.1959519 0 91 - 12000 0.84043443 4034 0.0041823741 -0.40694768 0.84529962 1.5115578 8566 31 31 0 11023 36480 5329 4034 1.2064988 0 91 - 13000 0.64253331 4044 0.0034868675 -0.25264383 0.7047308 1.739124 8528 31 31 0 12101 36480 5329 4044 1.1912336 0 91 - 14000 0.99330171 4042 0.0055047339 -0.36745778 1.1125618 1.8215191 8548 36 36 0 13098 36480 5329 4042 1.1819124 0 91 - 15000 0.90379859 4049 0.0049047446 -0.35536197 0.99129793 1.7159536 8459 37 37 0 14130 36480 5329 4049 1.1806762 0 91 - 16000 0.87446498 4034 0.0053318245 -0.22533777 1.0776151 2.0239395 8690 33 33 0 15176 36480 5329 4034 1.1912858 0 91 - 17000 0.95733995 4035 0.0053759665 -0.33989994 1.0865366 1.6243881 8518 27 27 0 16147 36480 5329 4035 1.2074487 0 91 - 18000 1.03543 4032 0.0052946469 -0.47268961 1.0701011 1.5444562 8464 28 28 0 17230 36480 5329 4032 1.1959755 0 91 - 19000 0.75997582 4051 0.0034371936 -0.43767278 0.6946912 1.4209137 8436 39 39 0 18276 36480 5329 4051 1.182461 0 91 - 20000 0.89615234 4037 0.0048910458 -0.34673773 0.98852926 1.5843879 8433 28 28 0 19275 36480 5329 4037 1.1850673 0 91 - 21000 0.85849578 4063 0.0044978314 -0.37010201 0.9090567 1.5445809 8504 40 40 0 20278 36480 5329 4063 1.1931031 0 91 - 22000 0.79050471 4066 0.0038260812 -0.40456274 0.77328927 1.6214277 8463 44 44 0 21287 36480 5329 4066 1.1948824 0 91 - 23000 0.89563532 4026 0.0051030186 -0.30312555 1.0313711 1.4848223 8548 35 35 0 22422 36480 5329 4026 1.1975081 0 91 - 24000 0.83528717 4036 0.0043136275 -0.37275064 0.87182725 1.5504059 8527 34 34 0 23404 36480 5329 4036 1.1755463 0 91 - 25000 0.64179358 4022 0.0035185741 -0.24513342 0.71113901 1.7238889 8452 47 47 0 24522 36480 5329 4022 1.2066339 0 91 - 26000 0.86710098 4028 0.0046099591 -0.36026164 0.93171883 1.4255297 8734 33 33 0 25524 36480 5329 4028 1.2001233 0 91 - 27000 0.8327003 4054 0.0045323379 -0.32469262 0.91603082 1.2654649 8468 34 34 0 26520 36480 5329 4054 1.1814901 0 91 - 28000 0.84396759 4049 0.0042805934 -0.39236096 0.86515074 1.2929473 8536 37 37 0 27657 36480 5329 4049 1.1897647 0 91 - 29000 0.77639299 4052 0.0038143413 -0.38590904 0.77091652 1.3627099 8637 36 36 0 28773 36480 5329 4052 1.1858017 0 91 - 30000 0.69994805 4046 0.0034430868 -0.34704032 0.69588228 1.5351247 8704 46 46 0 29818 36480 5329 4046 1.1724555 0 91 - 31000 0.73907898 4039 0.003034759 -0.48787254 0.61335514 1.2291035 8486 29 29 0 30848 36480 5329 4039 1.2063852 0 91 - 32000 0.84649298 4052 0.0044326201 -0.36539769 0.89587685 1.4591662 8513 28 28 0 31917 36480 5329 4052 1.1917883 0 91 - 33000 0.7188891 4031 0.0033440675 -0.39527528 0.67586949 1.2495703 8800 37 37 0 32938 36480 5329 4031 1.191087 0 91 - 34000 0.93588921 4054 0.0054112843 -0.30080024 1.0936747 1.3650172 8585 33 33 0 33913 36480 5329 4054 1.1840415 0 91 - 35000 0.86446961 4039 0.0053251497 -0.21179371 1.076266 1.3791947 8607 22 22 0 34865 36480 5329 4039 1.1916342 0 91 - 36000 0.90510006 4011 0.0054168442 -0.2538007 1.0947984 1.5747653 8479 31 31 0 35842 36480 5329 4011 1.1760305 0 91 - 37000 0.95332175 4058 0.0055020495 -0.30843018 1.1120192 1.4326924 8512 29 29 0 36751 36480 5329 4058 1.180738 0 91 - 38000 0.71413841 4043 0.0038380378 -0.2883604 0.77570582 1.4283837 8611 39 39 0 37689 36480 5329 4043 1.1693806 0 91 - 39000 0.81161335 4064 0.0044323475 -0.31348213 0.89582176 1.4378305 8697 28 28 0 38696 36480 5329 4064 1.1987209 0 91 - 40000 0.8294437 4062 0.0051262098 -0.19981285 1.0360583 1.6010501 8559 31 31 0 39743 36480 5329 4062 1.2092371 0 91 - 41000 0.79325147 4079 0.0045273868 -0.26691453 0.91503015 1.4080428 8775 53 53 0 40806 36480 5329 4079 1.1989619 0 91 - 42000 0.95693891 4027 0.005623893 -0.28919396 1.136645 1.5334192 8509 34 34 0 41793 36480 5329 4027 1.1931035 0 91 - 43000 0.66458435 4029 0.0035902162 -0.26461209 0.72561859 1.4253918 8559 44 44 0 42768 36480 5329 4029 1.2111853 0 91 - 44000 0.84442459 4022 0.0050980388 -0.22782802 1.0303646 1.4587515 8522 32 32 0 43812 36480 5329 4022 1.1943268 0 91 - 45000 0.96505326 4051 0.0057148128 -0.28290855 1.1550208 1.3014361 8496 32 32 0 44803 36480 5329 4051 1.1912109 0 91 - 46000 0.75345782 4064 0.0040245838 -0.30924351 0.81340864 1.7179797 8568 29 29 0 45795 36480 5329 4064 1.1975591 0 91 - 47000 0.87187806 4017 0.004406241 -0.40855293 0.89054538 1.3105257 8586 36 36 0 46822 36480 5329 4017 1.1834816 0 91 - 48000 0.83729235 4078 0.0045115864 -0.33572888 0.91183673 1.3856733 8513 38 38 0 47866 36480 5329 4078 1.1996374 0 91 - 49000 0.65112065 4048 0.0030445536 -0.35483503 0.61533473 1.2659451 8705 32 32 0 48907 36480 5329 4048 1.1907782 0 91 - 50000 0.82730473 4066 0.0045492584 -0.31323342 0.91945063 1.1803982 8562 41 41 0 49965 36480 5329 4066 1.1696702 0 91 - 51000 0.74252279 4048 0.0046741422 -0.16166808 0.94469088 1.5539445 8564 35 35 0 50948 36480 5329 4048 1.1748481 0 91 - 52000 0.85671386 4051 0.0058575179 -0.092640701 1.183863 1.6307333 8609 19 19 0 51894 36480 5329 4051 1.1770671 0 91 - 53000 0.7233951 4068 0.0043421658 -0.20026358 0.87759512 1.453924 8582 28 28 0 52893 36480 5329 4068 1.2027667 0 91 - 54000 0.72117217 4051 0.0040247209 -0.26111018 0.81343635 1.3496518 8679 25 25 0 53831 36480 5329 4051 1.1823115 0 91 - 55000 0.87940919 4044 0.0047057065 -0.35924936 0.95107033 1.240057 8559 34 34 0 54813 36480 5329 4044 1.1815144 0 91 - 56000 0.83192698 4044 0.0046298732 -0.30382753 0.93574367 1.547229 8441 37 37 0 55740 36480 5329 4044 1.1761232 0 91 - 57000 0.91043729 4058 0.0050029377 -0.34540782 1.0111437 1.4951603 8550 32 32 0 56678 36480 5329 4058 1.2024504 0 91 - 58000 0.97648852 4036 0.0053292287 -0.37787747 1.0770904 1.4058278 8554 31 31 0 57683 36480 5329 4036 1.1746239 0 91 - 59000 0.72239185 4018 0.0046615138 -0.1342253 0.94213856 1.8337414 8716 35 35 0 58640 36480 5329 4018 1.1697661 0 91 - 60000 0.73800253 4032 0.0037590001 -0.33989225 0.75973152 1.399426 8561 32 32 0 59593 36480 5329 4032 1.1958194 0 91 - 61000 0.72778603 4060 0.0042599892 -0.22341476 0.86098642 1.3778202 8541 31 31 0 60573 36480 5329 4060 1.1980875 0 91 - 62000 0.80350669 4044 0.0042316822 -0.34195968 0.85526529 1.4379455 8487 37 37 0 61608 36480 5329 4044 1.1942365 0 91 - 63000 0.90084181 4066 0.0043040273 -0.47236734 0.86988695 1.4672845 8504 32 32 0 62670 36480 5329 4066 1.1829834 0 91 - 64000 0.87220486 4059 0.0047840275 -0.33268544 0.9668998 1.5398216 8588 34 34 0 63605 36480 5329 4059 1.1884975 0 91 - 65000 0.82469157 4057 0.004405933 -0.33830733 0.89048312 1.5284565 8783 32 32 0 64693 36480 5329 4057 1.1952722 0 91 - 66000 0.88692288 4081 0.0047264561 -0.36625105 0.95526405 1.3151847 8745 36 36 0 65755 36480 5329 4081 1.1834684 0 91 - 67000 0.83322374 4031 0.0047732147 -0.27678896 0.96471442 1.5085732 8415 34 34 0 66796 36480 5329 4031 1.1969 0 91 - 68000 0.75375865 4020 0.0044379413 -0.22614806 0.89695233 1.6351001 8573 30 30 0 67876 36480 5329 4020 1.1911308 0 91 - 69000 0.91169697 4055 0.0050371842 -0.34036318 1.0180653 1.2495539 8625 20 20 0 68979 36480 5329 4055 1.1860768 0 91 - 70000 0.80502435 4075 0.0042565586 -0.33919322 0.86029306 1.3194042 8571 36 36 0 69947 36480 5329 4075 1.18994 0 91 - 71000 0.8928873 4055 0.0050586026 -0.3080079 1.0223942 1.3949364 8698 32 32 0 71037 36480 5329 4055 1.2154821 0 91 - 72000 0.95397384 4050 0.0052866702 -0.35293209 1.0684889 1.2950893 8613 35 35 0 72090 36480 5329 4050 1.1790804 0 91 - 73000 0.78742879 4053 0.004378612 -0.28830762 0.88496127 1.5168042 8624 30 30 0 73174 36480 5329 4053 1.2008591 0 91 - 74000 0.79498726 4046 0.0042999917 -0.31545969 0.86907133 1.3751647 8562 22 22 0 74250 36480 5329 4046 1.1921334 0 91 - 75000 0.88929145 4051 0.0048995187 -0.33480254 0.99024172 1.6589606 8393 33 33 0 75296 36480 5329 4051 1.1753137 0 91 - 76000 0.98366685 4045 0.0049217494 -0.47092883 0.99473478 1.5271346 8555 29 29 0 76301 36480 5329 4045 1.2031327 0 91 - 77000 0.72618119 4051 0.0035028638 -0.37404618 0.7079638 1.5178344 8565 37 37 0 77315 36480 5329 4051 1.1993308 0 91 - 78000 0.80445682 4028 0.003992176 -0.39178196 0.8068587 1.3682816 8624 32 32 0 78299 36480 5329 4028 1.2065456 0 91 - 79000 1.091703 4052 0.0063793569 -0.33730561 1.2893318 1.5717928 8677 39 39 0 79249 36480 5329 4052 1.1725194 0 91 - 80000 0.77212865 4052 0.0041275152 -0.31625959 0.8342121 1.5583982 8526 33 33 0 80284 36480 5329 4052 1.1981751 0 91 - 81000 0.80732682 4061 0.004618782 -0.26941493 0.93350203 1.5517327 8444 36 36 0 81331 36480 5329 4061 1.2095831 0 91 - 82000 0.80166933 4057 0.0042732734 -0.33081602 0.86367129 1.3937505 8476 29 29 0 82335 36480 5329 4057 1.2047807 0 91 - 83000 0.76980598 4049 0.0041331379 -0.31166241 0.83534851 1.1411979 8561 34 34 0 83375 36480 5329 4049 1.1810941 0 91 - 84000 0.85529188 4076 0.0046148117 -0.34168531 0.93269959 1.3284464 8664 27 27 0 84510 36480 5329 4076 1.192734 0 91 - 85000 0.96167157 4034 0.0053261317 -0.35642617 1.0764645 1.3195071 8557 36 36 0 85517 36480 5329 4034 1.2000123 0 91 - 86000 0.88130862 4047 0.0046646382 -0.37037981 0.94277003 1.3595079 8634 36 36 0 86578 36480 5329 4047 1.1654584 0 91 - 87000 0.68799517 4037 0.0042184867 -0.17251446 0.85259834 1.5087731 8363 40 40 0 87606 36480 5329 4037 1.1833599 0 91 - 88000 0.83191621 4041 0.0048307277 -0.26321678 0.97633838 1.4008912 8597 39 39 0 88490 36480 5329 4041 1.1607031 0 91 - 89000 0.71456519 4036 0.0039378285 -0.26882761 0.79587453 1.2251569 8397 36 36 0 89436 36480 5329 4036 1.1991362 0 91 - 90000 0.75198251 4048 0.0043377839 -0.24374445 0.87670949 1.4896261 8551 29 29 0 90453 36480 5329 4048 1.1899998 0 91 - 91000 0.83310145 4032 0.0049902932 -0.232733 1.0085882 1.4140378 8583 48 48 0 91563 36480 5329 4032 1.1953029 0 91 - 92000 0.8819465 4050 0.0058087956 -0.14008461 1.1740157 1.753218 8610 46 46 0 92618 36480 5329 4050 1.1972268 0 91 - 93000 0.76721608 4048 0.0041923848 -0.29582907 0.8473229 1.4126521 8671 32 32 0 93690 36480 5329 4048 1.2027935 0 91 - 94000 0.8942606 4050 0.0051973822 -0.28200539 1.0504429 1.5743434 8751 21 21 0 94750 36480 5329 4050 1.1804594 0 91 - 95000 0.73609582 4036 0.0035091666 -0.38754512 0.70923765 1.28494 8660 31 31 0 95713 36480 5329 4036 1.1883125 0 91 - 96000 0.79430429 4078 0.0043400156 -0.30635284 0.87716056 1.4351927 8600 38 38 0 96695 36480 5329 4078 1.1704833 0 91 - 97000 0.74817621 4044 0.0038163094 -0.34346826 0.77131429 1.255104 8377 36 36 0 97683 36480 5329 4044 1.1756023 0 91 - 98000 0.78160255 4048 0.0039385343 -0.36857064 0.79601716 1.5320263 8350 25 25 0 98631 36480 5329 4048 1.181196 0 91 - 99000 0.804448 4053 0.004503827 -0.28835905 0.91026848 1.7569548 8506 35 35 0 99687 36480 5329 4053 1.1950898 0 91 - 100000 0.74975993 4032 0.004263269 -0.255493 0.86164929 1.5983872 8621 33 33 0 100701 36480 5329 4032 1.1910217 0 91 -Loop time of 13.4746 on 8 procs for 100000 steps with 20211 atoms - -Pair time (%) = 0.0563478 (0.418178) -Neigh time (%) = 0.794382 (5.89541) -Comm time (%) = 1.23773 (9.18569) -Outpt time (%) = 0.00554895 (0.0411809) -Other time (%) = 11.3806 (84.4595) - -Nlocal: 2526.38 ave 2725 max 2337 min -Histogram: 2 0 0 1 1 1 1 0 1 1 -Nghost: 23.875 ave 27 max 21 min -Histogram: 1 1 0 2 0 2 0 0 0 2 -Neighs: 17 ave 25 max 12 min -Histogram: 3 1 0 1 1 0 0 0 0 2 - -Total # of neighbors = 136 -Ave neighs/atom = 0.00672901 -Neighbor list builds = 5008 -Dangerous builds = 0 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/poly/log.1Feb14.poly.mp.g++.8 b/examples/ASPHERE/poly/log.1Feb14.poly.mp.g++.8 deleted file mode 100644 index 388c629b17..0000000000 --- a/examples/ASPHERE/poly/log.1Feb14.poly.mp.g++.8 +++ /dev/null @@ -1,239 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD viscosity demo - poydisperse spheres - -units lj -atom_style sphere -atom_modify first big -dimension 2 - -# create big particles with 3 different types and diameters - -lattice sq 0.3 -Lattice spacing in x,y,z = 1.82574 1.82574 1.82574 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -Created orthogonal box = (0 0 -0.912871) to (18.2574 18.2574 0.912871) - 2 by 4 by 1 MPI processor grid -create_atoms 1 region box -Created 100 atoms - -group big type 1 -100 atoms in group big -set group big type/fraction 2 0.33 394895 - 35 settings made for type/fraction -set group big type/fraction 3 0.5 989894 - 57 settings made for type/fraction -group big type 2 3 -100 atoms in group big - -set type 1*3 mass 1.0 - 100 settings made for mass -velocity big create 1.44 87287 loop geom - -# equilibrate big particles, repulsive only to prevent aggregation - -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big nve -fix 2 all enforce2d - -#dump 1 all atom 10 dump.poly.equil - -run 1000 -Memory usage per processor = 2.7472 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -0.16013916 0 1.2654608 1.1298975 - 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 -Loop time of 0.0173425 on 8 procs for 1000 steps with 100 atoms - -Pair time (%) = 0.00033614 (1.93825) -Neigh time (%) = 0.000266045 (1.53407) -Comm time (%) = 0.0115004 (66.3132) -Outpt time (%) = 2.78056e-05 (0.160332) -Other time (%) = 0.00521213 (30.0541) - -Nlocal: 12.5 ave 18 max 10 min -Histogram: 1 3 1 1 0 1 0 0 0 1 -Nghost: 27.75 ave 31 max 24 min -Histogram: 1 0 1 0 2 2 0 0 0 2 -Neighs: 19 ave 30 max 16 min -Histogram: 4 1 2 0 0 0 0 0 0 1 - -Total # of neighbors = 152 -Ave neighs/atom = 1.52 -Neighbor list builds = 115 -Dangerous builds = 0 - -#undump 1 -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -Lattice spacing in x,y,z = 0.0632456 0.0632456 0.0632456 -create_atoms 4 region plane -Created 83521 atoms - -set type 4 mass 0.1 - 83521 settings made for mass -group small type 4 -83521 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set *-4 cutoffs to non-zero values - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 - -delete_atoms overlap 1.0 small big -Deleted 63410 atoms, new total = 20211 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 500 dump.poly.mp - -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 - -run 50000 -SRD info: - SRD/big particles = 20111 100 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 73 73 1 - SRD grid size: request, actual (xyz) = 0.25, 0.250102 0.250102 1.82574 - SRD per actual grid cell = 4.93717 - SRD viscosity = 0.23322 - big/SRD mass density ratio = 0.161311 -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875) - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.19344 7.74495 - ave/max big velocity = 1.43991 3.5724 -Memory usage per processor = 11.8633 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] - 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 - 1000 0.76223471 3964 0.0058318994 0.042955471 1.1786852 3.9611295 7412 29 29 0 611 36480 5329 3964 0.97424113 0 1 - 2000 0.83394503 3951 0.0050432506 -0.22328672 1.0192914 2.7492771 7829 30 30 0 1225 36480 5329 3951 1.0832295 0 3 - 3000 0.86856945 3991 0.0048205728 -0.31988251 0.97428597 2.4105317 7961 34 34 0 2000 36480 5329 3991 1.1243219 0 6 - 4000 0.88106888 4009 0.0066731082 0.035909261 1.3487019 3.025346 8002 33 33 0 2895 36480 5329 4009 1.1359575 0 6 - 5000 1.0764198 4036 0.0070136315 -0.18634051 1.4175251 2.7617336 8117 36 36 0 3808 36480 5329 4036 1.1147743 0 6 - 6000 1.0433139 4004 0.0059532709 -0.35132214 1.2032156 2.3597383 8004 23 23 0 4845 36480 5329 4004 1.1192873 0 6 - 7000 1.1551053 4026 0.0074766715 -0.20999681 1.5111101 2.280806 8269 36 36 0 5873 36480 5329 4026 1.1704244 0 6 - 8000 1.2222713 4008 0.0078175708 -0.24117508 1.5800092 1.967726 8218 33 33 0 7077 36480 5329 4008 1.1496529 0 6 - 9000 1.2240884 4012 0.0081583857 -0.17500037 1.6488913 2.3684675 8502 27 27 0 8359 36480 5329 4012 1.1664455 0 6 - 10000 1.2071315 4035 0.0073838443 -0.30627724 1.4923488 2.124366 8376 33 33 0 9778 36480 5329 4035 1.1942304 0 6 - 11000 1.1694272 4036 0.0077950192 -0.16699527 1.5754513 2.4203067 8623 40 40 0 11210 36480 5329 4036 1.1802896 0 42 - 12000 1.0911561 4044 0.0074117515 -0.12783343 1.4979891 2.4859591 8490 30 30 0 12647 36480 5329 4044 1.171701 0 42 - 13000 1.3535072 4023 0.0091503262 -0.16735325 1.8493724 2.7718999 8320 33 33 0 14082 36480 5329 4023 1.1841757 0 42 - 14000 1.4191753 4043 0.0095368758 -0.18707328 1.927498 2.8442438 8422 25 25 0 15462 36480 5329 4043 1.1567854 0 42 - 15000 1.703769 4053 0.010892787 -0.33707457 2.2015412 2.4160876 8123 34 34 0 16985 36480 5329 4053 1.1875794 0 42 - 16000 1.4270161 4032 0.010142553 -0.076342616 2.0499114 2.9568071 8360 34 34 0 18487 36480 5329 4032 1.164586 0 42 - 17000 1.2267528 4013 0.0080642511 -0.19799584 1.6298658 2.5084784 8477 27 27 0 20101 36480 5329 4013 1.1529604 0 42 - 18000 1.4228586 4050 0.01009573 -0.079611446 2.0404479 2.8013833 8519 33 33 0 21633 36480 5329 4050 1.1549291 0 42 - 19000 1.3041379 4040 0.0082901927 -0.26763462 1.6755308 1.9403854 8483 30 30 0 23194 36480 5329 4040 1.1592747 0 42 - 20000 1.3837406 4030 0.0092446911 -0.19332904 1.8684445 2.4550531 8425 25 25 0 24761 36480 5329 4030 1.1757648 0 42 - 21000 1.7882552 4031 0.012076007 -0.22381856 2.4406817 2.4206092 8581 40 40 0 26371 36480 5329 4031 1.1591574 0 42 - 22000 1.5079803 4015 0.010373742 -0.15025377 2.0966369 2.6321039 8383 33 33 0 27989 36480 5329 4015 1.1495522 0 42 - 23000 1.3835348 4044 0.0087922321 -0.28446888 1.776998 2.2729548 8441 30 30 0 29575 36480 5329 4044 1.1616377 0 42 - 24000 1.5854836 4044 0.0099174248 -0.35795983 2.0044107 2.2250073 8462 35 35 0 31298 36480 5329 4044 1.1796851 0 42 - 25000 1.5314412 4062 0.010880793 -0.082730301 2.1991171 2.6858232 8473 28 28 0 33079 36480 5329 4062 1.1726593 0 54 - 26000 1.2896316 4070 0.0090198232 -0.098554631 1.8229965 2.3437649 8453 40 40 0 34816 36480 5329 4070 1.1764482 0 54 - 27000 1.6956611 4035 0.012064024 -0.088275024 2.43826 2.8138661 8380 32 32 0 36453 36480 5329 4035 1.1622504 0 54 - 28000 1.3560979 4043 0.0088193796 -0.23810107 1.7824848 2.1799536 8611 30 30 0 38202 36480 5329 4043 1.1681248 0 54 - 29000 1.5837646 4029 0.010790526 -0.17893612 2.1808731 2.3116753 8480 26 26 0 39846 36480 5329 4029 1.1774511 0 54 - 30000 1.6549448 4035 0.01137773 -0.16631482 2.2995529 2.6236656 8637 30 30 0 41461 36480 5329 4035 1.1538405 0 54 - 31000 1.445315 4050 0.01013447 -0.1052417 2.0482777 2.4440312 8504 38 38 0 43099 36480 5329 4050 1.1690375 0 54 - 32000 1.5572315 4037 0.010828477 -0.13173155 2.1885434 2.5911192 8453 30 30 0 44760 36480 5329 4037 1.1612147 0 54 - 33000 2.018109 4068 0.013467519 -0.28506208 2.7219203 2.5784978 8701 40 40 0 46462 36480 5329 4068 1.1727186 0 54 - 34000 1.2455134 4066 0.0083640288 -0.16536113 1.6904539 2.3054829 8428 32 32 0 48055 36480 5329 4066 1.1712016 0 54 - 35000 1.6248596 4012 0.011213824 -0.15461501 2.2664259 2.8697537 8453 31 31 0 49658 36480 5329 4012 1.1693962 0 54 - 36000 1.5485873 4039 0.01112737 -0.058442367 2.2489527 3.0386676 8529 42 42 0 51330 36480 5329 4039 1.1750818 0 54 - 37000 1.5561543 4024 0.011313246 -0.032149816 2.2865202 2.7583779 8484 45 45 0 52981 36480 5329 4024 1.1613247 0 54 - 38000 1.5174762 4043 0.010120957 -0.21549294 2.0455467 2.2489655 8528 37 37 0 54637 36480 5329 4043 1.1692017 0 54 - 39000 1.5936544 4045 0.010946409 -0.16216642 2.2123787 2.7579117 8460 35 35 0 56452 36480 5329 4045 1.1670575 0 54 - 40000 1.7884514 4051 0.011913021 -0.2570519 2.4077408 2.494169 8539 37 37 0 58163 36480 5329 4051 1.1744075 0 54 - 41000 1.4173685 4042 0.0096196931 -0.16764288 1.9442362 1.9949409 8511 42 42 0 59967 36480 5329 4042 1.1747318 0 54 - 42000 1.4946304 4055 0.0098254549 -0.24117659 1.9858227 1.9958514 8395 39 39 0 61697 36480 5329 4055 1.1745062 0 54 - 43000 1.6486882 4041 0.011190255 -0.19488288 2.2616625 2.2173122 8473 28 28 0 63447 36480 5329 4041 1.1631975 0 54 - 44000 1.7473914 4055 0.011743128 -0.23020951 2.3734036 2.3913609 8421 30 30 0 65095 36480 5329 4055 1.1567659 0 54 - 45000 1.7826681 4027 0.011993913 -0.23208563 2.4240898 2.4582759 8539 35 35 0 66749 36480 5329 4027 1.1513285 0 54 - 46000 1.3988187 4049 0.0091738733 -0.23010838 1.8541315 2.3866226 8447 38 38 0 68459 36480 5329 4049 1.1728215 0 54 - 47000 1.8402398 4064 0.01271321 -0.17249031 2.569467 2.7748374 8524 33 33 0 70139 36480 5329 4064 1.1555276 0 54 - 48000 1.5634287 4042 0.011047794 -0.096639164 2.2328696 2.7173437 8561 33 33 0 71923 36480 5329 4042 1.177462 0 54 - 49000 1.789207 4058 0.012453079 -0.14902655 2.5168918 2.9310418 8545 38 38 0 73721 36480 5329 4058 1.1581934 0 54 - 50000 1.3475703 4010 0.0092484369 -0.13867816 1.8692016 2.1619389 8664 32 32 0 75439 36480 5329 4010 1.1589691 0 54 -Loop time of 6.84 on 8 procs for 50000 steps with 20211 atoms - -Pair time (%) = 0.0295508 (0.432029) -Neigh time (%) = 0.400359 (5.8532) -Comm time (%) = 0.622996 (9.10813) -Outpt time (%) = 0.00241029 (0.0352382) -Other time (%) = 5.78468 (84.5714) - -Nlocal: 2526.38 ave 2651 max 2342 min -Histogram: 1 0 0 2 1 0 0 1 1 2 -Nghost: 24.5 ave 27 max 23 min -Histogram: 1 0 4 0 0 2 0 0 0 1 -Neighs: 17.375 ave 24 max 13 min -Histogram: 2 2 0 1 1 0 0 0 0 2 - -Total # of neighbors = 139 -Ave neighs/atom = 0.00687744 -Neighbor list builds = 2502 -Dangerous builds = 0 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/poly/log.1Feb24.poly.g++.1 b/examples/ASPHERE/poly/log.1Feb24.poly.g++.1 new file mode 100644 index 0000000000..f29a3d2a3c --- /dev/null +++ b/examples/ASPHERE/poly/log.1Feb24.poly.g++.1 @@ -0,0 +1,317 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - poydisperse spheres + +units lj +atom_style sphere +atom_modify first big +dimension 2 + +# create big particles with 3 different types and diameters + +lattice sq 0.3 +Lattice spacing in x,y,z = 1.8257419 1.8257419 1.8257419 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +Created orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.000 seconds + +group big type 1 +100 atoms in group big +set group big type/fraction 2 0.33 394895 +Setting atom values ... + 35 settings made for type/fraction +set group big type/fraction 3 0.5 989894 +Setting atom values ... + 57 settings made for type/fraction +group big type 2 3 +100 atoms in group big + +set type 1*3 mass 1.0 +Setting atom values ... + 100 settings made for mass +velocity big create 1.44 87287 loop geom + +# equilibrate big particles, repulsive only to prevent aggregation + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve +fix 2 all enforce2d + +#dump 1 all atom 10 dump.poly.equil + +run 1000 +Generated 6 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 1.27, bins = 15 15 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.174 | 4.174 | 4.174 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.44 -0.16013916 0 1.2654608 1.1298975 + 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 +Loop time of 0.00622873 on 1 procs for 1000 steps with 100 atoms + +Performance: 69356032.450 tau/day, 160546.371 timesteps/s, 16.055 Matom-step/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0015709 | 0.0015709 | 0.0015709 | 0.0 | 25.22 +Neigh | 0.0014016 | 0.0014016 | 0.0014016 | 0.0 | 22.50 +Comm | 0.0012066 | 0.0012066 | 0.0012066 | 0.0 | 19.37 +Output | 6.169e-06 | 6.169e-06 | 6.169e-06 | 0.0 | 0.10 +Modify | 0.0013508 | 0.0013508 | 0.0013508 | 0.0 | 21.69 +Other | | 0.0006926 | | | 11.12 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 60 ave 60 max 60 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 152 ave 152 max 152 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 152 +Ave neighs/atom = 1.52 +Neighbor list builds = 115 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +Lattice spacing in x,y,z = 0.063245553 0.063245553 0.063245553 +create_atoms 4 region plane +Created 83521 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.016 seconds + +set type 4 mass 0.1 +Setting atom values ... + 83521 settings made for mass +group small type 4 +83521 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set *-4 cutoffs to non-zero values + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 + +delete_atoms overlap 1.0 small big +System init for delete_atoms ... +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 63410 atoms, new total = 20211 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.poly + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 20111 100 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 73 73 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25010162 0.25010162 1.8257419 + SRD per actual grid cell = 4.9371727 + SRD viscosity = 0.23321983 + big/SRD mass density ratio = 0.16131131 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1934421 7.74495 + ave/max big velocity = 1.4399093 3.5724039 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 18.257419, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 42 | 42 | 42 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.0181191 3924 0.0076572255 0.030604433 1.5476019 3.7992573 7242 26 26 0 635 15876 5329 3924 0.98110339 0 3 + 2000 0.69783736 3992 0.0027817464 -0.47755891 0.56221876 1.9887267 7740 34 34 1 1186 15876 5329 3992 1.0611575 0 24 + 3000 0.89084297 3981 0.004323119 -0.45361044 0.87374558 1.7342893 7775 24 24 0 1923 15876 5329 3981 1.1207371 0 24 + 4000 0.84391846 4036 0.0045581483 -0.33619115 0.92124735 1.8456288 8060 43 43 0 2734 15876 5329 4036 1.1481354 0 24 + 5000 0.69548234 4056 0.0030033315 -0.42926535 0.60700333 1.6113509 8260 33 33 0 3638 15876 5329 4056 1.148749 0 24 + 6000 0.71729125 4023 0.0035318938 -0.35493291 0.71383106 1.673491 8224 29 29 0 4528 15876 5329 4023 1.1602572 0 24 + 7000 0.90145513 4032 0.0047423524 -0.38469129 0.95847685 1.7537778 8382 31 31 0 5395 15876 5329 4032 1.1543513 0 24 + 8000 0.6739295 4026 0.0029910322 -0.39963744 0.60451751 1.646528 8409 35 35 0 6293 15876 5329 4026 1.1540519 0 24 + 9000 0.80563959 4041 0.0042947965 -0.33238166 0.86802133 1.6597032 8429 29 29 0 7164 15876 5329 4041 1.1880521 0 24 + 10000 0.90407954 4022 0.0046865656 -0.39987673 0.94720178 1.445708 8349 30 30 0 8189 15876 5329 4022 1.171667 0 24 +Loop time of 5.64963 on 1 procs for 10000 steps with 20211 atoms + +Performance: 152930.340 tau/day, 1770.027 timesteps/s, 35.774 Matom-step/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.019832 | 0.019832 | 0.019832 | 0.0 | 0.35 +Neigh | 0.020738 | 0.020738 | 0.020738 | 0.0 | 0.37 +Comm | 0.056875 | 0.056875 | 0.056875 | 0.0 | 1.01 +Output | 0.00083247 | 0.00083247 | 0.00083247 | 0.0 | 0.01 +Modify | 5.4828 | 5.4828 | 5.4828 | 0.0 | 97.05 +Other | | 0.06854 | | | 1.21 + +Nlocal: 20211 ave 20211 max 20211 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 49 ave 49 max 49 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 160 ave 160 max 160 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 160 +Ave neighs/atom = 0.0079164811 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/examples/ASPHERE/poly/log.1Feb24.poly.g++.4 b/examples/ASPHERE/poly/log.1Feb24.poly.g++.4 new file mode 100644 index 0000000000..f3f42580aa --- /dev/null +++ b/examples/ASPHERE/poly/log.1Feb24.poly.g++.4 @@ -0,0 +1,317 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - poydisperse spheres + +units lj +atom_style sphere +atom_modify first big +dimension 2 + +# create big particles with 3 different types and diameters + +lattice sq 0.3 +Lattice spacing in x,y,z = 1.8257419 1.8257419 1.8257419 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +Created orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + 2 by 2 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.000 seconds + +group big type 1 +100 atoms in group big +set group big type/fraction 2 0.33 394895 +Setting atom values ... + 35 settings made for type/fraction +set group big type/fraction 3 0.5 989894 +Setting atom values ... + 57 settings made for type/fraction +group big type 2 3 +100 atoms in group big + +set type 1*3 mass 1.0 +Setting atom values ... + 100 settings made for mass +velocity big create 1.44 87287 loop geom + +# equilibrate big particles, repulsive only to prevent aggregation + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve +fix 2 all enforce2d + +#dump 1 all atom 10 dump.poly.equil + +run 1000 +Generated 6 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 1.27, bins = 15 15 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.172 | 4.172 | 4.172 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.44 -0.16013916 0 1.2654608 1.1298975 + 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 +Loop time of 0.00891987 on 4 procs for 1000 steps with 100 atoms + +Performance: 48431181.463 tau/day, 112109.216 timesteps/s, 11.211 Matom-step/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00039835 | 0.00043547 | 0.00047558 | 0.0 | 4.88 +Neigh | 0.00033856 | 0.00036829 | 0.00038548 | 0.0 | 4.13 +Comm | 0.0065535 | 0.0065882 | 0.0066353 | 0.0 | 73.86 +Output | 1.0991e-05 | 1.2359e-05 | 1.4677e-05 | 0.0 | 0.14 +Modify | 0.00043639 | 0.00045662 | 0.00050811 | 0.0 | 5.12 +Other | | 0.001059 | | | 11.87 + +Nlocal: 25 ave 29 max 23 min +Histogram: 2 0 0 1 0 0 0 0 0 1 +Nghost: 33.75 ave 35 max 31 min +Histogram: 1 0 0 0 0 0 0 1 0 2 +Neighs: 38 ave 46 max 34 min +Histogram: 1 2 0 0 0 0 0 0 0 1 + +Total # of neighbors = 152 +Ave neighs/atom = 1.52 +Neighbor list builds = 115 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +Lattice spacing in x,y,z = 0.063245553 0.063245553 0.063245553 +create_atoms 4 region plane +Created 83521 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.006 seconds + +set type 4 mass 0.1 +Setting atom values ... + 83521 settings made for mass +group small type 4 +83521 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set *-4 cutoffs to non-zero values + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 + +delete_atoms overlap 1.0 small big +System init for delete_atoms ... +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 63410 atoms, new total = 20211 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore +fix 3 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.poly + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 20111 100 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 73 73 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25010162 0.25010162 1.8257419 + SRD per actual grid cell = 4.9371727 + SRD viscosity = 0.23321983 + big/SRD mass density ratio = 0.16131131 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1934421 7.74495 + ave/max big velocity = 1.4399093 3.5724039 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 18.257419, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 19.17 | 19.17 | 19.18 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 + 1000 0.98459665 3968 0.0086216557 0.27547381 1.7425228 4.4010488 7403 34 34 0 663 25600 5329 3968 0.98292304 0 5 + 2000 0.74381104 4003 0.0041077507 -0.27806095 0.8302175 2.6170187 7746 32 32 0 1272 25600 5329 4003 1.0631936 0 5 + 3000 0.86305095 3969 0.0048953507 -0.29654658 0.98939933 2.1215334 7834 35 35 0 1974 25600 5329 3969 1.1209619 0 5 + 4000 0.8262932 4022 0.0049907905 -0.2224882 1.0086887 2.079935 8196 27 27 0 2753 25600 5329 4022 1.1040604 0 5 + 5000 0.85908819 4038 0.0043301633 -0.40487209 0.87516931 1.7917343 8347 28 28 0 3622 25600 5329 4038 1.1575336 0 5 + 6000 0.8048766 4024 0.0047529981 -0.2386377 0.96062844 1.8195477 8103 26 26 0 4536 25600 5329 4024 1.1818796 0 5 + 7000 0.84561126 4047 0.0039459142 -0.46245206 0.79750871 1.4432235 8154 20 20 0 5483 25600 5329 4047 1.1817402 0 5 + 8000 0.81543891 4037 0.0037591562 -0.45524091 0.75976306 1.7501338 8377 27 27 0 6472 25600 5329 4037 1.168956 0 5 + 9000 0.71960112 4045 0.0035243955 -0.3598901 0.71231557 1.7333111 8440 30 30 0 7386 25600 5329 4045 1.1765277 0 5 + 10000 1.0831334 4043 0.0053045911 -0.54175788 1.0721109 1.7434822 8283 33 33 0 8331 25600 5329 4043 1.1696048 0 5 +Loop time of 1.82855 on 4 procs for 10000 steps with 20211 atoms + +Performance: 472504.837 tau/day, 5468.806 timesteps/s, 110.530 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0057481 | 0.0069625 | 0.0087051 | 1.3 | 0.38 +Neigh | 0.0067658 | 0.0070766 | 0.0076303 | 0.4 | 0.39 +Comm | 0.10613 | 0.10693 | 0.10786 | 0.2 | 5.85 +Output | 0.00053606 | 0.00059075 | 0.00063891 | 0.0 | 0.03 +Modify | 1.6117 | 1.6525 | 1.6763 | 1.9 | 90.37 +Other | | 0.05449 | | | 2.98 + +Nlocal: 5052.75 ave 5483 max 4509 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 27 ave 28 max 26 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 39.5 ave 55 max 26 min +Histogram: 1 0 0 1 0 1 0 0 0 1 + +Total # of neighbors = 158 +Ave neighs/atom = 0.0078175251 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.1 b/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.1 new file mode 100644 index 0000000000..1804a3220d --- /dev/null +++ b/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.1 @@ -0,0 +1,318 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - poydisperse spheres + +units lj +atom_style sphere +atom_modify first big +dimension 2 + +# create big particles with 3 different types and diameters + +lattice sq 0.3 +Lattice spacing in x,y,z = 1.8257419 1.8257419 1.8257419 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +Created orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.000 seconds + +group big type 1 +100 atoms in group big +set group big type/fraction 2 0.33 394895 +Setting atom values ... + 35 settings made for type/fraction +set group big type/fraction 3 0.5 989894 +Setting atom values ... + 57 settings made for type/fraction +group big type 2 3 +100 atoms in group big + +set type 1*3 mass 1.0 +Setting atom values ... + 100 settings made for mass +velocity big create 1.44 87287 loop geom + +# equilibrate big particles, repulsive only to prevent aggregation + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve +fix 2 all enforce2d + +#dump 1 all atom 10 dump.poly.equil + +run 1000 +Generated 6 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 1.27, bins = 15 15 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.174 | 4.174 | 4.174 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.44 -0.16013916 0 1.2654608 1.1298975 + 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 +Loop time of 0.00627198 on 1 procs for 1000 steps with 100 atoms + +Performance: 68877814.583 tau/day, 159439.386 timesteps/s, 15.944 Matom-step/s +97.2% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0016224 | 0.0016224 | 0.0016224 | 0.0 | 25.87 +Neigh | 0.0014238 | 0.0014238 | 0.0014238 | 0.0 | 22.70 +Comm | 0.0011671 | 0.0011671 | 0.0011671 | 0.0 | 18.61 +Output | 6.058e-06 | 6.058e-06 | 6.058e-06 | 0.0 | 0.10 +Modify | 0.0013659 | 0.0013659 | 0.0013659 | 0.0 | 21.78 +Other | | 0.0006868 | | | 10.95 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 60 ave 60 max 60 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 152 ave 152 max 152 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 152 +Ave neighs/atom = 1.52 +Neighbor list builds = 115 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +Lattice spacing in x,y,z = 0.063245553 0.063245553 0.063245553 +create_atoms 4 region plane +Created 83521 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.017 seconds + +set type 4 mass 0.1 +Setting atom values ... + 83521 settings made for mass +group small type 4 +83521 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set *-4 cutoffs to non-zero values + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 + +delete_atoms overlap 1.0 small big +System init for delete_atoms ... +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 63410 atoms, new total = 20211 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 500 dump.poly.mp + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 20111 100 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 73 73 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25010162 0.25010162 1.8257419 + SRD per actual grid cell = 4.9371727 + SRD viscosity = 0.23321983 + big/SRD mass density ratio = 0.16131131 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1934421 7.74495 + ave/max big velocity = 1.4399093 3.5724039 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 18.257419, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 42 | 42 | 42 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 + 1000 0.9260989 3936 0.007125623 0.060272296 1.4401597 3.9323 7454 34 34 0 666 15876 5329 3936 0.98459206 0 28 + 2000 0.90353395 4000 0.0052889652 -0.27731283 1.0689528 2.6405627 7698 23 23 0 1382 15876 5329 4000 1.0797162 0 46 + 3000 0.90859187 3993 0.0052873224 -0.28518115 1.0686207 2.2965966 7968 31 31 0 2142 15876 5329 3993 1.1267833 0 46 + 4000 0.84755099 4048 0.005174979 -0.21693597 1.045915 2.3794577 8137 36 36 0 3087 15876 5329 4048 1.1357649 0 46 + 5000 0.970415 4034 0.0070498808 -0.021066942 1.4248514 2.7424457 8202 29 29 0 4119 15876 5329 4034 1.1354594 0 46 + 6000 1.3230208 4023 0.0094580142 -0.059741745 1.9115593 3.1405056 8259 36 36 0 5151 15876 5329 4023 1.1508111 0 46 + 7000 1.2356555 4022 0.0076141503 -0.30223075 1.5388959 2.2740088 8336 33 33 0 6277 15876 5329 4022 1.1814599 0 46 + 8000 1.0470467 4044 0.0077098735 -0.001857114 1.5582425 2.97413 8285 40 40 0 7399 15876 5329 4044 1.1644871 0 46 + 9000 1.0827168 4054 0.0062150407 -0.35712609 1.2561219 2.0991523 8454 31 31 0 8664 15876 5329 4054 1.1744383 0 46 + 10000 1.3953419 4031 0.0091083246 -0.23817595 1.8408835 2.4493963 8468 34 34 0 10227 15876 5329 4031 1.1657737 0 62 +Loop time of 5.74914 on 1 procs for 10000 steps with 20211 atoms + +Performance: 150283.390 tau/day, 1739.391 timesteps/s, 35.155 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.021224 | 0.021224 | 0.021224 | 0.0 | 0.37 +Neigh | 0.020586 | 0.020586 | 0.020586 | 0.0 | 0.36 +Comm | 0.057881 | 0.057881 | 0.057881 | 0.0 | 1.01 +Output | 0.00093386 | 0.00093386 | 0.00093386 | 0.0 | 0.02 +Modify | 5.579 | 5.579 | 5.579 | 0.0 | 97.04 +Other | | 0.06951 | | | 1.21 + +Nlocal: 20211 ave 20211 max 20211 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 50 ave 50 max 50 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 141 ave 141 max 141 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 141 +Ave neighs/atom = 0.006976399 +Neighbor list builds = 503 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.4 b/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.4 new file mode 100644 index 0000000000..a0a63e284c --- /dev/null +++ b/examples/ASPHERE/poly/log.1Feb24.poly.mp.g++.4 @@ -0,0 +1,318 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - poydisperse spheres + +units lj +atom_style sphere +atom_modify first big +dimension 2 + +# create big particles with 3 different types and diameters + +lattice sq 0.3 +Lattice spacing in x,y,z = 1.8257419 1.8257419 1.8257419 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +Created orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + 2 by 2 by 1 MPI processor grid +create_atoms 1 region box +Created 100 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.000 seconds + +group big type 1 +100 atoms in group big +set group big type/fraction 2 0.33 394895 +Setting atom values ... + 35 settings made for type/fraction +set group big type/fraction 3 0.5 989894 +Setting atom values ... + 57 settings made for type/fraction +group big type 2 3 +100 atoms in group big + +set type 1*3 mass 1.0 +Setting atom values ... + 100 settings made for mass +velocity big create 1.44 87287 loop geom + +# equilibrate big particles, repulsive only to prevent aggregation + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big nve +fix 2 all enforce2d + +#dump 1 all atom 10 dump.poly.equil + +run 1000 +Generated 6 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 1.27, bins = 15 15 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.172 | 4.172 | 4.172 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.44 -0.16013916 0 1.2654608 1.1298975 + 1000 1.3367862 -0.30816328 0 1.0152551 1.5440006 +Loop time of 0.00883083 on 4 procs for 1000 steps with 100 atoms + +Performance: 48919544.759 tau/day, 113239.687 timesteps/s, 11.324 Matom-step/s +99.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00040021 | 0.00044336 | 0.00050371 | 0.0 | 5.02 +Neigh | 0.00033682 | 0.00036617 | 0.00038566 | 0.0 | 4.15 +Comm | 0.006519 | 0.0065578 | 0.0066015 | 0.0 | 74.26 +Output | 1.1215e-05 | 1.2252e-05 | 1.4089e-05 | 0.0 | 0.14 +Modify | 0.00043326 | 0.00044482 | 0.00046058 | 0.0 | 5.04 +Other | | 0.001006 | | | 11.40 + +Nlocal: 25 ave 29 max 23 min +Histogram: 2 0 0 1 0 0 0 0 0 1 +Nghost: 33.75 ave 35 max 31 min +Histogram: 1 0 0 0 0 0 0 1 0 2 +Neighs: 38 ave 46 max 34 min +Histogram: 1 2 0 0 0 0 0 0 0 1 + +Total # of neighbors = 152 +Ave neighs/atom = 1.52 +Neighbor list builds = 115 +Dangerous builds = 0 + +#undump 1 +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +Lattice spacing in x,y,z = 0.063245553 0.063245553 0.063245553 +create_atoms 4 region plane +Created 83521 atoms + using lattice units in orthogonal box = (0 0 -0.91287093) to (18.257419 18.257419 0.91287093) + create_atoms CPU = 0.006 seconds + +set type 4 mass 0.1 +Setting atom values ... + 83521 settings made for mass +group small type 4 +83521 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set *-4 cutoffs to non-zero values + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 + +delete_atoms overlap 1.0 small big +System init for delete_atoms ... +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 14 14 2 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 63410 atoms, new total = 20211 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 inside ignore +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 500 dump.poly.mp + +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 3 of 6 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 20111 100 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 73 73 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25010162 0.25010162 1.8257419 + SRD per actual grid cell = 4.9371727 + SRD viscosity = 0.23321983 + big/SRD mass density ratio = 0.16131131 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1934421 7.74495 + ave/max big velocity = 1.4399093 3.5724039 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.54 + ghost atom cutoff = 2.54 + binsize = 18.257419, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 19.17 | 19.17 | 19.18 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] + 0 0.88820023 0 0.0050232797 -0.30816328 1.0152551 1.5440006 0 0 0 0 0 0 0 0 0 0 0 + 1000 0.83735494 3964 0.0071370659 0.19481352 1.4424724 3.9770741 7472 25 25 0 603 25600 5329 3964 0.96475118 0 2 + 2000 0.89694821 3981 0.0057098818 -0.18242861 1.1540242 3.1251883 7672 28 28 0 1238 25600 5329 3981 1.0589985 0 2 + 3000 0.99778172 3975 0.0051822049 -0.43931933 1.0473754 1.8970896 7814 24 24 0 1968 25600 5329 3975 1.1192504 0 3 + 4000 0.90067439 4030 0.0045096255 -0.43056442 0.91144042 1.8769981 8104 33 33 0 2911 25600 5329 4030 1.1382082 0 3 + 5000 0.90625848 4018 0.0055622776 -0.22613322 1.1241919 2.1866405 8287 26 26 0 3900 25600 5329 4018 1.1429442 0 3 + 6000 1.1284139 4022 0.0065653291 -0.354418 1.3269187 2.0312152 8268 35 35 0 5013 25600 5329 4022 1.1559733 0 3 + 7000 1.0073477 4043 0.0063924548 -0.2089691 1.291979 2.3332058 8433 39 39 0 6093 25600 5329 4043 1.1308958 0 3 + 8000 1.0621801 4050 0.00731979 -0.10324558 1.4794028 2.6610716 8353 40 40 0 7194 25600 5329 4050 1.1539521 0 3 + 9000 1.3173319 4046 0.0085268497 -0.23946297 1.7233616 2.4074596 8290 33 33 0 8498 25600 5329 4046 1.1601502 0 3 + 10000 1.1754738 4009 0.0074264713 -0.25049186 1.5009641 2.4237351 8305 30 30 0 9811 25600 5329 4009 1.1489476 0 43 +Loop time of 1.85719 on 4 procs for 10000 steps with 20211 atoms + +Performance: 465218.852 tau/day, 5384.477 timesteps/s, 108.826 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0056791 | 0.0069765 | 0.0089852 | 1.6 | 0.38 +Neigh | 0.006991 | 0.0073805 | 0.0079507 | 0.4 | 0.40 +Comm | 0.10756 | 0.10836 | 0.10942 | 0.2 | 5.83 +Output | 0.00052479 | 0.0005511 | 0.00062567 | 0.0 | 0.03 +Modify | 1.6443 | 1.6772 | 1.7031 | 1.7 | 90.31 +Other | | 0.0567 | | | 3.05 + +Nlocal: 5052.75 ave 5381 max 4651 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Nghost: 28.5 ave 30 max 26 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Neighs: 34.75 ave 55 max 26 min +Histogram: 2 0 1 0 0 0 0 0 0 1 + +Total # of neighbors = 139 +Ave neighs/atom = 0.006877443 +Neighbor list builds = 501 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/ASPHERE/star/in.star b/examples/ASPHERE/star/in.star index a098810199..db76c890e8 100644 --- a/examples/ASPHERE/star/in.star +++ b/examples/ASPHERE/star/in.star @@ -1,111 +1,111 @@ # SRD diffusion demo - rigid star particles -units lj -atom_style sphere -atom_modify map array first big -dimension 2 +units lj +atom_style sphere +atom_modify map array first big +dimension 2 # read in clusters of rigid bodies -fix molprop all property/atom mol -read_data data.star fix molprop NULL Molecules +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules + +set type 1 mass 1.0 +group big type 1 +velocity big create 1.44 87287 loop geom -set type 1 mass 1.0 -group big type 1 -velocity big create 1.44 87287 loop geom - # equilibrate big particles -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 variable prefactor equal ramp(0,60) fix soft all adapt 1 pair soft a * * v_prefactor -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -fix 1 big rigid molecule -fix 2 all enforce2d +fix 1 big rigid molecule +fix 2 all enforce2d -#dump 1 all atom 10 dump.star.equil +#dump 1 all atom 10 dump.star.equil -compute tbig all temp/sphere -thermo_modify temp tbig +compute tbig all temp/sphere +thermo_modify temp tbig -thermo 100 -run 1000 +thermo 100 +run 1000 -#undump 1 +#undump 1 unfix soft -unfix 1 -unfix 2 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -create_atoms 2 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +create_atoms 2 region plane -set type 2 mass 0.1 -group small type 2 -velocity small create 1.0 593849 loop geom +set type 2 mass 0.1 +group small type 2 +velocity small create 1.0 593849 loop geom # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 -delete_atoms overlap 0.5 small big +delete_atoms overlap 0.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid molecule -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 collision slip inside ignore overlap yes -fix 3 all enforce2d +fix 1 big rigid molecule +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d # diagnostics uncompute tbig -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.star +#dump 1 all atom 1000 dump.star -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 -run 100000 +run 10000 diff --git a/examples/ASPHERE/star/in.star.mp b/examples/ASPHERE/star/in.star.mp index 53cb924e42..781b2f48fd 100644 --- a/examples/ASPHERE/star/in.star.mp +++ b/examples/ASPHERE/star/in.star.mp @@ -1,112 +1,112 @@ # SRD viscosity demo - rigid star particles -units lj -atom_style sphere -atom_modify map array first big -dimension 2 +units lj +atom_style sphere +atom_modify map array first big +dimension 2 # read in clusters of rigid bodies -fix molprop all property/atom mol -read_data data.star fix molprop NULL Molecules +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules + +set type 1 mass 1.0 +group big type 1 +velocity big create 1.44 87287 loop geom -set type 1 mass 1.0 -group big type 1 -velocity big create 1.44 87287 loop geom - # equilibrate big particles -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 variable prefactor equal ramp(0,60) fix soft all adapt 1 pair soft a * * v_prefactor -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -fix 1 big rigid molecule -fix 2 all enforce2d +fix 1 big rigid molecule +fix 2 all enforce2d -#dump 1 all atom 10 dump.star.equil +#dump 1 all atom 10 dump.star.equil -compute tbig all temp/sphere -thermo_modify temp tbig +compute tbig all temp/sphere +thermo_modify temp tbig -thermo 100 -run 1000 +thermo 100 +run 1000 -#undump 1 +#undump 1 unfix soft -unfix 1 -unfix 2 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -create_atoms 2 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +create_atoms 2 region plane -set type 2 mass 0.1 -group small type 2 -velocity small create 1.0 593849 loop geom +set type 2 mass 0.1 +group small type 2 +velocity small create 1.0 593849 loop geom # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 -delete_atoms overlap 0.5 small big +delete_atoms overlap 0.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid molecule -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 collision slip inside ignore overlap yes -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d +fix 1 big rigid molecule +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d # diagnostics uncompute tbig -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.star.mp +#dump 1 all atom 1000 dump.star.mp -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 -run 100000 +run 10000 diff --git a/examples/ASPHERE/star/log.1Feb14.star.g++.8 b/examples/ASPHERE/star/log.1Feb14.star.g++.8 deleted file mode 100644 index 3ccc04ff26..0000000000 --- a/examples/ASPHERE/star/log.1Feb14.star.g++.8 +++ /dev/null @@ -1,290 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD diffusion demo - rigid star particles - -units lj -atom_style sphere -atom_modify map array first big -dimension 2 - -# read in clusters of rigid bodies - -fix molprop all property/atom mol -read_data data.star fix molprop NULL Molecules - orthogonal box = (-13.2934 -13.2934 -0.5) to (13.2934 13.2934 0.5) - 4 by 2 by 1 MPI processor grid - reading atoms ... - 270 atoms - -set type 1 mass 1.0 - 270 settings made for mass -group big type 1 -270 atoms in group big -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 - -variable prefactor equal ramp(0,60) -fix soft all adapt 1 pair soft a * * v_prefactor - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big rigid molecule -30 rigid bodies with 270 atoms -fix 2 all enforce2d - -#dump 1 all atom 10 dump.star.equil - -thermo 100 -run 1000 -Memory usage per processor = 2.64859 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 0 0 0 0 0.24721146 - 100 0 3.291475 0 3.291475 0.69158089 - 200 0 4.6176595 0 4.6176595 0.71737945 - 300 0 7.0921814 0 7.0921814 1.2163497 - 400 0 8.3666709 0 8.3666709 0.50645957 - 500 0 10.630838 0 10.630838 0.72764487 - 600 0 12.42157 0 12.42157 1.0130599 - 700 0 14.349074 0 14.349074 0.74795509 - 800 0 16.464746 0 16.464746 1.054549 - 900 0 18.253108 0 18.253108 0.51551753 - 1000 0 20.699563 0 20.699563 1.8084662 -Loop time of 0.040709 on 8 procs for 1000 steps with 270 atoms - -Pair time (%) = 0.00249004 (6.11668) -Neigh time (%) = 0.000995547 (2.44552) -Comm time (%) = 0.0116902 (28.7165) -Outpt time (%) = 0.000232756 (0.571755) -Other time (%) = 0.0253005 (62.1496) - -Nlocal: 33.75 ave 42 max 22 min -Histogram: 1 0 1 0 0 2 0 1 1 2 -Nghost: 23.375 ave 30 max 14 min -Histogram: 1 0 1 0 0 2 1 0 1 2 -Neighs: 52.25 ave 69 max 27 min -Histogram: 1 0 1 0 1 0 1 1 1 2 - -Total # of neighbors = 418 -Ave neighs/atom = 1.54815 -Neighbor list builds = 176 -Dangerous builds = 0 - -#undump 1 -unfix soft -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -Lattice spacing in x,y,z = 0.108465 0.108465 0.108465 -create_atoms 2 region plane -Created 60025 atoms - -set type 2 mass 0.1 - 60025 settings made for mass -group small type 2 -60025 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 - -delete_atoms overlap 0.5 small big -Deleted 16305 atoms, new total = 43990 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big rigid molecule -30 rigid bodies with 270 atoms -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes -fix 3 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 1000 dump.star - -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 100000 -SRD info: - SRD/big particles = 43720 270 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 106 106 1 - SRD grid size: request, actual (xyz) = 0.25, 0.250819 0.250819 1 - SRD per actual grid cell = 5.55866 - SRD viscosity = 0.235582 - big/SRD mass density ratio = 0.144099 -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875) - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.19085 7.72582 - ave/max big velocity = 2.20262 5.4168 -Memory usage per processor = 7.83759 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 1.3155168 8201 0.22979575 37.225304 37.439685 8.9588433 14577 56 56 0 687 57680 11236 8201 1.0283377 0 5 0 - 2000 0.82290815 8187 0.22918912 37.206746 37.340849 6.0607727 14326 56 56 0 1524 57680 11236 8187 1.0127464 0 5 0 - 3000 0.99928391 8168 0.22921842 37.182777 37.345623 10.268998 14389 68 68 0 2274 57680 11236 8168 1.023497 0 5 0 - 4000 1.0348458 8200 0.22920437 37.174693 37.343335 9.8954805 14335 51 51 0 3047 57680 11236 8200 1.0156984 0 5 0 - 5000 1.1496765 8199 0.22939095 37.186379 37.373733 8.0143223 14444 74 74 0 3868 57680 11236 8199 1.0104858 0 5 0 - 6000 0.91767381 8225 0.2292466 37.200668 37.350215 8.6189298 14131 61 61 0 4594 57680 11236 8225 1.0147272 0 5 0 - 7000 0.74806752 8203 0.22888634 37.169611 37.291518 9.8613421 14121 53 53 1 5322 57680 11236 8203 1.0198289 0 19 0 - 8000 1.1177867 8213 0.22924801 37.168286 37.350444 7.911691 14380 62 62 0 6024 57680 11236 8213 1.0066799 0 19 0 - 9000 1.1258411 8209 0.22939703 37.191253 37.374723 6.7377179 14350 51 51 0 6821 57680 11236 8209 1.0081225 0 19 0 - 10000 1.0597344 8182 0.22919436 37.169006 37.341703 9.7769156 14372 48 48 0 7543 57680 11236 8182 1.0099373 0 19 0 - 11000 1.3337199 8159 0.22943046 37.162823 37.38017 6.0897666 14359 58 58 0 8245 57680 11236 8159 1.0046221 0 19 0 - 12000 1.0280975 8184 0.22894286 37.133186 37.300728 2.555317 14162 51 51 0 8935 57680 11236 8184 1.0010306 0 19 0 - 13000 1.2318533 8190 0.22921487 37.144299 37.345045 6.1739989 14285 64 64 0 9634 57680 11236 8190 1.0138112 0 19 0 - 14000 1.1851991 8215 0.22915708 37.142485 37.335629 7.8380175 14151 66 66 0 10407 57680 11236 8215 1.0008011 0 19 0 - 15000 0.89853218 8214 0.22897294 37.159201 37.305628 4.0743953 14077 61 61 0 11069 57680 11236 8214 1.0041341 0 19 0 - 16000 1.0295974 8176 0.22891205 37.127921 37.295708 8.7527117 14000 48 48 0 11832 57680 11236 8176 1.0089653 0 23 0 - 17000 1.1793664 8219 0.22906268 37.128056 37.320249 5.2583304 14268 57 57 0 12490 57680 11236 8219 1.0157079 0 23 0 - 18000 0.90486919 8180 0.22891008 37.147927 37.295387 4.8498125 13939 64 64 0 13154 57680 11236 8180 0.99700921 0 23 0 - 19000 0.81486319 8219 0.22881911 37.147773 37.280566 1.6338041 13934 59 59 1 13861 57680 11236 8219 1.0099189 0 23 0 - 20000 1.0146287 8180 0.22896254 37.138587 37.303934 2.1682593 14057 45 45 0 14593 57680 11236 8180 1.0009466 0 23 0 - 21000 1.3031463 8164 0.22920646 37.131309 37.343674 6.570906 13944 65 65 0 15323 57680 11236 8164 0.98955239 0 23 0 - 22000 1.1258162 8174 0.22915084 37.151147 37.334613 9.0817519 14052 56 56 0 16042 57680 11236 8174 1.0083228 0 23 0 - 23000 1.1421222 8217 0.22906722 37.134865 37.320989 8.0529401 14143 66 66 0 16797 57680 11236 8217 1.0111161 0 23 0 - 24000 0.77402445 8168 0.22883056 37.156294 37.282431 6.8609899 14258 62 62 0 17559 57680 11236 8168 1.0080535 0 23 0 - 25000 0.94006632 8215 0.22879533 37.123496 37.276692 3.8570839 14446 48 48 0 18267 57680 11236 8215 1.0087899 0 23 0 - 26000 1.2808563 8192 0.22933112 37.155253 37.363985 5.3591484 13960 54 54 1 19004 57680 11236 8192 1.0101851 0 79 0 - 27000 1.0266075 8171 0.22898652 37.140542 37.307841 2.9961422 14049 56 56 1 19683 57680 11236 8171 0.99950217 0 79 0 - 28000 0.98185838 8199 0.22867129 37.096475 37.256481 12.080529 14106 61 62 0 20417 57680 11236 8199 1.0026548 0 79 0 - 29000 0.96921352 8192 0.22861802 37.089856 37.247802 8.257635 13891 63 64 0 21169 57680 11236 8192 1.0128041 0 79 0 - 30000 1.0107665 8223 0.22866616 37.090929 37.255646 9.4280788 14021 61 61 1 21863 57680 11236 8223 1.0034994 0 79 0 - 31000 1.1859435 8195 0.22877222 37.079661 37.272926 7.3863353 14093 78 78 0 22480 57680 11236 8195 0.9945582 0 79 0 - 32000 1.2951374 8172 0.22897044 37.094161 37.30522 6.4322363 13792 52 52 0 23151 57680 11236 8172 1.0026092 0 79 0 - 33000 0.82899919 8176 0.22823894 37.050944 37.186041 0.60210493 13797 62 62 0 23903 57680 11236 8176 1.0051075 0 79 0 - 34000 0.96685714 8165 0.22828901 37.036637 37.194199 8.1409866 13837 50 50 0 24591 57680 11236 8165 1.0157895 0 79 0 - 35000 0.95645753 8206 0.22833008 37.045022 37.200889 8.9956195 14130 63 63 0 25340 57680 11236 8206 1.0030424 0 79 0 - 36000 1.2933379 8197 0.22879201 37.065383 37.27615 8.3938627 13978 80 80 0 26085 57680 11236 8197 1.0094497 0 79 0 - 37000 1.1511434 8176 0.22861016 37.058929 37.246523 4.9481995 13856 49 49 1 26759 57680 11236 8176 1.0063722 0 79 0 - 38000 0.93310274 8181 0.22837532 37.056199 37.20826 5.9575015 13949 51 51 0 27445 57680 11236 8181 1.0152607 0 79 0 - 39000 1.0352467 8215 0.22861437 37.078501 37.247208 9.8519532 14109 69 69 0 28245 57680 11236 8215 1.005523 0 79 0 - 40000 1.2696427 8193 0.22885162 37.078957 37.285862 8.4680587 13931 54 55 0 28960 57680 11236 8193 1.0014074 0 79 0 - 41000 1.3270531 8193 0.22909573 37.109374 37.325634 4.3731598 14115 62 62 0 29668 57680 11236 8193 1.0022493 0 79 0 - 42000 1.3650738 8183 0.22911257 37.105921 37.328377 6.6345101 13659 52 52 0 30400 57680 11236 8183 1.0145834 0 79 0 - 43000 1.0780084 8209 0.22855316 37.06156 37.237235 5.5147087 14062 52 52 0 31092 57680 11236 8209 1.0031365 0 79 0 - 44000 0.96146724 8193 0.22846546 37.066263 37.222946 9.7967735 13699 56 56 0 31771 57680 11236 8193 1.0072364 0 79 0 - 45000 1.1733618 8200 0.2286481 37.061489 37.252703 9.8058881 13967 51 52 0 32532 57680 11236 8200 1.0068663 0 79 0 - 46000 0.94784989 8211 0.22845052 37.066048 37.220513 5.8834756 13944 34 35 0 33213 57680 11236 8211 1.0080225 0 79 0 - 47000 1.2354771 8207 0.22859598 37.042876 37.244213 6.1458407 13851 56 56 0 33886 57680 11236 8207 1.0151781 0 79 0 - 48000 1.0834097 8164 0.22835968 37.029157 37.205712 6.7378814 13944 56 56 0 34578 57680 11236 8164 1.0128575 0 79 0 - 49000 0.9386786 8208 0.22837254 37.054838 37.207808 5.0809383 13618 53 53 0 35328 57680 11236 8208 1.0045622 0 79 0 - 50000 1.047176 8154 0.22859126 37.072791 37.243442 4.8016981 13847 55 55 0 36059 57680 11236 8154 1.0005378 0 79 0 - 51000 1.0943417 8222 0.22844191 37.040773 37.21911 7.9359541 13897 61 61 0 36711 57680 11236 8222 1.0036343 0 79 0 - 52000 1.2811259 8200 0.22871149 37.054255 37.263031 4.9958687 13744 56 56 0 37402 57680 11236 8200 1.0049188 0 79 0 - 53000 1.0997162 8218 0.22853173 37.05453 37.233743 4.6772882 13967 65 65 0 38082 57680 11236 8218 1.0054533 0 79 0 - 54000 0.97625718 8185 0.2283994 37.05309 37.212184 5.9026406 13741 69 69 0 38761 57680 11236 8185 0.99393606 0 79 0 - 55000 0.97919465 8192 0.22835234 37.044944 37.204516 6.8419755 13990 58 58 0 39453 57680 11236 8192 1.0103052 0 79 0 - 56000 0.86300824 8181 0.22842164 37.075169 37.215808 6.8288348 13751 57 57 0 40118 57680 11236 8181 0.99683099 0 79 0 - 57000 0.89429559 8181 0.22851743 37.085677 37.231414 9.378853 13746 72 72 0 40730 57680 11236 8181 1.0086882 0 79 0 - 58000 1.0853441 8172 0.22857719 37.064279 37.24115 7.4580035 13869 58 58 1 41462 57680 11236 8172 1.0092141 0 79 0 - 59000 1.0149632 8199 0.22868187 37.092803 37.258205 8.2913359 13720 54 54 0 42159 57680 11236 8199 1.0082738 0 79 0 - 60000 0.99214038 8241 0.22871146 37.101344 37.263026 7.9905647 13776 67 67 0 42858 57680 11236 8241 1.0027929 0 79 0 - 61000 0.95721926 8211 0.2285241 37.07651 37.232501 11.837258 13907 62 62 0 43565 57680 11236 8211 1.0201117 0 79 0 - 62000 1.1457294 8195 0.22866514 37.068769 37.25548 9.7934944 13796 40 40 1 44292 57680 11236 8195 1.005192 0 79 0 - 63000 1.1096177 8193 0.22863037 37.068989 37.249815 8.0809047 13984 54 55 0 44986 57680 11236 8193 1.0076438 0 79 0 - 64000 1.1643495 8168 0.22860016 37.055147 37.244893 4.7376475 13857 50 50 1 45657 57680 11236 8168 1.002011 0 79 0 - 65000 1.2172585 8201 0.22845803 37.023368 37.221736 8.9744616 13610 53 53 0 46295 57680 11236 8201 1.0033999 0 79 0 - 66000 0.99924611 8189 0.22807344 36.996237 37.159077 8.5854786 13849 49 49 0 46944 57680 11236 8189 1.015528 0 79 0 - 67000 1.2543542 8165 0.22831075 36.993327 37.19774 5.0081411 13906 57 58 1 47666 57680 11236 8165 1.0189753 0 79 0 - 68000 1.0360874 8205 0.22812149 36.99806 37.166904 2.2431831 13650 52 52 0 48363 57680 11236 8205 1.0076864 0 79 0 - 69000 0.69755552 8218 0.22766249 36.978446 37.092121 4.2769033 13654 51 51 0 49044 57680 11236 8218 1.009863 0 79 0 - 70000 0.90921994 8167 0.22796236 36.992809 37.140978 9.3555738 13927 52 52 0 49793 57680 11236 8167 1.0015807 0 79 0 - 71000 0.95608837 8177 0.22797832 36.987772 37.143579 8.0740708 13612 63 63 0 50464 57680 11236 8177 1.0097491 0 79 0 - 72000 1.0374855 8192 0.22803745 36.98414 37.153212 4.4789755 13561 52 52 0 51127 57680 11236 8192 0.99496724 0 79 0 - 73000 0.90636338 8214 0.22783374 36.97232 37.120024 9.3364171 13598 53 53 0 51799 57680 11236 8214 1.0078219 0 79 0 - 74000 1.1869638 8179 0.22834625 37.010094 37.203525 4.8292929 13771 51 51 0 52500 57680 11236 8179 0.98865277 0 79 0 - 75000 1.0177351 8188 0.22826506 37.024443 37.190296 5.1808505 13508 55 55 0 53183 57680 11236 8188 0.99903558 0 79 0 - 76000 1.062496 8230 0.22820987 37.008158 37.181305 8.1032524 13769 58 58 0 53864 57680 11236 8230 0.99397021 0 79 0 - 77000 0.9762027 8131 0.22831271 37.038975 37.19806 10.309798 13787 47 47 0 54553 57680 11236 8131 1.0066289 0 79 0 - 78000 1.0688533 8160 0.22855677 37.06364 37.237824 7.4800503 13224 58 58 0 55248 57680 11236 8160 1.0073477 0 79 0 - 79000 1.2598513 8151 0.22844942 37.015024 37.220333 7.4724924 13859 63 63 0 55911 57680 11236 8151 1.0065168 0 79 0 - 80000 1.1044575 8176 0.22834306 37.023019 37.203005 3.0142586 13579 62 62 0 56611 57680 11236 8176 1.0008704 0 79 0 - 81000 1.2756491 8205 0.22853748 37.026797 37.23468 6.434309 13702 52 52 0 57313 57680 11236 8205 1.0058366 0 79 0 - 82000 1.1276926 8193 0.22857049 37.056287 37.240059 11.825248 13621 63 63 0 58011 57680 11236 8193 1.0113537 0 79 0 - 83000 0.96941691 8173 0.22824759 37.029471 37.18745 2.9152799 13478 48 49 0 58712 57680 11236 8173 1.0168819 0 79 0 - 84000 1.0770325 8186 0.22821292 37.006285 37.181802 5.0626072 13733 60 61 0 59433 57680 11236 8186 1.0177757 0 79 0 - 85000 1.1959489 8175 0.2284266 37.021719 37.216615 5.3844747 13964 55 55 0 60226 57680 11236 8175 1.007371 0 79 0 - 86000 1.035779 8204 0.22845952 37.053185 37.221979 7.5428558 13713 64 64 0 60982 57680 11236 8204 1.0110801 0 79 0 - 87000 1.1878573 8204 0.22836412 37.012859 37.206436 3.1124447 13655 47 47 0 61668 57680 11236 8204 1.0034968 0 79 0 - 88000 0.98402924 8206 0.22815704 37.012337 37.172698 10.613422 13947 56 56 0 62325 57680 11236 8206 1.0081468 0 79 0 - 89000 0.83763529 8199 0.22807071 37.022127 37.158631 5.4628281 13966 50 50 0 63012 57680 11236 8199 0.99956322 0 79 0 - 90000 1.1976672 8187 0.22849599 37.032745 37.227921 5.5583762 13903 43 43 0 63697 57680 11236 8187 1.0047573 0 79 0 - 91000 0.94863742 8188 0.22818061 37.021945 37.176537 5.157692 13859 46 46 0 64382 57680 11236 8188 1.0041894 0 79 0 - 92000 1.2038427 8172 0.22846103 37.026042 37.222224 6.685059 13675 57 57 0 65081 57680 11236 8172 1.0036906 0 79 0 - 93000 0.95835618 8210 0.22828548 37.037446 37.193622 8.0038227 13826 57 58 0 65761 57680 11236 8210 1.0076646 0 79 0 - 94000 1.2451267 8197 0.22856138 37.035665 37.238575 3.6305666 13918 62 62 0 66462 57680 11236 8197 1.0110913 0 79 0 - 95000 0.82128549 8206 0.22809174 37.028218 37.162057 8.7024273 13817 44 44 0 67185 57680 11236 8206 1.0032224 0 79 0 - 96000 0.83473128 8199 0.22820935 37.04519 37.18122 8.1258155 14167 54 54 0 67912 57680 11236 8199 1.0035561 0 79 0 - 97000 0.98924493 8196 0.22847944 37.064014 37.225225 8.9964529 14039 48 51 0 68608 57680 11236 8196 1.0007515 0 79 0 - 98000 1.1749668 8211 0.22879851 37.085733 37.27721 7.0283734 13850 58 59 0 69305 57680 11236 8211 0.99525651 0 79 0 - 99000 1.3269705 8163 0.22890919 37.078994 37.295241 9.7962294 13885 63 63 0 69994 57680 11236 8163 1.011015 0 107 0 - 100000 1.0020436 8171 0.22867221 37.093336 37.256632 4.9455304 14102 55 56 0 70707 57680 11236 8171 1.0072865 0 107 0 -Loop time of 33.9872 on 8 procs for 100000 steps with 43990 atoms - -Pair time (%) = 0.379981 (1.11801) -Neigh time (%) = 2.01801 (5.93757) -Comm time (%) = 2.30255 (6.77476) -Outpt time (%) = 0.00694308 (0.0204285) -Other time (%) = 29.2797 (86.1492) - -Nlocal: 5498.75 ave 6445 max 4431 min -Histogram: 1 0 0 2 1 1 0 1 1 1 -Nghost: 62.5 ave 70 max 57 min -Histogram: 3 0 0 1 1 0 1 0 1 1 -Neighs: 207 ave 365 max 92 min -Histogram: 1 1 1 1 2 0 1 0 0 1 - -Total # of neighbors = 1656 -Ave neighs/atom = 0.0376449 -Neighbor list builds = 5000 -Dangerous builds = 0 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/star/log.1Feb14.star.mp.g++.8 b/examples/ASPHERE/star/log.1Feb14.star.mp.g++.8 deleted file mode 100644 index b53b8961e3..0000000000 --- a/examples/ASPHERE/star/log.1Feb14.star.mp.g++.8 +++ /dev/null @@ -1,291 +0,0 @@ -LAMMPS (1 Feb 2014) -# SRD viscosity demo - rigid star particles - -units lj -atom_style sphere -atom_modify map array first big -dimension 2 - -# read in clusters of rigid bodies - -fix molprop all property/atom mol -read_data data.star fix molprop NULL Molecules - orthogonal box = (-13.2934 -13.2934 -0.5) to (13.2934 13.2934 0.5) - 4 by 2 by 1 MPI processor grid - reading atoms ... - 270 atoms - -set type 1 mass 1.0 - 270 settings made for mass -group big type 1 -270 atoms in group big -velocity big create 1.44 87287 loop geom - -# equilibrate big particles - -pair_style soft 1.12 -pair_coeff 1 1 0.0 -pair_coeff 2 2 0.0 0.0 -pair_coeff 1 2 0.0 0.0 - -variable prefactor equal ramp(0,60) -fix soft all adapt 1 pair soft a * * v_prefactor - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 big rigid molecule -30 rigid bodies with 270 atoms -fix 2 all enforce2d - -#dump 1 all atom 10 dump.star.equil - -thermo 100 -run 1000 -Memory usage per processor = 2.64859 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 0 0 0 0 0.24721146 - 100 0 3.291475 0 3.291475 0.69158089 - 200 0 4.6176595 0 4.6176595 0.71737945 - 300 0 7.0921814 0 7.0921814 1.2163497 - 400 0 8.3666709 0 8.3666709 0.50645957 - 500 0 10.630838 0 10.630838 0.72764487 - 600 0 12.42157 0 12.42157 1.0130599 - 700 0 14.349074 0 14.349074 0.74795509 - 800 0 16.464746 0 16.464746 1.054549 - 900 0 18.253108 0 18.253108 0.51551753 - 1000 0 20.699563 0 20.699563 1.8084662 -Loop time of 0.0484946 on 8 procs for 1000 steps with 270 atoms - -Pair time (%) = 0.00250834 (5.17242) -Neigh time (%) = 0.000999629 (2.06132) -Comm time (%) = 0.0154877 (31.9369) -Outpt time (%) = 0.000273734 (0.564464) -Other time (%) = 0.0292252 (60.2649) - -Nlocal: 33.75 ave 42 max 22 min -Histogram: 1 0 1 0 0 2 0 1 1 2 -Nghost: 23.375 ave 30 max 14 min -Histogram: 1 0 1 0 0 2 1 0 1 2 -Neighs: 52.25 ave 69 max 27 min -Histogram: 1 0 1 0 1 0 1 1 1 2 - -Total # of neighbors = 418 -Ave neighs/atom = 1.54815 -Neighbor list builds = 176 -Dangerous builds = 0 - -#undump 1 -unfix soft -unfix 1 -unfix 2 - -# add small particles as hi density lattice - -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 85.0 -Lattice spacing in x,y,z = 0.108465 0.108465 0.108465 -create_atoms 2 region plane -Created 60025 atoms - -set type 2 mass 0.1 - 60025 settings made for mass -group small type 2 -60025 atoms in group small -velocity small create 1.0 593849 loop geom - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.5 - -delete_atoms overlap 0.5 small big -Deleted 16305 atoms, new total = 43990 - -# SRD run - -reset_timestep 0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -communicate multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big rigid molecule -30 rigid bodies with 270 atoms -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d - -# diagnostics - -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] - -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439) -thermo 1000 - -#dump 1 all atom 1000 dump.star.mp - -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 - -run 100000 -SRD info: - SRD/big particles = 43720 270 - big particle diameter max/min = 1 1 - SRD temperature & lamda = 1 0.0632456 - SRD max distance & max velocity = 0.252982 12.6491 - SRD grid counts: 106 106 1 - SRD grid size: request, actual (xyz) = 0.25, 0.250819 0.250819 1 - SRD per actual grid cell = 5.55866 - SRD viscosity = 0.235582 - big/SRD mass density ratio = 0.144099 -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875) - # of rescaled SRD velocities = 0 - ave/max small velocity = 4.19085 7.72582 - ave/max big velocity = 2.20262 5.4168 -Memory usage per processor = 7.83759 Mbytes -Step Temp 2[8] TotEng pebig ebig Press 2[1] 2[2] 2[3] 2[4] 2[5] 2[6] 2[7] 2[8] 2[9] 2[10] 2[11] 2[12] - 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 - 1000 1.3197888 8196 0.2296966 37.208454 37.42353 7.4694369 14388 59 59 0 707 57680 11236 8196 1.0259754 0 5 0 - 2000 1.5789784 8192 0.22993088 37.204387 37.461702 7.6252927 14352 56 56 0 1521 57680 11236 8192 1.0168955 0 7 0 - 3000 1.286186 8153 0.2296947 37.213621 37.423222 8.8624394 14533 73 73 0 2299 57680 11236 8153 1.0109574 0 7 0 - 4000 2.0862082 8194 0.23044604 37.20566 37.545635 7.8064365 14228 48 48 0 3068 57680 11236 8194 1.0046224 0 7 0 - 5000 1.892401 8172 0.23019301 37.196017 37.504409 7.9041579 14290 55 55 0 3866 57680 11236 8172 1.005673 0 7 0 - 6000 2.1063411 8138 0.23041636 37.197543 37.540799 4.8468885 13803 47 47 0 4638 57680 11236 8138 1.0083722 0 7 0 - 7000 2.3549938 8174 0.23071159 37.205123 37.5889 6.5703154 13773 58 58 0 5398 57680 11236 8174 1.0039365 0 7 0 - 8000 3.0660305 8216 0.23155654 37.226914 37.726563 11.977404 13898 65 65 0 6180 57680 11236 8216 0.99586836 0 7 0 - 9000 3.1510761 8203 0.23143756 37.19367 37.707178 7.2978028 13815 54 54 0 6985 57680 11236 8203 0.99794556 0 7 0 - 10000 2.7472522 8196 0.23096076 37.181796 37.629496 11.336568 14012 59 59 0 7812 57680 11236 8196 0.99210203 0 11 0 - 11000 2.1776587 8186 0.23038876 37.181424 37.536302 9.2106614 14063 64 64 0 8627 57680 11236 8186 1.003993 0 11 0 - 12000 3.0146734 8196 0.2312123 37.179198 37.670478 5.9303705 14077 60 60 0 9436 57680 11236 8196 0.98496016 0 23 0 - 13000 3.0029829 8179 0.23150759 37.229214 37.718589 7.3329148 14116 74 74 0 10339 57680 11236 8179 1.0039911 0 23 0 - 14000 3.2942972 8191 0.23166868 37.207985 37.744833 9.6428846 14019 56 57 0 11290 57680 11236 8191 0.99410574 0 23 0 - 15000 3.8480961 8213 0.23228155 37.217589 37.844686 2.1025549 13746 68 68 0 12175 57680 11236 8213 1.0011325 0 23 0 - 16000 3.2573043 8195 0.2316418 37.209634 37.740454 8.1255708 13682 55 55 0 13104 57680 11236 8195 1.0061399 0 23 0 - 17000 3.3579037 8186 0.2315443 37.177356 37.72457 9.8606039 13833 54 54 0 14034 57680 11236 8186 1.004156 0 23 0 - 18000 4.7903055 8194 0.23307181 37.192799 37.973441 3.8090185 13914 55 55 1 15012 57680 11236 8194 0.98633014 0 23 0 - 19000 4.4696839 8183 0.23293212 37.222288 37.950681 7.1931333 13499 54 54 0 15960 57680 11236 8183 0.98359656 0 23 0 - 20000 5.0239019 8126 0.23355887 37.234085 38.052794 5.1504203 13600 58 58 0 16972 57680 11236 8126 0.98555755 0 23 0 - 21000 4.6595948 8155 0.23275722 37.162845 37.922186 9.0375076 13965 73 74 0 17966 57680 11236 8155 0.99574348 0 23 0 - 22000 4.043444 8124 0.23247599 37.217434 37.876366 3.9265975 13584 53 53 2 18989 57680 11236 8124 0.9943952 0 23 0 - 23000 4.9981028 8127 0.23314549 37.170939 37.985445 4.2352191 13589 47 47 0 19958 57680 11236 8127 0.99276741 0 47 0 - 24000 4.7542655 8145 0.23295434 37.179533 37.954302 7.365415 13753 51 51 0 20955 57680 11236 8145 0.99024306 0 47 0 - 25000 4.2987054 8177 0.23252979 37.184601 37.885131 10.735771 13536 58 58 0 21994 57680 11236 8177 0.99215977 0 47 0 - 26000 4.4136261 8170 0.23331629 37.294015 38.013272 14.25925 13842 58 58 0 22979 57680 11236 8170 0.99283174 0 47 0 - 27000 4.0546007 8173 0.23283443 37.274016 37.934766 6.22969 13877 51 51 0 23997 57680 11236 8173 0.98496361 0 47 0 - 28000 4.5919614 8151 0.23364384 37.318319 38.066638 4.9917488 13836 60 61 1 25071 57680 11236 8151 0.99390956 0 47 0 - 29000 4.8025535 8189 0.23313849 37.201667 37.984305 4.7895172 13978 46 47 0 26121 57680 11236 8189 0.99018295 0 47 0 - 30000 4.2835226 8139 0.23247583 37.178284 37.87634 8.994878 13988 61 61 0 27141 57680 11236 8139 0.98735471 0 47 0 - 31000 5.4049428 8133 0.23373767 37.201121 38.081927 7.6419291 13771 58 58 0 28207 57680 11236 8133 0.98354883 0 47 0 - 32000 5.0299584 8177 0.23336211 37.201041 38.020738 8.1206741 14036 55 55 0 29303 57680 11236 8177 0.98239013 0 47 0 - 33000 4.2993816 8158 0.23320229 37.29406 37.9947 10.745167 13583 51 51 0 30344 57680 11236 8158 0.98952524 0 47 0 - 34000 5.8334257 8179 0.23458355 37.269109 38.219741 11.094625 13921 62 62 0 31432 57680 11236 8179 0.98822406 0 47 0 - 35000 6.481318 8168 0.23501133 37.233224 38.289439 7.9397445 13942 56 56 0 32518 57680 11236 8168 0.98830425 0 47 0 - 36000 4.967891 8186 0.23366927 37.261199 38.070782 8.3979019 13952 51 51 0 33626 57680 11236 8186 0.99579665 0 47 0 - 37000 5.3458808 8145 0.2337339 37.210132 38.081312 5.4177865 13659 55 55 0 34715 57680 11236 8145 1.0009582 0 47 0 - 38000 6.3597955 8159 0.23479285 37.217431 38.253842 6.1408411 13754 55 56 0 35754 57680 11236 8159 0.98853252 0 47 0 - 39000 6.1217173 8195 0.23447066 37.203737 38.20135 9.6016075 13756 70 70 0 36807 57680 11236 8195 0.98652299 0 47 0 - 40000 5.0218059 8159 0.23370899 37.258886 38.077254 6.6460004 13603 56 56 1 37933 57680 11236 8159 0.98674585 0 47 0 - 41000 5.5873722 8138 0.23429215 37.26173 38.172265 1.4183057 13634 51 52 1 39050 57680 11236 8138 0.98833769 0 47 0 - 42000 5.5502013 8170 0.23405343 37.228895 38.133372 7.8338637 13913 72 72 0 40105 57680 11236 8170 0.99124609 0 47 0 - 43000 4.6854143 8161 0.23326283 37.241013 38.004562 7.857085 13759 48 48 0 41187 57680 11236 8161 0.99649848 0 47 0 - 44000 6.3172352 8180 0.2348893 37.240081 38.269557 12.59288 13810 55 55 0 42292 57680 11236 8180 0.99164669 0 47 0 - 45000 6.1213322 8166 0.23449878 37.208381 38.205931 6.3760889 13854 48 49 0 43406 57680 11236 8166 0.98981447 0 47 0 - 46000 5.0015874 8195 0.23354809 37.235965 38.051038 10.992836 13962 62 62 0 44527 57680 11236 8195 0.99128184 0 47 0 - 47000 5.0499615 8190 0.23376151 37.262854 38.085811 8.7985849 14105 64 64 0 45653 57680 11236 8190 0.99020272 0 47 0 - 48000 5.202255 8170 0.23400688 37.278013 38.125788 4.7389097 13754 51 51 0 46705 57680 11236 8170 0.98792999 0 47 0 - 49000 5.6144741 8167 0.23429848 37.258346 38.173297 6.3247626 13953 51 51 1 47846 57680 11236 8167 0.99270232 0 47 0 - 50000 6.3027505 8145 0.2347122 37.213588 38.240703 6.4424496 13843 59 59 0 49061 57680 11236 8145 0.99810926 0 47 0 - 51000 5.2050769 8154 0.23390178 37.26043 38.108665 6.6143765 13999 51 51 0 50075 57680 11236 8154 0.99525977 0 47 0 - 52000 5.4749884 8175 0.23418567 37.262697 38.154917 8.7256782 13916 51 51 0 51249 57680 11236 8175 0.99508289 0 47 0 - 53000 5.1367735 8158 0.23393299 37.276645 38.113748 9.3248422 13910 41 41 0 52381 57680 11236 8158 0.98956839 0 47 0 - 54000 4.8680584 8211 0.23402832 37.335968 38.129281 4.8979582 14214 63 64 0 53439 57680 11236 8211 0.98838908 0 47 0 - 55000 4.6223848 8167 0.23347097 37.285196 38.038473 6.1898955 14162 46 46 0 54504 57680 11236 8167 0.97935238 0 47 0 - 56000 4.9075747 8168 0.23409393 37.340218 38.139971 12.20686 13980 60 60 0 55540 57680 11236 8168 0.99885966 0 47 0 - 57000 4.8736147 8143 0.23354696 37.256636 38.050854 3.9348529 13857 59 59 0 56680 57680 11236 8143 0.98434054 0 47 0 - 58000 5.6134201 8162 0.23393276 37.198932 38.113711 3.7493067 13866 55 55 2 57767 57680 11236 8162 0.99041155 0 47 0 - 59000 5.440371 8197 0.23353392 37.162151 38.04873 4.1297786 13748 67 67 0 58894 57680 11236 8197 0.98824623 0 47 0 - 60000 5.2754075 8148 0.23359083 37.198307 38.058003 7.1427242 13781 55 55 0 60028 57680 11236 8148 0.9831827 0 47 0 - 61000 5.8228233 8153 0.23438274 37.23812 38.187025 8.8839625 14019 48 48 0 61204 57680 11236 8153 0.98566731 0 47 0 - 62000 5.7623285 8129 0.23480056 37.316052 38.255098 9.992341 13791 67 68 0 62385 57680 11236 8129 0.97338459 0 47 0 - 63000 6.095315 8178 0.23455792 37.222257 38.215567 10.722535 14210 54 54 0 63448 57680 11236 8178 0.98135973 0 47 0 - 64000 5.2494942 8189 0.23380158 37.236866 38.092339 4.4010329 13869 51 51 0 64538 57680 11236 8189 0.98071569 0 47 0 - 65000 5.6534858 8151 0.23405328 37.212039 38.133348 8.9144953 14065 53 53 0 65661 57680 11236 8151 0.99589337 0 47 0 - 66000 5.3999138 8165 0.23453061 37.33113 38.211116 7.3102657 13994 61 62 0 66785 57680 11236 8165 0.98715854 0 47 0 - 67000 6.3619419 8183 0.23459518 37.184875 38.221636 4.0425684 13859 49 49 0 67944 57680 11236 8183 0.98479883 0 47 0 - 68000 6.2170116 8157 0.23470153 37.225822 38.238965 9.3090925 13598 50 50 0 69121 57680 11236 8157 0.98683618 0 47 0 - 69000 6.8545121 8179 0.23542272 37.239433 38.356465 9.4175179 13911 59 59 0 70316 57680 11236 8179 0.99828763 0 47 0 - 70000 5.1476232 8154 0.23389653 37.268937 38.107809 7.6438157 13882 55 55 0 71380 57680 11236 8154 0.99088995 0 47 0 - 71000 5.9284504 8161 0.23499148 37.320087 38.286205 9.1242845 13968 60 60 0 72478 57680 11236 8161 0.98627289 0 47 0 - 72000 5.8044136 8180 0.23473312 37.298207 38.244111 6.6084298 14066 56 56 0 73653 57680 11236 8180 0.97959812 0 47 0 - 73000 5.3690655 8148 0.23424676 37.289911 38.16487 8.7025002 14433 55 55 1 74740 57680 11236 8148 0.97949605 0 47 0 - 74000 4.8144157 8192 0.23361625 37.277572 38.062144 7.6685178 14425 58 58 1 75918 57680 11236 8192 0.98949387 0 47 0 - 75000 4.9424688 8143 0.23362551 37.258213 38.063652 5.5882668 13938 42 42 0 77080 57680 11236 8143 0.99602516 0 47 0 - 76000 6.3017203 8178 0.23500247 37.261048 38.287995 5.2760401 13952 47 47 0 78240 57680 11236 8178 0.98484281 0 47 0 - 77000 5.3086333 8208 0.23389726 37.242817 38.107928 4.034731 14052 47 47 0 79331 57680 11236 8208 0.9896033 0 47 0 - 78000 6.1152265 8157 0.23546115 37.366171 38.362726 11.521489 13980 58 58 0 80446 57680 11236 8157 0.98562154 0 47 0 - 79000 6.5034669 8173 0.23569944 37.341726 38.40155 5.0939756 14030 74 74 0 81663 57680 11236 8173 0.98837711 0 47 0 - 80000 6.1688245 8182 0.23495003 37.274162 38.279451 6.3337593 14292 50 50 0 82872 57680 11236 8182 0.99316806 0 47 0 - 81000 6.3818913 8189 0.23516767 37.274899 38.314911 9.0232294 14259 56 56 0 84072 57680 11236 8189 0.98467136 0 47 0 - 82000 6.502454 8171 0.23498158 37.224932 38.284591 7.6685939 13970 63 63 0 85190 57680 11236 8171 0.99511647 0 47 0 - 83000 7.2245962 8142 0.23564338 37.215075 38.392416 6.0363083 13789 61 61 0 86416 57680 11236 8142 0.99223565 0 47 0 - 84000 6.3529888 8192 0.23477435 37.215526 38.250828 7.2109855 14062 52 52 0 87555 57680 11236 8192 0.98623425 0 47 0 - 85000 6.5185235 8177 0.23516364 37.251976 38.314254 5.266764 14325 52 53 0 88732 57680 11236 8177 0.97895516 0 47 0 - 86000 5.742959 8170 0.23432816 37.242243 38.178133 6.0834874 13922 48 48 0 89836 57680 11236 8170 0.99203022 0 47 0 - 87000 6.548676 8177 0.23495538 37.213132 38.280324 6.2502744 14147 48 48 0 91035 57680 11236 8177 0.98829721 0 47 0 - 88000 5.9500587 8193 0.23446634 37.231006 38.200645 6.2196893 13960 44 44 0 92206 57680 11236 8193 0.98956808 0 47 0 - 89000 5.0591447 8174 0.23386574 37.278339 38.102793 11.164066 14071 54 54 0 93437 57680 11236 8174 0.99827748 0 47 0 - 90000 6.4930795 8181 0.23544182 37.301445 38.359576 6.6167028 14183 63 63 1 94640 57680 11236 8181 0.99559871 0 47 0 - 91000 6.489104 8187 0.23523152 37.267829 38.325313 6.4932786 14223 51 51 1 95718 57680 11236 8187 0.99090796 0 47 0 - 92000 6.3543839 8184 0.23502776 37.256587 38.292116 7.1553807 14265 66 66 1 96903 57680 11236 8184 0.98979354 0 47 0 - 93000 5.3818591 8195 0.23393122 37.236417 38.11346 7.9445503 14327 70 70 0 98138 57680 11236 8195 1.0030252 0 47 0 - 94000 5.6818206 8171 0.2343696 37.258958 38.184885 5.7311019 13943 63 63 0 99306 57680 11236 8171 0.99691591 0 47 0 - 95000 4.8295204 8160 0.23371941 37.291918 38.078951 4.5703653 13682 48 48 1 100491 57680 11236 8160 1.0078235 0 47 0 - 96000 6.7415726 8191 0.23539566 37.253429 38.352056 11.837168 13783 53 53 1 101761 57680 11236 8191 1.0010125 0 49 0 - 97000 6.5298825 8160 0.2354153 37.291126 38.355255 7.6012271 13688 65 65 0 103010 57680 11236 8160 0.99694671 0 49 0 - 98000 6.2804965 8175 0.23496877 37.259015 38.282504 5.4636503 14041 55 55 0 104259 57680 11236 8175 1.0042653 0 49 0 - 99000 5.7684681 8173 0.2344998 37.26605 38.206096 1.7807753 14082 58 59 0 105418 57680 11236 8173 0.99124491 0 49 0 - 100000 6.1371898 8170 0.23495644 37.28036 38.280495 7.7665232 13908 53 53 0 106633 57680 11236 8170 0.98281247 0 49 0 -Loop time of 34.1892 on 8 procs for 100000 steps with 43990 atoms - -Pair time (%) = 0.361362 (1.05695) -Neigh time (%) = 2.01143 (5.88324) -Comm time (%) = 2.27139 (6.64359) -Outpt time (%) = 0.00694269 (0.0203067) -Other time (%) = 29.5381 (86.3959) - -Nlocal: 5498.75 ave 6478 max 4726 min -Histogram: 2 0 1 0 1 2 1 0 0 1 -Nghost: 52.875 ave 59 max 44 min -Histogram: 1 0 1 0 1 0 1 0 2 2 -Neighs: 186.25 ave 293 max 81 min -Histogram: 1 0 1 3 0 0 1 0 0 2 - -Total # of neighbors = 1490 -Ave neighs/atom = 0.0338713 -Neighbor list builds = 5000 -Dangerous builds = 0 - -Please see the log.cite file for references relevant to this simulation - diff --git a/examples/ASPHERE/star/log.1Feb24.star.g++.1 b/examples/ASPHERE/star/log.1Feb24.star.g++.1 new file mode 100644 index 0000000000..0fa1492dc6 --- /dev/null +++ b/examples/ASPHERE/star/log.1Feb24.star.g++.1 @@ -0,0 +1,321 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - rigid star particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 270 atoms + read_data CPU = 0.011 seconds + +set type 1 mass 1.0 +Setting atom values ... + 270 settings made for mass +group big type 1 +270 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.star.equil + +compute tbig all temp/sphere +thermo_modify temp tbig + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 38 38 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.562 | 5.562 | 5.562 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.3101488 0 0 0.21350573 0.32876464 + 100 5.0954142 3.291475 0 4.1218387 1.0087565 + 200 13.041252 4.6176595 0 6.7429006 1.5291618 + 300 11.912727 7.0921814 0 9.0335147 1.9578844 + 400 17.60886 8.3666709 0 11.236263 1.602563 + 500 16.786375 10.630838 0 13.366396 1.7725508 + 600 18.470347 12.42157 0 15.431552 2.1627885 + 700 19.39794 14.349074 0 17.510219 1.9554238 + 800 19.082984 16.464746 0 19.574566 2.2424126 + 900 20.702091 18.253108 0 21.626782 1.8041661 + 1000 18.299191 20.699563 0 23.681654 2.9475408 +Loop time of 0.0585091 on 1 procs for 1000 steps with 270 atoms + +Performance: 7383466.593 tau/day, 17091.358 timesteps/s, 4.615 Matom-step/s +99.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.017165 | 0.017165 | 0.017165 | 0.0 | 29.34 +Neigh | 0.0058479 | 0.0058479 | 0.0058479 | 0.0 | 9.99 +Comm | 0.0028221 | 0.0028221 | 0.0028221 | 0.0 | 4.82 +Output | 0.00017384 | 0.00017384 | 0.00017384 | 0.0 | 0.30 +Modify | 0.03015 | 0.03015 | 0.03015 | 0.0 | 51.53 +Other | | 0.00235 | | | 4.02 + +Nlocal: 270 ave 270 max 270 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 73 ave 73 max 73 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 418 ave 418 max 418 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 418 +Ave neighs/atom = 1.5481481 +Neighbor list builds = 176 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 60025 atoms + using lattice units in orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + create_atoms CPU = 0.013 seconds + +set type 2 mass 0.1 +Setting atom values ... + 60025 settings made for mass +group small type 2 +60025 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 19 19 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 16305 atoms, new total = 43990 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d + +# diagnostics + +uncompute tbig +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:904) + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.star + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 43720 270 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 106 106 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25081894 0.25081894 1 + SRD per actual grid cell = 5.5586635 + SRD viscosity = 0.23558168 + big/SRD mass density ratio = 0.14409881 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1908497 7.725824 + ave/max big velocity = 2.202625 5.4167964 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 26.586808, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 41.29 | 41.29 | 41.29 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.2074332 8227 0.22959643 37.210444 37.407211 7.9007359 14317 47 47 0 649 28900 11236 8227 1.0260288 0 3 0 + 2000 1.2044605 8206 0.22945824 37.188414 37.384697 5.8738384 14470 63 63 0 1423 28900 11236 8206 1.018589 0 4 0 + 3000 1.1060368 8226 0.22936549 37.189341 37.369584 4.7013136 14255 51 51 0 2207 28900 11236 8226 1.0007203 0 4 0 + 4000 1.2395587 8236 0.2294891 37.187723 37.389725 5.7916781 14371 56 56 0 2916 28900 11236 8236 1.0229966 0 4 0 + 5000 1.3332555 8236 0.22962818 37.195112 37.412383 10.662157 14373 61 61 0 3740 28900 11236 8236 1.0094713 0 4 0 + 6000 1.2991744 8192 0.22957221 37.191547 37.403264 1.2016626 14145 56 58 0 4425 28900 11236 8192 1.0215234 0 4 0 + 7000 1.0110737 8147 0.22923336 37.18329 37.348057 6.2493424 14200 59 59 0 5102 28900 11236 8147 1.0163405 0 4 0 + 8000 0.79508387 8168 0.22908516 37.194343 37.323912 9.832591 14355 45 45 0 5839 28900 11236 8168 1.0063207 0 4 0 + 9000 1.0340542 8207 0.2292515 37.1825 37.351013 11.458942 14220 54 54 0 6606 28900 11236 8207 1.0074421 0 4 0 + 10000 0.96342976 8202 0.22912995 37.174206 37.33121 1.7523017 14308 53 53 0 7379 28900 11236 8202 1.0126923 0 4 0 +Loop time of 18.5504 on 1 procs for 10000 steps with 43990 atoms + +Performance: 46575.737 tau/day, 539.071 timesteps/s, 23.714 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.21961 | 0.21961 | 0.21961 | 0.0 | 1.18 +Neigh | 0.055763 | 0.055763 | 0.055763 | 0.0 | 0.30 +Comm | 0.22073 | 0.22073 | 0.22073 | 0.0 | 1.19 +Output | 0.0013822 | 0.0013822 | 0.0013822 | 0.0 | 0.01 +Modify | 17.872 | 17.872 | 17.872 | 0.0 | 96.34 +Other | | 0.1812 | | | 0.98 + +Nlocal: 43990 ave 43990 max 43990 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 138 ave 138 max 138 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1587 ave 1587 max 1587 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1587 +Ave neighs/atom = 0.036076381 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:20 diff --git a/examples/ASPHERE/star/log.1Feb24.star.g++.4 b/examples/ASPHERE/star/log.1Feb24.star.g++.4 new file mode 100644 index 0000000000..66b9b04e63 --- /dev/null +++ b/examples/ASPHERE/star/log.1Feb24.star.g++.4 @@ -0,0 +1,321 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD diffusion demo - rigid star particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 270 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 270 settings made for mass +group big type 1 +270 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.star.equil + +compute tbig all temp/sphere +thermo_modify temp tbig + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 38 38 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.554 | 5.554 | 5.555 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.3101488 0 0 0.21350573 0.32876464 + 100 5.0954142 3.291475 0 4.1218387 1.0087565 + 200 13.041252 4.6176595 0 6.7429006 1.5291618 + 300 11.912727 7.0921814 0 9.0335147 1.9578844 + 400 17.60886 8.3666709 0 11.236263 1.602563 + 500 16.786375 10.630838 0 13.366396 1.7725508 + 600 18.470347 12.42157 0 15.431552 2.1627885 + 700 19.39794 14.349074 0 17.510219 1.9554238 + 800 19.082984 16.464746 0 19.574566 2.2424126 + 900 20.702091 18.253108 0 21.626782 1.8041661 + 1000 18.299191 20.699563 0 23.681654 2.9475408 +Loop time of 0.0312248 on 4 procs for 1000 steps with 270 atoms + +Performance: 13835169.963 tau/day, 32025.856 timesteps/s, 8.647 Matom-step/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0026978 | 0.0031211 | 0.0033489 | 0.5 | 10.00 +Neigh | 0.0011292 | 0.0013054 | 0.0014446 | 0.3 | 4.18 +Comm | 0.010095 | 0.010474 | 0.010975 | 0.3 | 33.54 +Output | 0.00019592 | 0.00021948 | 0.00027642 | 0.0 | 0.70 +Modify | 0.013333 | 0.013668 | 0.013952 | 0.2 | 43.77 +Other | | 0.002437 | | | 7.80 + +Nlocal: 67.5 ave 80 max 54 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Nghost: 29.75 ave 33 max 26 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Neighs: 104.5 ave 135 max 72 min +Histogram: 1 0 0 1 0 0 0 1 0 1 + +Total # of neighbors = 418 +Ave neighs/atom = 1.5481481 +Neighbor list builds = 176 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 60025 atoms + using lattice units in orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + create_atoms CPU = 0.003 seconds + +set type 2 mass 0.1 +Setting atom values ... + 60025 settings made for mass +group small type 2 +60025 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 19 19 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 16305 atoms, new total = 43990 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 all enforce2d + +# diagnostics + +uncompute tbig +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:904) + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.star + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 43720 270 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 106 106 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25081894 0.25081894 1 + SRD per actual grid cell = 5.5586635 + SRD viscosity = 0.23558168 + big/SRD mass density ratio = 0.14409881 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1908497 7.725824 + ave/max big velocity = 2.202625 5.4167964 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 26.586808, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 14.19 | 14.19 | 14.2 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.4057114 8217 0.22974151 37.20177 37.430849 11.548865 14197 56 57 0 682 42436 11236 8217 1.0187465 0 3 0 + 2000 1.0468288 8223 0.22932205 37.191914 37.362508 4.8322766 14185 60 60 0 1452 42436 11236 8223 1.0271433 0 64 0 + 3000 0.89541606 8240 0.22921893 37.199787 37.345707 9.7555289 14770 60 60 0 2175 42436 11236 8240 1.0157844 0 64 0 + 4000 1.021344 8222 0.22920858 37.177579 37.344021 6.2834235 14480 50 50 0 2951 42436 11236 8222 1.0130315 0 64 0 + 5000 1.045809 8222 0.2294309 37.209813 37.380241 2.8847497 14109 59 60 0 3667 42436 11236 8222 1.0126872 0 64 0 + 6000 1.1527336 8227 0.22933212 37.176296 37.364149 5.4760843 14597 42 42 0 4418 42436 11236 8227 1.0188272 0 64 0 + 7000 1.1799559 8216 0.22941075 37.18467 37.376959 10.243848 14281 57 57 0 5154 42436 11236 8216 1.0063617 0 64 0 + 8000 1.1913762 8188 0.22940126 37.181263 37.375413 5.7338518 14497 47 47 0 5878 42436 11236 8188 1.0076169 0 64 0 + 9000 1.0587094 8230 0.22928172 37.183406 37.355936 5.7323116 14267 62 62 0 6550 42436 11236 8230 1.0108237 0 64 0 + 10000 1.0359117 8165 0.22944086 37.21305 37.381865 9.4246373 14016 52 52 0 7246 42436 11236 8165 1.0147132 0 64 0 +Loop time of 6.61179 on 4 procs for 10000 steps with 43990 atoms + +Performance: 130675.562 tau/day, 1512.449 timesteps/s, 66.533 Matom-step/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.041077 | 0.059027 | 0.07409 | 4.8 | 0.89 +Neigh | 0.015706 | 0.017829 | 0.019903 | 1.1 | 0.27 +Comm | 0.23742 | 0.25326 | 0.26722 | 2.1 | 3.83 +Output | 0.00073333 | 0.00077549 | 0.00084859 | 0.0 | 0.01 +Modify | 6.1477 | 6.174 | 6.2149 | 1.0 | 93.38 +Other | | 0.1069 | | | 1.62 + +Nlocal: 10997.5 ave 11924 max 10204 min +Histogram: 1 0 1 0 0 1 0 0 0 1 +Nghost: 64.25 ave 71 max 56 min +Histogram: 1 0 0 1 0 0 0 0 1 1 +Neighs: 395.5 ave 497 max 271 min +Histogram: 1 0 0 0 0 1 1 0 0 1 + +Total # of neighbors = 1582 +Ave neighs/atom = 0.035962719 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:07 diff --git a/examples/ASPHERE/star/log.1Feb24.star.mp.g++.1 b/examples/ASPHERE/star/log.1Feb24.star.mp.g++.1 new file mode 100644 index 0000000000..4952b0bd30 --- /dev/null +++ b/examples/ASPHERE/star/log.1Feb24.star.mp.g++.1 @@ -0,0 +1,322 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - rigid star particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 270 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 270 settings made for mass +group big type 1 +270 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.star.equil + +compute tbig all temp/sphere +thermo_modify temp tbig + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 38 38 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.562 | 5.562 | 5.562 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.3101488 0 0 0.21350573 0.32876464 + 100 5.0954142 3.291475 0 4.1218387 1.0087565 + 200 13.041252 4.6176595 0 6.7429006 1.5291618 + 300 11.912727 7.0921814 0 9.0335147 1.9578844 + 400 17.60886 8.3666709 0 11.236263 1.602563 + 500 16.786375 10.630838 0 13.366396 1.7725508 + 600 18.470347 12.42157 0 15.431552 2.1627885 + 700 19.39794 14.349074 0 17.510219 1.9554238 + 800 19.082984 16.464746 0 19.574566 2.2424126 + 900 20.702091 18.253108 0 21.626782 1.8041661 + 1000 18.299191 20.699563 0 23.681654 2.9475408 +Loop time of 0.0474374 on 1 procs for 1000 steps with 270 atoms + +Performance: 9106745.092 tau/day, 21080.428 timesteps/s, 5.692 Matom-step/s +98.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.01287 | 0.01287 | 0.01287 | 0.0 | 27.13 +Neigh | 0.0050573 | 0.0050573 | 0.0050573 | 0.0 | 10.66 +Comm | 0.0024616 | 0.0024616 | 0.0024616 | 0.0 | 5.19 +Output | 0.00025461 | 0.00025461 | 0.00025461 | 0.0 | 0.54 +Modify | 0.024714 | 0.024714 | 0.024714 | 0.0 | 52.10 +Other | | 0.00208 | | | 4.38 + +Nlocal: 270 ave 270 max 270 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 73 ave 73 max 73 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 418 ave 418 max 418 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 418 +Ave neighs/atom = 1.5481481 +Neighbor list builds = 176 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 60025 atoms + using lattice units in orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + create_atoms CPU = 0.014 seconds + +set type 2 mass 0.1 +Setting atom values ... + 60025 settings made for mass +group small type 2 +60025 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 19 19 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 16305 atoms, new total = 43990 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +uncompute tbig +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:904) + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.star.mp + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 43720 270 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 106 106 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25081894 0.25081894 1 + SRD per actual grid cell = 5.5586635 + SRD viscosity = 0.23558168 + big/SRD mass density ratio = 0.14409881 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1908497 7.725824 + ave/max big velocity = 2.202625 5.4167964 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 26.586808, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 41.29 | 41.29 | 41.29 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 0.82328749 8250 0.22908506 37.18973 37.323895 6.0611499 14546 54 54 0 691 28900 11236 8250 1.025654 0 3 0 + 2000 1.314397 8198 0.22953802 37.183497 37.397695 7.6050033 14165 65 65 0 1503 28900 11236 8198 1.0137885 0 3 0 + 3000 1.4327928 8174 0.22973765 37.196727 37.430219 4.8441566 14378 43 43 0 2274 28900 11236 8174 1.0052401 0 5 0 + 4000 1.9637993 8194 0.23036966 37.213164 37.533191 4.9697216 14203 51 51 1 3241 28900 11236 8194 1.0129187 0 245 0 + 5000 1.6886675 8206 0.22987561 37.177507 37.452697 10.972628 14155 56 56 0 4073 28900 11236 8206 1.0024406 0 245 0 + 6000 1.7377657 8197 0.23000322 37.190296 37.473487 6.3971042 14331 57 57 0 4929 28900 11236 8197 1.0094945 0 245 0 + 7000 2.4106224 8199 0.23083719 37.216521 37.609363 5.1070917 14144 49 49 0 5822 28900 11236 8199 1.0074275 0 245 0 + 8000 2.5161884 8202 0.2306663 37.171475 37.581521 12.156127 14263 67 67 0 6667 28900 11236 8202 1.006502 0 245 0 + 9000 2.9100148 8188 0.23124828 37.202115 37.67634 6.1326598 14171 66 67 0 7443 28900 11236 8188 0.99544201 0 245 0 + 10000 3.4714177 8206 0.23192306 37.220567 37.78628 5.1293943 14100 48 49 0 8272 28900 11236 8206 1.0022763 0 245 0 +Loop time of 17.933 on 1 procs for 10000 steps with 43990 atoms + +Performance: 48179.444 tau/day, 557.632 timesteps/s, 24.530 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.22008 | 0.22008 | 0.22008 | 0.0 | 1.23 +Neigh | 0.054046 | 0.054046 | 0.054046 | 0.0 | 0.30 +Comm | 0.20917 | 0.20917 | 0.20917 | 0.0 | 1.17 +Output | 0.001317 | 0.001317 | 0.001317 | 0.0 | 0.01 +Modify | 17.275 | 17.275 | 17.275 | 0.0 | 96.33 +Other | | 0.1731 | | | 0.97 + +Nlocal: 43990 ave 43990 max 43990 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 122 ave 122 max 122 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1569 ave 1569 max 1569 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1569 +Ave neighs/atom = 0.035667197 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:19 diff --git a/examples/ASPHERE/star/log.1Feb24.star.mp.g++.4 b/examples/ASPHERE/star/log.1Feb24.star.mp.g++.4 new file mode 100644 index 0000000000..b4482fd530 --- /dev/null +++ b/examples/ASPHERE/star/log.1Feb24.star.mp.g++.4 @@ -0,0 +1,322 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# SRD viscosity demo - rigid star particles + +units lj +atom_style sphere +atom_modify map array first big +dimension 2 + +# read in clusters of rigid bodies + +fix molprop all property/atom mol ghost yes +read_data data.star fix molprop NULL Molecules +Reading data file ... + orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 270 atoms + read_data CPU = 0.001 seconds + +set type 1 mass 1.0 +Setting atom values ... + 270 settings made for mass +group big type 1 +270 atoms in group big +velocity big create 1.44 87287 loop geom + +# equilibrate big particles + +pair_style soft 1.12 +pair_coeff 1 1 0.0 +pair_coeff 2 2 0.0 0.0 +pair_coeff 1 2 0.0 0.0 + +variable prefactor equal ramp(0,60) +fix soft all adapt 1 pair soft a * * v_prefactor + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 all enforce2d + +#dump 1 all atom 10 dump.star.equil + +compute tbig all temp/sphere +thermo_modify temp tbig + +thermo 100 +run 1000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.42 + ghost atom cutoff = 1.42 + binsize = 0.71, bins = 38 38 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair soft, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.554 | 5.554 | 5.555 Mbytes + Step Temp E_pair E_mol TotEng Press + 0 1.3101488 0 0 0.21350573 0.32876464 + 100 5.0954142 3.291475 0 4.1218387 1.0087565 + 200 13.041252 4.6176595 0 6.7429006 1.5291618 + 300 11.912727 7.0921814 0 9.0335147 1.9578844 + 400 17.60886 8.3666709 0 11.236263 1.602563 + 500 16.786375 10.630838 0 13.366396 1.7725508 + 600 18.470347 12.42157 0 15.431552 2.1627885 + 700 19.39794 14.349074 0 17.510219 1.9554238 + 800 19.082984 16.464746 0 19.574566 2.2424126 + 900 20.702091 18.253108 0 21.626782 1.8041661 + 1000 18.299191 20.699563 0 23.681654 2.9475408 +Loop time of 0.0311841 on 4 procs for 1000 steps with 270 atoms + +Performance: 13853197.664 tau/day, 32067.587 timesteps/s, 8.658 Matom-step/s +97.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0027957 | 0.0031644 | 0.0035219 | 0.5 | 10.15 +Neigh | 0.001171 | 0.0012862 | 0.0014036 | 0.3 | 4.12 +Comm | 0.0099068 | 0.010544 | 0.011053 | 0.4 | 33.81 +Output | 0.00014281 | 0.00016091 | 0.00020823 | 0.0 | 0.52 +Modify | 0.013319 | 0.013618 | 0.014047 | 0.2 | 43.67 +Other | | 0.002411 | | | 7.73 + +Nlocal: 67.5 ave 80 max 54 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Nghost: 29.75 ave 33 max 26 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Neighs: 104.5 ave 135 max 72 min +Histogram: 1 0 0 1 0 0 0 1 0 1 + +Total # of neighbors = 418 +Ave neighs/atom = 1.5481481 +Neighbor list builds = 176 +Dangerous builds = 0 + +#undump 1 +unfix soft +unfix 1 +unfix 2 + +# add small particles as hi density lattice + +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 85.0 +Lattice spacing in x,y,z = 0.10846523 0.10846523 0.10846523 +create_atoms 2 region plane +Created 60025 atoms + using lattice units in orthogonal box = (-13.293404 -13.293404 -0.5) to (13.293404 13.293404 0.5) + create_atoms CPU = 0.003 seconds + +set type 2 mass 0.1 +Setting atom values ... + 60025 settings made for mass +group small type 2 +60025 atoms in group small +velocity small create 1.0 593849 loop geom + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.5 + +delete_atoms overlap 0.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 19 19 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 16305 atoms, new total = 43990 + +# SRD run + +reset_timestep 0 + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid molecule + 30 rigid bodies with 270 atoms +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 search 0.2 collision slip inside ignore overlap yes +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d + +# diagnostics + +uncompute tbig +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:904) + +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) +thermo 1000 + +#dump 1 all atom 1000 dump.star.mp + +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 43720 270 + big particle diameter max/min = 1 1 + SRD temperature & lamda = 1 0.063245553 + SRD max distance & max velocity = 0.25298221 12.649111 + SRD grid counts: 106 106 1 + SRD grid size: request, actual (xyz) = 0.25, 0.25081894 0.25081894 1 + SRD per actual grid cell = 5.5586635 + SRD viscosity = 0.23558168 + big/SRD mass density ratio = 0.14409881 +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) + # of rescaled SRD velocities = 0 + ave/max small velocity = 4.1908497 7.725824 + ave/max big velocity = 2.202625 5.4167964 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 26.586808, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/2d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 14.19 | 14.19 | 14.2 Mbytes + Step Temp f_2[8] TotEng v_pebig v_ebig Press f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12] + 0 18.299191 0 0.25067776 37.859815 40.841906 5.7680841 0 0 0 0 0 0 0 0 0 0 0 0 + 1000 1.3506473 8186 0.22968182 37.201018 37.421123 5.6398923 14572 54 54 0 654 42436 11236 8186 1.0228728 0 3 0 + 2000 0.99412905 8212 0.22952823 37.234094 37.3961 8.5863689 14257 69 69 0 1394 42436 11236 8212 1.0206297 0 12 0 + 3000 1.4469134 8192 0.22970951 37.189841 37.425634 8.0408437 14439 53 53 0 2178 42436 11236 8192 1.0121272 0 12 0 + 4000 1.6112802 8172 0.2303679 37.270324 37.532903 8.3379947 14098 57 57 0 2992 42436 11236 8172 1.0171443 0 12 0 + 5000 2.0436283 8191 0.23016186 37.166298 37.499334 7.1370191 14030 49 49 0 3804 42436 11236 8191 1.0054513 0 12 0 + 6000 2.2894073 8184 0.2303867 37.162878 37.535967 7.6496143 13970 50 50 0 4662 42436 11236 8184 1.0084738 0 12 0 + 7000 2.1640822 8183 0.23045121 37.193812 37.546477 7.1526683 13926 56 57 0 5445 42436 11236 8183 1.0046108 0 15 0 + 8000 2.8851243 8199 0.23121762 37.201176 37.671344 9.1644504 13849 58 58 0 6237 42436 11236 8199 1.0081629 0 15 0 + 9000 2.6422092 8180 0.23070839 37.157795 37.588377 2.4816571 13651 70 70 0 7007 42436 11236 8180 1.0089869 0 15 0 + 10000 2.7121051 8189 0.23087145 37.172972 37.614945 11.176036 13901 63 64 0 7845 42436 11236 8189 1.0023484 0 15 0 +Loop time of 6.56969 on 4 procs for 10000 steps with 43990 atoms + +Performance: 131513.146 tau/day, 1522.143 timesteps/s, 66.959 Matom-step/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.037869 | 0.059232 | 0.073664 | 5.4 | 0.90 +Neigh | 0.015688 | 0.017835 | 0.019891 | 1.1 | 0.27 +Comm | 0.22905 | 0.24375 | 0.26098 | 2.3 | 3.71 +Output | 0.00069058 | 0.00071614 | 0.00078869 | 0.0 | 0.01 +Modify | 6.1124 | 6.1385 | 6.1881 | 1.2 | 93.44 +Other | | 0.1096 | | | 1.67 + +Nlocal: 10997.5 ave 12305 max 10259 min +Histogram: 1 1 0 1 0 0 0 0 0 1 +Nghost: 58.25 ave 73 max 48 min +Histogram: 1 0 1 0 1 0 0 0 0 1 +Neighs: 402.75 ave 520 max 207 min +Histogram: 1 0 0 0 0 0 0 2 0 1 + +Total # of neighbors = 1611 +Ave neighs/atom = 0.03662196 +Neighbor list builds = 500 +Dangerous builds = 0 +Total wall time: 0:00:06 diff --git a/examples/ASPHERE/tri/in.tri.srd b/examples/ASPHERE/tri/in.tri.srd index 7878b9ecc2..b09ff05503 100644 --- a/examples/ASPHERE/tri/in.tri.srd +++ b/examples/ASPHERE/tri/in.tri.srd @@ -1,107 +1,107 @@ # Aspherical shear demo - 3d triangle boxes, solvated by SRD particles -units lj -atom_style tri -atom_modify first big map yes +units lj +atom_style tri +atom_modify first big map yes -read_data data.tri.srd +read_data data.tri.srd # add small particles as hi density lattice -lattice sc 0.4 -region box block INF INF INF INF INF INF -lattice sc 20.0 -create_atoms 2 region box +lattice sc 0.4 +region box block INF INF INF INF INF INF +lattice sc 20.0 +create_atoms 2 region box -group big type 1 -group small type 2 -set group small mass 0.01 +group big type 1 +group small type 2 +set group small mass 0.01 # delete overlaps # must set 1-2 cutoff to non-zero value -pair_style lj/cut 1.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 +pair_style lj/cut 1.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 -delete_atoms overlap 1.5 small big +delete_atoms overlap 1.5 small big # SRD run -reset_timestep 0 +reset_timestep 0 -velocity small create 1.44 87287 loop geom +velocity small create 1.44 87287 loop geom -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes -neigh_modify exclude molecule/intra big include big +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes +neigh_modify exclude molecule/intra big include big -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style tri/lj 3.5 -pair_coeff 1 1 0.1 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 +pair_style tri/lj 3.5 +pair_coeff 1 1 0.1 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398 -fix 2 small srd 20 big 1.0 1.0 49894 & - search 0.2 cubic warn 0.0001 shift yes 49829 & - overlap yes collision noslip inside ignore +fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398 +fix 2 small srd 20 big 1.0 1.0 49894 & + search 0.2 cubic warn 0.0001 shift yes 49829 & + overlap yes collision noslip inside ignore -fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8 +fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8 # diagnostics -compute tsmall small temp/deform -compute tbig big temp -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) +compute tsmall small temp/deform +compute tbig big temp +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) compute_modify tbig extra/dof -4500 -compute 1 big erotate/asphere -compute 2 all ke -compute 3 all pe -variable toteng equal (c_1+c_2+c_3)/atoms +compute 1 big erotate/asphere +compute 2 all ke +compute 3 all pe +variable toteng equal (c_1+c_2+c_3)/atoms -thermo 100 -thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4] -thermo_modify temp tbig +thermo 100 +thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4] +thermo_modify temp tbig -compute 10 all property/atom corner1x corner1y corner1z & - corner2x corner2y corner2z corner3x corner3y corner3z +compute 10 all property/atom corner1x corner1y corner1z & + corner2x corner2y corner2z corner3x corner3y corner3z -#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump1.tri.srd id type & -# c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] & -# c_10[7] c_10[8] c_10[9] +#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump1.tri.srd id type & +# c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] & +# c_10[7] c_10[8] c_10[9] -run 10000 +run 1000 #undump 1 #undump 2 -unfix 3 +unfix 3 change_box all triclinic -fix 2 small srd 20 big 1.0 1.0 49894 & - search 0.2 cubic warn 0.0001 shift yes 49829 & - overlap yes collision noslip tstat yes inside ignore +fix 2 small srd 20 big 1.0 1.0 49894 & + search 0.2 cubic warn 0.0001 shift yes 49829 & + overlap yes collision noslip tstat yes inside ignore -#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump2.tri.srd id type & -# c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] & -# c_10[7] c_10[8] c_10[9] +#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump2.tri.srd id type & +# c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] & +# c_10[7] c_10[8] c_10[9] -fix 3 all deform 1 xy erate 0.05 units box remap v +fix 3 all deform 1 xy erate 0.05 units box remap v -run 40000 +run 2000 diff --git a/examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8 b/examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8 deleted file mode 100644 index 6103a5c9c9..0000000000 --- a/examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8 +++ /dev/null @@ -1,812 +0,0 @@ -LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-114-gdad8081d55-modified) -WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:537) -# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles - -units lj -atom_style tri -atom_modify first big map yes - -read_data data.tri.srd -Reading data file ... - orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) - 2 by 2 by 2 MPI processor grid - reading atoms ... - 1500 atoms - 1500 triangles - read_data CPU = 0.007 seconds - -# add small particles as hi density lattice - -lattice sc 0.4 -Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 -region box block INF INF INF INF INF INF -lattice sc 20.0 -Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315 -create_atoms 2 region box -Created 91125 atoms - using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) - create_atoms CPU = 0.002 seconds - -group big type 1 -1500 atoms in group big -group small type 2 -91125 atoms in group small -set group small mass 0.01 -Setting atom values ... - 91125 settings made for mass - -# delete overlaps -# must set 1-2 cutoff to non-zero value - -pair_style lj/cut 1.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 - -delete_atoms overlap 1.5 small big -System init for delete_atoms ... -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.8 - ghost atom cutoff = 1.8 - binsize = 0.9, bins = 19 19 19 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) command delete_atoms, occasional - attributes: full, newton on - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard - (2) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/atomonly/newton - stencil: half/bin/3d - bin: standard -WARNING: Delete_atoms cutoff > minimum neighbor cutoff (../delete_atoms.cpp:312) -Deleted 76354 atoms, new total = 16271 - -# SRD run - -reset_timestep 0 - -velocity small create 1.44 87287 loop geom - -neighbor 0.3 multi -neigh_modify delay 0 every 1 check yes -neigh_modify exclude molecule/intra big include big - -comm_modify mode multi group big vel yes -neigh_modify include big - -# no pairwise interactions with small particles - -pair_style tri/lj 3.5 -pair_coeff 1 1 0.1 1.0 -pair_coeff 2 2 0.0 1.0 0.0 -pair_coeff 1 2 0.0 1.0 0.0 - -# use fix SRD to push small particles out from inside big ones -# if comment out, big particles won't see SRD particles - -timestep 0.001 - -fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398 - create bodies CPU = 0.000 seconds - 125 rigid bodies with 1500 atoms - 1.8601881 = max distance from body owner to body atom -fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore - -fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8 - -# diagnostics - -compute tsmall small temp/deform -compute tbig big temp -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) - -compute_modify tbig extra/dof -4500 - -compute 1 big erotate/asphere -compute 2 all ke -compute 3 all pe -variable toteng equal (c_1+c_2+c_3)/atoms - -thermo 100 -thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4] -thermo_modify temp tbig -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:527) - -compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z - -#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 - -@Article{Intveld08, - author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, - title = {Accurate and Efficient Methods for Modeling Colloidal - Mixtures in an Explicit Solvent using Molecular Dynamics}, - journal = {Comput.\ Phys.\ Commut.}, - year = 2008, - volume = 179, - pages = {320--329} -} - -@article{Shire2020, - author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, - title = {{DEM} Simulations of Polydisperse Media: Efficient Contact - Detection Applied to Investigate the Quasi-Static Limit}, - journal = {Computational Particle Mechanics}, - year = {2020} -@article{Monti2022, - author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, - Ishan and Silbert, Leonardo E. and Grest, Gary S. - and Lechman, Jeremy B.}, - title = {Large-scale frictionless jamming with power-law particle - size distributions}, - journal = {Phys. Rev. E}, - volume = {106} - issue = {3} - year = {2022} -} - -- fix srd command: doi:10.1063/1.3419070 - -@Article{Petersen10, - author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and - G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, - title = {Mesoscale Hydrodynamics via Stochastic Rotation - Dynamics: Comparison with {L}ennard-{J}ones Fluid}, - journal = {J.~Chem.\ Phys.}, - year = 2010, - volume = 132, - pages = 174106 -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:71) -WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:405) -SRD info: - SRD/big particles = 14771 1500 - big particle diameter max/min = 2.9202881 0.87320391 - SRD temperature & lamda = 1 0.2 - SRD max distance & max velocity = 0.8 40 - SRD grid counts: 17 17 17 - SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829 - SRD per actual grid cell = -3.9971745 - SRD viscosity = -34.162587 - big/SRD mass density ratio = -3.3753691 -WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805) -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826) -WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828) - # of rescaled SRD velocities = 0 - ave/max small velocity = 19.970837 35.150443 - ave/max big velocity = 0 0 -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 3.8 - ghost atom cutoff = 3.8 - binsize = 16.874681, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair tri/lj, perpetual - attributes: half, newton on - pair build: half/multi/newton - stencil: half/multi/3d - bin: multi -Per MPI rank memory allocation (min/avg/max) = 125.9 | 126.4 | 126.7 Mbytes - Step f_1 c_tsmall Temp Press f_2[9] f_2[4] - 0 0 1.4401779 0 -0.15917996 0 0 - 100 0.36662911 1.1475389 0.24585067 1.0290503 1.1382325 18 - 200 0.73133134 1.0558153 0.49986673 0.73932383 1.049638 34 - 300 1.1229361 1.0218621 0.82641583 0.7589689 1.0205369 40 - 400 1.5826262 0.99541508 1.2201293 0.69171726 0.99190857 52 - 500 1.8834563 0.99351667 1.4778822 1.0147794 1.0005581 63 - 600 2.4225372 0.98954834 1.8740966 1.1362893 0.99760042 61 - 700 3.0172772 0.99153625 2.3351502 1.3284877 0.98731355 39 - 800 3.5307913 1.0012521 2.6477224 1.1404922 0.9846605 52 - 900 3.757064 0.99743944 2.7220653 1.4078087 0.97538456 55 - 1000 4.3165268 1.002214 3.055501 1.2252972 0.99123745 63 - 1100 4.2796945 1.0075233 3.1022956 1.1893685 1.0139864 69 - 1200 4.3719315 1.0037271 3.0054509 1.3886162 1.002661 64 - 1300 4.5628012 0.99368316 3.2690604 1.3621012 0.9810568 56 - 1400 4.6954389 0.99365088 3.1940001 1.8485712 0.99571089 71 - 1500 5.0270163 0.99455258 3.4120396 1.5992539 0.98294263 77 - 1600 5.5897797 1.0021621 3.647347 1.7796904 0.98967622 66 - 1700 5.5330194 1.0130853 3.6407996 1.8005429 1.0068955 62 - 1800 5.3606928 1.0090284 3.5863618 1.3308757 1.0214092 59 - 1900 5.6086195 1.0071865 3.7427101 1.5296314 0.99886937 55 - 2000 5.3726474 1.0064207 3.603621 1.9473142 0.99999816 54 - 2100 5.836183 1.0124553 3.7321841 1.7889397 1.0188986 59 - 2200 5.5090061 1.0113832 3.5884963 1.6617781 1.0071583 59 - 2300 5.4011211 1.0095947 3.520406 1.8937582 0.99689983 61 - 2400 5.2219281 1.0053246 3.3699458 1.7231672 0.99899754 59 - 2500 5.7695275 1.0141459 3.6211469 1.7767598 1.0143133 65 - 2600 5.4206253 1.0182828 3.521774 2.0800518 1.0081603 70 - 2700 5.1401099 1.0085209 3.4200563 2.4019836 1.0107652 59 - 2800 6.5420721 1.0159876 4.1996904 1.863842 1.0160738 61 - 2900 5.9082962 1.0106921 3.7223419 2.0586998 1.0073885 67 - 3000 5.6556123 1.0099021 3.6768976 1.921987 1.0068962 76 - 3100 5.2913762 1.0008567 3.4103831 1.9831969 0.99187526 80 - 3200 5.1032361 0.99756662 3.1967156 2.2448433 0.99743574 93 - 3300 5.2622386 1.0024934 3.3325614 2.0078097 1.0047789 86 - 3400 5.1247527 0.99810102 3.1363556 1.8907269 0.98936508 82 - 3500 4.9424333 1.0009344 3.2153968 1.9002728 0.99161849 71 - 3600 5.1243735 1.0037377 3.3117313 2.1267438 1.0078943 65 - 3700 5.5045819 1.0006119 3.5686193 2.3466538 0.99876164 68 - 3800 5.5355384 1.0022639 3.6701457 2.0383269 1.0008683 76 - 3900 6.4915796 1.0137733 4.3225864 2.6996933 1.0064787 79 - 4000 6.6631737 1.0236248 4.3057163 2.6352666 1.0255232 75 - 4100 6.2999507 1.0263876 4.0101385 2.5479077 1.0168303 79 - 4200 6.7902489 1.0247392 4.4616158 2.4926177 1.0191403 91 - 4300 6.505908 1.0182073 4.0675428 2.168754 1.0177101 74 - 4400 5.9554283 1.0115938 3.5787297 2.9258144 1.0133896 72 - 4500 6.2276609 1.0202416 3.8211204 2.5308249 1.0174385 74 - 4600 6.0485727 1.0195757 3.8217434 2.6421797 1.0201441 78 - 4700 6.511063 1.0220764 3.933486 2.8591093 1.0147269 83 - 4800 6.9478172 1.0106414 4.345402 3.3257663 1.00469 85 - 4900 6.7547045 1.0211842 4.1874576 3.6503845 1.022873 94 - 5000 7.2603949 1.0234313 4.5393985 3.4667806 1.0222306 105 - 5100 7.1899652 1.0256566 4.5421834 3.8137207 1.0317242 99 - 5200 7.1960739 1.026746 4.4288606 3.5523675 1.0242269 97 - 5300 7.1294458 1.017883 4.5799808 3.3917274 1.0145317 99 - 5400 6.2810892 1.0291953 4.0109229 2.8604571 1.0289438 97 - 5500 6.15246 1.0288734 3.8714587 3.2760394 1.0210757 89 - 5600 6.5860526 1.0192882 4.0272883 3.3124298 1.0096258 93 - 5700 7.0296116 1.0097293 4.2652722 3.6049788 1.012463 82 - 5800 6.8372302 1.0140065 4.2205065 4.3686183 1.0088542 93 - 5900 7.8887098 1.0090612 4.9724078 4.457317 1.0045137 92 - 6000 10.120663 1.0312443 6.3025192 4.72018 1.0374722 91 - 6100 9.1318265 1.0304199 5.7084296 4.244548 1.0259056 97 - 6200 8.9758903 1.0295285 5.1842704 4.870955 1.0178851 95 - 6300 9.0088218 1.022484 5.3742805 5.1554352 1.0138365 101 - 6400 10.470322 1.0287848 6.4602103 4.5461489 1.0335978 105 - 6500 11.100779 1.0347405 6.9630121 4.9840664 1.0339044 99 - 6600 10.139333 1.0476079 6.4284839 4.5523893 1.0433517 104 - 6700 8.9706766 1.0386262 5.8387485 4.247024 1.0408151 101 - 6800 7.7799532 1.0362651 4.9946283 4.6093924 1.0274763 102 - 6900 8.0866551 1.0337743 4.9942769 4.1679939 1.0454805 102 - 7000 8.0224277 1.0193598 4.9380527 3.9173115 1.0185001 109 - 7100 7.8361001 1.0211143 4.872673 5.3471479 1.024779 110 - 7200 7.8542147 1.0057183 4.8666653 4.668317 0.99980296 122 - 7300 7.9313852 1.0159181 5.0062527 4.1410294 1.0195705 114 - 7400 7.2769846 1.0155245 4.6349779 4.9138895 1.0005886 119 - 7500 7.5974523 1.0196295 4.7918247 4.2525935 1.0211412 124 - 7600 6.7835063 1.0203187 4.2674694 4.9251624 1.0218296 113 - 7700 6.4039017 1.0119494 4.1086667 5.5240525 1.0078246 118 - 7800 7.0715134 1.0149015 4.2450776 4.8796778 1.0164737 125 - 7900 6.3626535 1.02294 4.202778 4.482164 1.0235878 136 - 8000 6.2423869 1.0212553 4.0460303 5.2753307 1.0124884 132 - 8100 6.550891 1.0223318 4.2993545 5.2634985 1.0163244 143 - 8200 6.9122202 1.008347 4.3551124 5.4108909 1.0084913 142 - 8300 6.9104634 1.0103936 4.4622206 5.6762373 0.99559355 143 - 8400 6.4918879 1.0084381 4.1050732 5.8389788 1.0036021 135 - 8500 7.4377218 1.0216662 4.5229841 5.5431311 1.0260799 123 - 8600 7.572198 1.0228381 4.9058913 7.1028185 1.0015164 116 - 8700 8.204675 1.03457 5.2231696 6.4790244 1.0214635 132 - 8800 8.3118914 1.0381333 5.1795799 6.7437722 1.0290086 132 - 8900 8.2559198 1.0268665 5.218352 7.2191395 1.019804 138 - 9000 8.0403128 1.0339414 4.9310394 6.4942331 1.041527 156 - 9100 7.1773079 1.0397062 4.4993688 7.0272109 1.0388012 167 - 9200 7.1793935 1.0373589 4.3481663 7.4894459 1.0078785 157 - 9300 8.3705146 1.0248112 5.1036971 8.2173072 1.010168 156 - 9400 9.4935002 1.0252907 5.7846951 9.7466018 1.028941 170 - 9500 9.5208037 1.0371093 5.9635099 7.6444933 1.022673 165 - 9600 8.9992217 1.0292895 5.6224192 8.8071452 1.0101362 169 - 9700 8.682661 1.0422224 5.3997636 8.6827834 1.0337928 149 - 9800 7.6191562 1.0350948 4.7198842 8.6125595 1.0300395 151 - 9900 8.0910913 1.0319432 4.8843183 7.9013334 1.0272495 167 - 10000 7.4438347 1.0186098 4.7184985 8.999795 0.99762661 177 -Loop time of 162.325 on 8 procs for 10000 steps with 16271 atoms - -Performance: 5322.658 tau/day, 61.605 timesteps/s, 1.002 Matom-step/s -99.3% CPU use with 8 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 33.647 | 64.106 | 79.639 | 169.5 | 39.49 -Neigh | 0.30808 | 0.44033 | 0.50863 | 9.8 | 0.27 -Comm | 26.611 | 43.438 | 74.998 | 215.7 | 26.76 -Output | 0.0072573 | 0.0087791 | 0.0097993 | 0.9 | 0.01 -Modify | 53.171 | 54.121 | 55.362 | 12.3 | 33.34 -Other | | 0.2104 | | | 0.13 - -Nlocal: 2033.88 ave 2601 max 1413 min -Histogram: 1 2 0 0 0 0 2 1 1 1 -Nghost: 1647.25 ave 1714 max 1617 min -Histogram: 4 0 1 0 0 1 1 0 0 1 -Neighs: 12482.8 ave 17009 max 8679 min -Histogram: 1 1 1 0 1 1 2 0 0 1 - -Total # of neighbors = 99862 -Ave neighs/atom = 6.1374224 -Neighbor list builds = 562 -Dangerous builds = 0 - -#undump 1 -#undump 2 -unfix 3 - -change_box all triclinic -Changing box ... - triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0) - -fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore - -#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz -#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] - -fix 3 all deform 1 xy erate 0.05 units box remap v - -run 40000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -SRD info: - SRD/big particles = 14771 1500 - big particle diameter max/min = 2.9202881 0.87320391 - SRD temperature & lamda = 1 0.2 - SRD max distance & max velocity = 0.8 40 - SRD grid counts: 13 13 13 - SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419 - SRD per actual grid cell = -2.775698 - SRD viscosity = -12.180602 - big/SRD mass density ratio = -5.5653033 -WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805) -WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826) -WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828) - # of rescaled SRD velocities = 1 - ave/max small velocity = 16.14994 40 - ave/max big velocity = 1.6952661 5.2200074 -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 3.8 - ghost atom cutoff = 3.8 - binsize = 13.499745, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair tri/lj, perpetual - attributes: half, newton on - pair build: half/multi/newton/tri - stencil: half/multi/3d/tri - bin: multi -Per MPI rank memory allocation (min/avg/max) = 106.9 | 107.5 | 107.7 Mbytes - Step f_1 c_tsmall Temp Press f_2[9] f_2[4] - 10000 7.4438347 1.0189789 4.7184481 7.9505614 0 0 - 10100 7.0770142 1.0021471 4.4491455 6.606701 1 141 - 10200 6.7628072 1.002308 4.152988 8.5190386 1 125 - 10300 6.5333319 1.0007472 4.1295404 8.2341747 1 109 - 10400 6.3237519 1.0024029 3.8636034 9.4058128 1 95 - 10500 6.6411054 1.0026261 4.2975997 7.6122304 1 82 - 10600 5.7470775 1.0004827 3.7959947 7.3091777 1 67 - 10700 5.9744919 1.0014977 3.6885649 7.5517197 1 59 - 10800 5.8028731 1.0029627 3.7553961 6.2787087 1 49 - 10900 5.3755286 1.0019318 3.5334739 7.1318348 1 41 - 11000 5.3915962 1.001463 3.483172 7.6362496 1 40 - 11100 5.8683672 1.0022459 3.6697589 6.9711866 1 33 - 11200 5.4351801 0.99956703 3.4548447 7.0745257 1 29 - 11300 4.9397513 1.0008287 3.1990325 6.0917337 1 27 - 11400 4.9159845 1.0017862 3.0005677 7.653817 1 26 - 11500 4.9243103 1.0013135 3.1799841 7.744414 1 23 - 11600 5.2036357 1.0017984 3.2963749 7.540477 1 22 - 11700 4.8991892 1.0020757 3.1773032 8.7218471 1 27 - 11800 4.9489399 1.003438 3.1679764 7.1605486 1 26 - 11900 4.82398 1.0019946 3.1939566 7.1397869 1 21 - 12000 4.3531411 1.000532 2.8321416 7.6672501 1 23 - 12100 4.8226081 1.0018898 3.0382137 6.8343432 1 25 - 12200 4.7456418 1.0032116 2.9186038 7.3067818 1 20 - 12300 4.4280468 1.0005857 2.734593 8.0365684 1 22 - 12400 4.7311239 1.0000982 2.8898839 7.9231831 1 22 - 12500 4.7261054 1.0016127 2.9090517 7.6085854 1 24 - 12600 4.7719025 1.0016702 2.9736761 7.6101796 1 26 - 12700 4.386248 1.001394 2.8508378 6.4765102 1 28 - 12800 4.3313538 1.0019737 2.6258221 6.3164681 1 19 - 12900 4.2219861 1.0007469 2.5345699 7.0901077 1 22 - 13000 4.1775643 1.0011891 2.5807017 7.3579938 1 25 - 13100 4.3060837 1.0008671 2.5974066 6.9301328 1 22 - 13200 4.3529062 0.99996469 2.7571632 6.7806287 1 21 - 13300 4.2178709 1.000673 2.7819091 7.6449064 1 18 - 13400 4.2714169 1.0021294 2.7280794 8.0986691 1 18 - 13500 4.3430969 1.0037732 2.6768429 8.1267941 1 18 - 13600 4.3664374 1.0016083 2.6470186 6.2797727 1 20 - 13700 4.4904769 1.0008993 2.7885718 7.7410193 1 22 - 13800 4.2966193 1.001532 2.73862 7.9651302 1 21 - 13900 4.4003185 1.0009984 2.7484129 8.7160439 1 24 - 14000 4.5948292 1.0011748 2.9051777 7.842121 1 22 - 14100 4.6901122 1.0001265 2.9404111 8.9953816 1 20 - 14200 4.8517518 0.99998743 2.9647625 6.6450509 1 22 - 14300 4.889628 1.0018051 3.0891097 7.2671824 1 20 - 14400 4.578862 1.0010629 2.8239776 6.1317183 1 23 - 14500 4.0865406 1.0013917 2.5119661 6.864665 1 19 - 14600 4.30688 1.0009041 2.6817814 6.9007433 1 18 - 14700 4.1295726 1.002342 2.6032093 7.1441648 1 15 - 14800 4.2176021 1.0015157 2.7332903 6.8394683 1 16 - 14900 4.2012664 0.99986345 2.6498409 7.4568241 1 15 - 15000 4.6124269 1.0014751 2.9584178 7.9341875 1 16 - 15100 4.947327 1.0010615 3.0784409 7.6241305 1 21 - 15200 5.253281 1.002095 3.3093754 8.1872718 1 25 - 15300 5.2642369 1.0017799 3.1511136 7.4668389 1 25 - 15400 5.1967916 1.0029407 3.247548 8.0840111 1 23 - 15500 5.7465412 1.001896 3.468834 9.5990471 1 15 - 15600 6.2245772 1.0021086 3.6127689 7.8242016 1 19 - 15700 5.5626191 0.99984979 3.3893723 7.8124588 1 20 - 15800 5.5945727 1.0010291 3.3442448 7.0116922 1 17 - 15900 5.4450219 1.0006248 3.3132381 8.4803413 1 15 - 16000 5.7800459 1.001449 3.5002534 8.7989456 1 19 - 16100 6.1168718 1.0008109 3.8081142 8.0119729 1 18 - 16200 5.4901649 1.0020643 3.3673653 7.3483134 1 17 - 16300 5.4051694 1.0015652 3.3560012 7.4641983 1 19 - 16400 5.4237612 1.0012686 3.3816406 7.3845086 1 14 - 16500 5.1935593 1.001754 3.3340381 7.8607712 1 16 - 16600 5.539343 1.0021073 3.4164309 8.1541097 1 12 - 16700 5.8922923 1.0013792 3.553426 7.5220576 1 14 - 16800 5.956937 1.0005959 3.7630589 8.7417987 1 13 - 16900 5.469721 1.0016219 3.5531223 8.6721994 1 13 - 17000 5.3110154 1.001142 3.4167244 7.4644182 1 15 - 17100 5.9226035 0.99918238 4.0244287 6.5172028 1 16 - 17200 5.4897042 0.99981565 3.4350691 5.6840394 1 20 - 17300 5.4302636 1.0021571 3.421473 6.4317025 1 21 - 17400 5.5559131 1.0013807 3.4951403 6.874191 1 24 - 17500 5.4068006 1.0010448 3.4506835 7.7069504 1 22 - 17600 4.9283792 1.0007628 3.1736308 7.3098058 1 20 - 17700 4.9319722 0.99935896 3.0956257 8.2120111 1 15 - 17800 4.6842391 1.00037 2.9602433 7.4116352 1 17 - 17900 4.7714682 1.0009332 2.9666778 7.5925131 1 17 - 18000 4.7233188 1.0035687 3.0991778 7.1636357 1 10 - 18100 4.6487958 1.0020255 3.10781 6.8468658 1 12 - 18200 4.6284129 1.0012617 3.089724 6.3082275 1 13 - 18300 4.7136404 0.99962415 3.1261978 7.3359556 1 15 - 18400 5.0367681 1.0011016 3.2413493 8.3910633 1 14 - 18500 4.9658104 1.0025407 3.2420827 7.4701216 1 17 - 18600 4.6100059 1.0014508 3.0216884 6.553483 1 17 - 18700 4.3246452 1.0016721 2.7810363 6.7450293 1 19 - 18800 4.9415788 1.0012406 3.1661907 7.5544034 1 18 - 18900 5.3930915 1.000138 3.2557456 7.350955 1 21 - 19000 5.1938599 1.0007364 3.2398733 6.5397956 1 22 - 19100 5.4433048 1.0019191 3.2699245 8.3625772 1 22 - 19200 6.1303261 1.0004005 3.7823203 8.0537369 1 22 - 19300 5.5762518 1.0008117 3.5689121 8.3714373 1 22 - 19400 5.1316743 0.9999834 3.099381 7.405287 1 23 - 19500 5.2064799 1.0012007 3.3059455 7.3499127 1 25 - 19600 5.1650099 1.0023314 3.3759492 7.3637616 1 21 - 19700 5.8316278 1.0023317 3.601564 7.153887 1 19 - 19800 5.6435147 1.0010657 3.4967581 6.8899334 1 21 - 19900 5.4071193 0.99961357 3.4977894 6.1068438 1 20 - 20000 5.5058495 1.000982 3.5185057 8.5657603 1 19 - 20100 5.6551271 1.0025852 3.5672369 7.8242273 1 20 - 20200 5.7196886 1.002283 3.6010925 7.1449072 1 22 - 20300 5.5593553 1.0009987 3.4363398 8.4141755 1 21 - 20400 5.5550247 1.001081 3.3950874 8.0222131 1 20 - 20500 5.4510415 0.99997273 3.5505093 7.5243655 1 18 - 20600 5.8014064 1.0007611 3.8084579 7.6583499 1 18 - 20700 5.7337315 1.0020309 3.7973684 8.7376766 1 17 - 20800 5.2512898 0.99901254 3.5027763 7.8902791 1 14 - 20900 5.3245034 1.0014504 3.3354615 6.7030716 1 17 - 21000 5.2071731 1.0020459 3.3881369 5.8616999 1 20 - 21100 5.3187535 1.0010762 3.2845672 8.1422146 1 21 - 21200 5.5298545 0.99942313 3.4393978 7.1183144 1 22 - 21300 5.8430744 1.0008652 3.719408 7.8522038 1 20 - 21400 5.8190457 1.0017046 3.5624252 7.8150165 1 20 - 21500 6.004585 1.0035276 3.9161914 7.7719377 1 21 - 21600 6.7202635 0.99970072 3.9642141 8.7934294 1 18 - 21700 6.8590346 1.0007883 4.4285217 8.9014638 1 20 - 21800 6.627638 1.0012117 4.1154082 8.3153026 1 22 - 21900 7.8281047 1.0008299 4.8842343 8.4016227 1 20 - 22000 7.200038 1.0014681 4.4141419 9.4091956 1 18 - 22100 7.7442011 1.0018051 4.7850371 8.9885489 1 15 - 22200 7.4770203 1.0033558 4.7512643 8.4898148 1 17 - 22300 8.1080801 1.0000019 5.2725185 9.2314625 1 14 - 22400 7.8068311 1.0020672 4.9055683 8.4064748 1 12 - 22500 7.4594636 1.0008427 4.6586396 8.5102986 1 11 - 22600 6.9380609 1.0024634 4.2435619 10.395118 1 16 - 22700 6.9338066 1.001056 4.3436179 7.9126284 1 18 - 22800 6.8049493 1.0020052 4.1443407 7.8228868 1 18 - 22900 6.2280158 1.0021474 3.7695343 7.3179647 1 20 - 23000 5.649403 1.0017128 3.5941976 7.2964709 1 19 - 23100 5.3203116 1.001912 3.3807399 6.6454551 1 15 - 23200 5.8172882 1.0005742 3.6625896 8.4256312 1 15 - 23300 5.9647182 1.0015466 3.9106019 8.3303303 1 14 - 23400 5.9784055 1.0034542 3.7229235 7.7934273 1 14 - 23500 5.377627 1.00192 3.5481778 6.8195124 1 17 - 23600 5.4807136 1.0014662 3.563123 7.6356376 1 18 - 23700 5.8896329 1.0013553 3.7990694 8.5513408 1 13 - 23800 6.3463707 0.9999403 3.9609397 8.5741923 1 11 - 23900 6.656669 1.0014998 4.1993183 9.0862996 1 13 - 24000 7.583723 1.0025057 4.7628652 7.5007245 1 20 - 24100 6.9868359 1.0014089 4.4369841 7.692833 1 25 - 24200 7.1966062 1.0013149 4.4384528 9.5264821 1 18 - 24300 6.7765706 1.0007065 4.3500477 9.4974154 1 16 - 24400 7.0853466 1.0013246 4.409163 9.2215823 1 17 - 24500 6.9603823 1.0004247 4.4866051 7.7870058 1 20 - 24600 6.9208291 0.99953329 4.2298144 6.5732392 1 21 - 24700 6.5005518 1.0026848 4.0003505 7.8094715 1 22 - 24800 5.8421948 1.0012055 3.6686768 7.6078157 1 26 - 24900 5.8410604 1.0023428 3.746177 6.8971309 1 22 - 25000 5.8728511 1.0001747 3.7170134 7.4456816 1 19 - 25100 6.0217168 1.000624 3.7756108 6.6542452 1 20 - 25200 6.1939015 1.0017861 3.8943084 9.395821 1 25 - 25300 6.161998 1.0010373 3.9255122 6.2228884 1 28 - 25400 5.5850406 1.0018505 3.5129832 7.2551309 1 24 - 25500 6.0286276 1.0009028 3.8580887 6.8065265 1 24 - 25600 5.6262228 1.0005097 3.4574446 7.5061246 1 21 - 25700 6.1348187 1.0009828 3.8073512 7.4818375 1 17 - 25800 6.09781 1.0026426 3.9585383 9.0915939 1 21 - 25900 6.2673667 1.0002269 3.8182813 9.2134822 1 21 - 26000 6.6001776 1.0020444 4.041386 8.0403555 1 18 - 26100 6.3063025 1.0016633 3.8649839 8.8149734 1 19 - 26200 6.0046983 1.002332 3.5380766 8.6145656 1 17 - 26300 5.9627788 1.0005401 3.56864 6.7821213 1 15 - 26400 5.0547314 0.9998295 3.2106781 9.2935351 1 15 - 26500 5.256781 1.0013131 3.2946631 8.8590275 1 15 - 26600 5.6250355 1.0023929 3.5243033 8.8985058 1 17 - 26700 6.0197165 1.0018323 3.7973947 7.3093402 1 17 - 26800 5.4556541 1.0015309 3.4295107 8.2342049 1 18 - 26900 5.420428 1.0024996 3.4374201 7.1444636 1 16 - 27000 6.165624 1.0019174 3.8726016 8.6588275 1 20 - 27100 6.7131697 1.0006541 4.266264 8.7063389 1 24 - 27200 6.4855163 1.0016139 4.2029778 7.667611 1 29 - 27300 6.0525608 1.000478 3.9169723 7.4515279 1 25 - 27400 6.1426194 1.0014522 3.9176108 6.8689671 1 24 - 27500 6.5981349 1.0001143 4.0620686 8.6804552 1 27 - 27600 6.7827138 1.0016694 4.2764286 9.3912843 1 21 - 27700 6.6368902 1.0025149 4.1452128 9.1814523 1 24 - 27800 6.9791025 1.0019486 4.3989933 7.9446882 1 24 - 27900 6.617142 1.0015736 4.360571 9.3732108 1 26 - 28000 7.2818263 1.0014101 4.6041512 8.2398587 1 28 - 28100 7.2543709 1.0007625 4.5724787 7.7373488 1 22 - 28200 7.0631847 1.0023922 4.4021705 8.3290554 1 29 - 28300 7.2999952 1.0012593 4.4655563 8.612666 1 27 - 28400 7.4124538 1.0014043 4.5011335 8.379391 1 29 - 28500 7.0350937 1.0011392 4.3528091 7.8167375 1 24 - 28600 7.9659642 1.0031684 4.8732467 8.0661929 1 30 - 28700 7.2865919 1.0010958 4.6650146 8.0325989 1 32 - 28800 7.7039529 1.0027912 4.8299888 9.5471747 1 30 - 28900 8.3288847 1.0012438 5.0785288 8.8964877 1 31 - 29000 7.9348665 1.0021794 4.9393968 9.5531767 1 31 - 29100 8.2473389 1.0013795 4.9890359 9.7697184 1 29 - 29200 8.6383362 1.0018356 4.9856954 7.6402719 1 25 - 29300 8.2504592 1.0011048 4.9631793 7.9466724 1 24 - 29400 8.0502922 1.0010516 5.2521065 8.4515028 1 26 - 29500 7.9475896 1.0012951 4.8584644 9.1225463 1 19 - 29600 8.5641641 1.0016228 5.4361335 9.2045399 1 23 - 29700 8.9932021 1.0011848 5.5727205 8.6045729 1 23 - 29800 8.0320178 1.0019073 5.2837013 8.9335413 1 22 - 29900 8.2676522 1.0012734 5.2213798 8.8966896 1 24 - 30000 9.1848984 1.001747 5.9147628 12.096129 1 27 - 30100 10.184519 0.99977427 6.4260136 11.140491 1 27 - 30200 9.271472 1.0023983 6.0252189 9.6954338 1 30 - 30300 9.0751572 1.000851 5.6010295 9.734426 1 28 - 30400 9.4581261 1.0018449 5.6987258 9.70456 1 34 - 30500 9.1574751 0.99944001 5.582217 9.300318 1 27 - 30600 8.619312 1.001388 5.3503985 8.2759155 1 26 - 30700 7.9370031 1.0026674 5.0702831 8.5368014 1 28 - 30800 7.9221619 1.0019077 5.1278637 11.046922 1 26 - 30900 9.9722884 1.0025903 6.4055506 10.167311 1 25 - 31000 8.8648667 0.99962676 5.4777514 10.142102 1 21 - 31100 8.576344 1.000906 5.3216342 8.7984921 1 18 - 31200 7.8480974 1.0010341 4.9584917 9.0696437 1 16 - 31300 8.3536183 1.0005758 5.208516 9.7971514 1 15 - 31400 8.5301933 1.0007603 5.2241536 9.0257241 1 17 - 31500 8.5196226 1.0018215 5.0576064 8.8847294 1 19 - 31600 8.1470823 1.0023147 4.9182956 9.0205413 1 20 - 31700 8.1475888 1.0005764 5.1814113 9.0603162 1 16 - 31800 7.8629717 1.0014194 4.9221218 9.366291 1 16 - 31900 7.7206559 1.0021082 4.9167636 7.4136735 1 16 - 32000 7.5152809 1.0004752 4.6330638 8.830959 1 16 - 32100 8.2693974 1.0011751 4.9094804 9.427636 1 13 - 32200 8.3067661 0.9997006 4.9036865 9.0374633 1 17 - 32300 7.2068514 1.0007866 4.3580755 8.6445065 1 17 - 32400 6.885063 1.0011887 4.1528011 8.1199454 1 16 - 32500 6.9147014 1.0020825 4.160405 7.5398034 1 19 - 32600 6.8809668 1.000971 4.3312782 8.2157688 1 16 - 32700 6.4818892 1.0000885 3.9433899 7.309605 1 22 - 32800 6.6875555 1.0018674 4.1017504 7.2327183 1 22 - 32900 7.6118502 0.99975736 4.4498951 8.5072395 1 19 - 33000 7.7576909 1.0022061 4.7239551 9.2132467 1 22 - 33100 7.8616235 1.000482 5.0031322 9.349805 1 20 - 33200 8.2620563 1.0015059 5.2482188 10.286446 1 17 - 33300 8.0217099 1.0015466 5.1166876 9.1381844 1 20 - 33400 7.6565746 1.0024855 4.7594208 9.2646824 1 22 - 33500 7.9633887 1.0010334 4.6754116 9.1085184 1 23 - 33600 7.9566834 1.0024542 4.6712679 9.2046594 1 25 - 33700 8.2639384 1.0003021 5.1326892 8.0930215 1 24 - 33800 8.5648917 1.0000947 5.2099387 8.8127486 1 21 - 33900 8.3593557 1.0002488 5.1291354 8.5938391 1 25 - 34000 8.1922068 1.0030011 5.1441189 7.1529563 1 24 - 34100 8.4260308 1.0004639 5.5876122 9.0450303 1 28 - 34200 8.3014654 1.0002204 5.1964772 8.4920822 1 33 - 34300 7.4736545 1.0010306 4.7932244 7.8442244 1 30 - 34400 7.0023126 1.0024002 4.5665168 8.4702188 1 29 - 34500 7.3797703 1.000813 4.7224014 8.4098954 1 30 - 34600 7.7158761 0.99973161 4.7441628 8.5818592 1 29 - 34700 7.6135895 1.0015768 4.6612844 7.2195952 1 28 - 34800 7.0458078 0.99992638 4.2805357 7.4162305 1 32 - 34900 7.6190708 1.0007146 4.8064968 8.2709405 1 27 - 35000 7.4614294 1.0006051 4.7807207 7.7137359 1 28 - 35100 7.7008336 1.0008263 4.6823621 7.0208513 1 26 - 35200 8.1510766 1.000271 5.1781834 7.3231692 1 24 - 35300 7.5106275 1.0010438 4.6988185 8.9418343 1 25 - 35400 7.8116652 1.0009688 4.8622216 7.4624002 1 17 - 35500 7.2159785 1.0027484 4.543984 8.3177043 1 21 - 35600 7.6978875 1.0004834 4.7021203 8.3706905 1 20 - 35700 7.7827655 1.0019919 4.775879 8.6083292 1 15 - 35800 7.8433537 1.001844 4.7506574 7.3250009 1 15 - 35900 7.9456497 1.0004336 4.7925775 7.9824359 1 18 - 36000 8.1044513 1.0022261 5.1213755 9.211699 1 16 - 36100 7.6657532 1.0025661 4.751804 8.9770412 1 19 - 36200 7.909323 1.0035462 4.8435293 10.232493 1 21 - 36300 8.4188244 1.0016775 5.4337725 9.2060079 1 24 - 36400 8.7352689 1.0011274 5.6313351 8.6202832 1 24 - 36500 8.3459273 1.0005659 5.187336 6.9333716 1 21 - 36600 7.7118105 1.0018769 4.9293347 8.2789615 1 14 - 36700 7.8069879 1.0014021 4.7782709 8.4841233 1 15 - 36800 7.862085 1.0005342 4.8680692 8.1055023 1 16 - 36900 7.9469362 1.0027815 4.9339095 9.157722 1 16 - 37000 7.9085375 1.0024851 5.0921374 8.9374239 1 16 - 37100 8.9464869 1.0005734 5.6837772 8.806998 1 16 - 37200 8.1482632 1.0021175 5.1266453 8.5772094 1 18 - 37300 7.7958072 1.0026336 4.788431 8.3233372 1 19 - 37400 7.3647655 1.0015482 4.4786134 9.6606112 1 23 - 37500 7.3071882 1.0003912 4.681549 8.6319438 1 17 - 37600 7.8672509 1.0000478 4.7981944 8.3051478 1 14 - 37700 7.9306696 0.99923102 4.9316544 9.3672856 1 15 - 37800 7.7397949 0.99948557 5.1168552 8.5978047 1 17 - 37900 7.9121039 1.0020122 4.9866234 7.640888 1 14 - 38000 7.433451 1.0007901 4.6254894 8.0853539 1 14 - 38100 7.4636908 1.0021552 4.8472833 8.1975615 1 10 - 38200 7.4453077 1.0010305 4.6910943 7.8192603 1 13 - 38300 7.0488536 1.0012587 4.5490462 8.190036 1 16 - 38400 8.0686748 1.0016782 5.0747029 7.7242015 1 15 - 38500 7.9575875 1.0007137 4.8361776 8.05268 1 15 - 38600 7.6690498 1.0027522 4.8823286 9.1926516 1 20 - 38700 7.1567 1.002374 4.5600354 10.098089 1 19 - 38800 6.9100518 1.0008695 4.4101446 7.8832032 1 19 - 38900 6.8021882 1.0017647 4.1844125 8.1858761 1 21 - 39000 8.3996464 1.0010263 4.8183813 8.0997387 1 16 - 39100 8.4533834 1.0021643 5.074254 11.291904 1 19 - 39200 8.2406701 1.002062 5.0117425 8.778159 1 24 - 39300 8.3134114 1.0008218 5.0067136 7.9871787 1 22 - 39400 7.4307571 1.0014205 4.5858283 8.8596594 1 25 - 39500 7.1146821 1.0016367 4.5021057 7.4890018 1 22 - 39600 8.0048978 0.99992107 4.9235747 7.8770845 1 24 - 39700 8.070853 1.0029024 5.0842957 9.020664 1 21 - 39800 7.6939108 1.0012543 4.8986595 8.3306129 1 20 - 39900 7.2915444 1.00267 4.5038291 8.3844384 1 20 - 40000 7.3023994 1.0020441 4.4960911 8.1023709 1 18 - 40100 7.0221648 1.0033695 4.6374149 8.3756822 1 24 - 40200 7.4114756 1.0019246 4.6733475 7.6547258 1 23 - 40300 7.5323108 1.0005472 4.8284493 8.2820085 1 26 - 40400 7.3890772 1.0010491 4.6599273 8.9203575 1 19 - 40500 7.5786764 1.0016114 4.8166885 8.6760107 1 25 - 40600 8.165763 1.0006961 5.1488995 7.9321524 1 22 - 40700 8.1277597 0.99933464 5.0441567 10.069551 1 16 - 40800 8.1050904 1.0024705 5.4408599 8.3244459 1 21 - 40900 7.805318 1.0022992 4.9965408 9.7193723 1 21 - 41000 9.0130932 1.0006842 5.7931112 6.1646073 1 20 - 41100 8.0387975 1.0017359 5.3355655 9.6123191 1 21 - 41200 8.4484723 1.0014151 5.4461007 8.5146504 1 27 - 41300 8.6181909 1.0007562 5.2963876 9.1122306 1 30 - 41400 9.6762899 1.0010931 5.950456 9.2851025 1 25 - 41500 9.9414226 1.0016186 6.1433384 10.741453 1 24 - 41600 9.3348435 1.0003483 5.9291766 11.460717 1 20 - 41700 9.6125587 1.0013661 5.8530052 9.2105722 1 19 - 41800 11.383056 1.0032034 7.1988684 10.312945 1 22 - 41900 10.884524 1.0034888 6.9126707 10.775457 1 20 - 42000 11.071218 1.0026753 7.0004189 10.740627 1 20 - 42100 11.054304 1.0008347 6.9602414 8.9885498 1 22 - 42200 22.478691 1.0020466 14.997099 12.72513 1 19 - 42300 18.303508 1.0027626 11.336523 12.638769 1 18 - 42400 15.998712 1.0030312 9.4092725 11.070501 1 24 - 42500 15.034488 1.0024472 9.3543751 11.48052 1 28 - 42600 14.538257 1.0033153 9.2523745 10.909576 1 27 - 42700 13.986613 1.001458 8.5544184 10.765136 1 29 - 42800 13.240256 1.0027899 8.2014429 10.506497 1 32 - 42900 12.784336 1.0001406 8.0823431 12.258209 1 33 - 43000 13.374145 1.0012996 8.4207155 10.32817 1 31 - 43100 13.142334 1.0022503 8.5908808 10.152205 1 32 - 43200 12.669284 1.0018944 7.8511966 10.580104 1 32 - 43300 13.155032 1.001144 8.0337768 10.6652 1 39 - 43400 12.155928 1.0019472 7.5886584 11.234772 1 35 - 43500 12.385603 1.0007639 7.8865245 9.3868914 1 32 - 43600 12.236179 1.0027456 7.7521353 10.456701 1 42 - 43700 11.49535 1.0008758 7.3633144 8.8490079 1 40 - 43800 11.469157 1.0015845 7.0035577 10.594522 1 41 - 43900 11.228266 1.0013014 7.0137223 8.0653711 1 38 - 44000 10.56742 1.0016631 6.6908938 8.1094154 1 35 - 44100 9.8964699 1.0008351 6.3550438 8.6578181 1 36 - 44200 9.041539 1.0019541 5.6721401 8.6518043 1 38 - 44300 9.0767434 1.0034191 5.7446596 8.3838528 1 38 - 44400 9.2299608 1.0019526 5.7117964 8.3106491 1 37 - 44500 9.458981 1.0030409 5.7612138 7.7679755 1 37 - 44600 8.9611997 1.0014848 5.6490756 6.9224078 1 37 - 44700 8.0853184 1.0018894 5.2288749 8.0910912 1 32 - 44800 7.9999755 1.0015853 4.8088312 7.1854304 1 30 - 44900 7.6598023 1.0009751 4.6690664 7.1999858 1 28 - 45000 7.4939315 1.0010307 4.8119666 7.9615769 1 26 - 45100 7.4690079 0.99913423 4.9704428 7.6026835 1 32 - 45200 7.7001199 1.001626 4.9315953 7.4926686 1 25 - 45300 7.8794405 1.0011648 4.8624857 8.0804457 1 26 - 45400 7.493909 1.0016257 4.7631808 8.0330626 1 26 - 45500 7.5963141 1.0005825 4.7220659 7.0971298 1 23 - 45600 7.9028612 1.0017008 4.9561022 8.440428 1 23 - 45700 7.2285584 1.0006033 4.5521456 9.385579 1 23 - 45800 7.5687284 1.0024318 4.8557498 8.3052658 1 23 - 45900 7.8938604 1.0013937 5.1393944 5.5323667 1 26 - 46000 8.318466 1.0020803 5.4761811 8.2227801 1 25 - 46100 7.9169512 1.0024598 5.0406355 8.64365 1 27 - 46200 7.5535458 1.0016318 4.8010133 9.370726 1 26 - 46300 7.8926896 1.0001525 5.18463 7.9830196 1 27 - 46400 7.487145 1.002671 4.7718312 8.300134 1 29 - 46500 7.3564658 1.0006114 4.6762189 7.34947 1 26 - 46600 7.2261291 1.0005569 4.4751221 6.5847138 1 27 - 46700 7.2943203 1.0020164 4.3335327 7.7296507 1 25 - 46800 8.5849411 1.0014634 5.4501531 9.0933014 1 25 - 46900 10.176752 1.0023799 6.0456779 9.4050423 1 16 - 47000 9.1913098 1.0029076 5.7577256 9.1826215 1 22 - 47100 9.5479771 1.0022102 6.1100973 8.9440056 1 28 - 47200 9.9944172 1.0004924 6.3649417 9.1507264 1 25 - 47300 9.3543283 1.0013246 6.0873147 10.41657 1 24 - 47400 8.594101 1.0020068 5.6864295 9.2388304 1 24 - 47500 9.3191964 1.002411 6.0537511 9.3506828 1 23 - 47600 8.1615734 1.001364 5.3757905 10.303962 1 30 - 47700 8.3615046 1.0003075 5.2727936 9.3162209 1 32 - 47800 8.3566467 1.0026031 5.4379524 7.7644422 1 33 - 47900 8.4062556 1.0006471 5.3098736 8.0181121 1 33 - 48000 8.2233307 1.0012304 4.9650027 9.2644288 1 34 - 48100 8.4495256 1.000088 4.9940422 10.01023 1 27 - 48200 8.8068097 1.0014275 5.4732649 8.410093 1 31 - 48300 8.0008187 1.0017459 4.7732764 9.25726 1 27 - 48400 7.7242529 1.0026909 4.9084505 8.7147295 1 30 - 48500 8.3752816 1.001333 5.1071228 8.2267308 1 32 - 48600 9.0777805 1.0019328 5.7331841 9.6679383 1 29 - 48700 9.3623061 1.0001767 5.7117062 8.396895 1 25 - 48800 8.1186637 1.0013185 5.2697427 8.6058372 1 27 - 48900 7.3685497 1.0007173 4.6097553 7.8047228 1 24 - 49000 7.1661421 1.0023152 4.5389038 8.8759552 1 22 - 49100 6.9857144 1.0016394 4.6489319 8.2022359 1 24 - 49200 6.7160336 1.0018413 4.2488082 8.3393245 1 25 - 49300 7.9703755 1.0010628 5.2328567 7.968278 1 28 - 49400 8.2628465 1.0010877 5.2292977 8.0196533 1 27 - 49500 8.1436558 1.0015175 5.0344712 8.0712037 1 30 - 49600 8.5182498 1.0021589 5.1029028 8.6869789 1 28 - 49700 8.3604444 1.0015016 5.0333696 9.4861656 1 25 - 49800 7.336335 1.0020055 4.6365173 8.7210022 1 30 - 49900 7.432996 1.0016415 4.7090587 8.7033033 1 29 - 50000 7.4937053 1.001014 4.7212573 9.0890363 1 29 -Loop time of 999.576 on 8 procs for 40000 steps with 16271 atoms - -Performance: 3457.466 tau/day, 40.017 timesteps/s, 651.116 katom-step/s -99.3% CPU use with 8 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 293.48 | 403.7 | 545.29 | 357.5 | 40.39 -Neigh | 2.4176 | 3.2721 | 3.8303 | 25.2 | 0.33 -Comm | 163.58 | 305.88 | 419.83 | 416.7 | 30.60 -Output | 0.032483 | 0.034794 | 0.040514 | 1.2 | 0.00 -Modify | 281.15 | 285.67 | 293.8 | 24.3 | 28.58 -Other | | 1.023 | | | 0.10 - -Nlocal: 2033.88 ave 2657 max 1198 min -Histogram: 2 0 0 0 0 2 1 0 1 2 -Nghost: 1628.12 ave 1719 max 1569 min -Histogram: 2 0 1 1 2 1 0 0 0 1 -Neighs: 13566 ave 18212 max 8488 min -Histogram: 1 0 0 1 2 1 2 0 0 1 - -Total # of neighbors = 108528 -Ave neighs/atom = 6.6700264 -Neighbor list builds = 2447 -Dangerous builds = 2 -Total wall time: 0:19:22 diff --git a/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.1 b/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.1 new file mode 100644 index 0000000000..2686070832 --- /dev/null +++ b/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.1 @@ -0,0 +1,343 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles + +units lj +atom_style tri +atom_modify first big map yes + +read_data data.tri.srd +Reading data file ... + orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 1500 atoms + 1500 triangles + read_data CPU = 0.013 seconds + +# add small particles as hi density lattice + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block INF INF INF INF INF INF +lattice sc 20.0 +Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315 +create_atoms 2 region box +Created 91125 atoms + using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) + create_atoms CPU = 0.014 seconds + +group big type 1 +1500 atoms in group big +group small type 2 +91125 atoms in group small +set group small mass 0.01 +Setting atom values ... + 91125 settings made for mass + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 1.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 + +delete_atoms overlap 1.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.8 + ghost atom cutoff = 1.8 + binsize = 0.9, bins = 19 19 19 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 76354 atoms, new total = 16271 + +# SRD run + +reset_timestep 0 + +velocity small create 1.44 87287 loop geom + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes +neigh_modify exclude molecule/intra big include big + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style tri/lj 3.5 +pair_coeff 1 1 0.1 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398 + create bodies CPU = 0.000 seconds + 125 rigid bodies with 1500 atoms + 1.8601881 = max distance from body owner to body atom +fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore + +fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8 + +# diagnostics + +compute tsmall small temp/deform +compute tbig big temp +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) + +compute_modify tbig extra/dof -4500 + +compute 1 big erotate/asphere +compute 2 all ke +compute 3 all pe +variable toteng equal (c_1+c_2+c_3)/atoms + +thermo 100 +thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4] +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) + +compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z + +#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +WARNING: Using compute temp/deform with inconsistent fix deform remap option (src/compute_temp_deform.cpp:71) +WARNING: Using fix srd with box deformation but no SRD thermostat (src/SRD/fix_srd.cpp:405) +SRD info: + SRD/big particles = 14771 1500 + big particle diameter max/min = 2.9202881 0.87320391 + SRD temperature & lamda = 1 0.2 + SRD max distance & max velocity = 0.8 40 + SRD grid counts: 17 17 17 + SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829 + SRD per actual grid cell = -3.9971745 + SRD viscosity = -34.162587 + big/SRD mass density ratio = -3.3753691 +WARNING: SRD bin size for fix srd differs from user request (src/SRD/fix_srd.cpp:2809) +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) +WARNING: Fix srd viscosity < 0.0 due to low SRD density (src/SRD/fix_srd.cpp:2832) + # of rescaled SRD velocities = 0 + ave/max small velocity = 19.970837 35.150443 + ave/max big velocity = 0 0 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.8 + ghost atom cutoff = 3.8 + binsize = 16.874681, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tri/lj, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/3d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 381.8 | 381.8 | 381.8 Mbytes + Step f_1 c_tsmall Temp Press f_2[9] f_2[4] + 0 0 1.4502537 0 -0.15976045 0 0 + 100 0.41802172 1.152223 0.27557714 1.0421065 1.1470081 283 + 200 0.79710339 1.0669332 0.5813323 0.97699684 1.0361619 534 + 300 1.3739181 1.0275476 1.0869716 0.81001536 1.0211312 658 + 400 1.9355117 1.0155457 1.5813236 1.7798798 0.99354559 831 + 500 2.8557382 1.0005021 2.267698 3.3903849 0.98597972 927 + 600 4.7851916 1.0156689 3.730334 2.838776 0.99140534 1053 + 700 5.3647697 1.0176657 3.9593121 5.1189107 0.9972029 1218 + 800 8.23688 1.0268086 5.899689 6.8199153 0.99310516 1349 + 900 9.9330758 1.0356047 7.0260595 7.2596589 0.98360014 1607 + 1000 9.8719995 1.043178 6.9903792 10.05101 1.0045416 1805 +Loop time of 79.2664 on 1 procs for 1000 steps with 16271 atoms + +Performance: 1089.995 tau/day, 12.616 timesteps/s, 205.270 katom-step/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 57.961 | 57.961 | 57.961 | 0.0 | 73.12 +Neigh | 0.34589 | 0.34589 | 0.34589 | 0.0 | 0.44 +Comm | 0.28615 | 0.28615 | 0.28615 | 0.0 | 0.36 +Output | 0.0022784 | 0.0022784 | 0.0022784 | 0.0 | 0.00 +Modify | 20.644 | 20.644 | 20.644 | 0.0 | 26.04 +Other | | 0.02724 | | | 0.03 + +Nlocal: 16271 ave 16271 max 16271 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4612 ave 4612 max 4612 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 99463 ave 99463 max 99463 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 99463 +Ave neighs/atom = 6.1129003 +Neighbor list builds = 72 +Dangerous builds = 0 + +#undump 1 +#undump 2 +unfix 3 + +change_box all triclinic +Changing box ... + triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0) + +fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore + +#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] + +fix 3 all deform 1 xy erate 0.05 units box remap v + +run 2000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14771 1500 + big particle diameter max/min = 2.9202881 0.87320391 + SRD temperature & lamda = 1 0.2 + SRD max distance & max velocity = 0.8 40 + SRD grid counts: 13 13 13 + SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419 + SRD per actual grid cell = -2.775698 + SRD viscosity = -12.180602 + big/SRD mass density ratio = -5.5653033 +WARNING: SRD bin size for fix srd differs from user request (src/SRD/fix_srd.cpp:2809) +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) +WARNING: Fix srd viscosity < 0.0 due to low SRD density (src/SRD/fix_srd.cpp:2832) + # of rescaled SRD velocities = 3 + ave/max small velocity = 16.23763 40 + ave/max big velocity = 1.9825234 5.257255 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.8 + ghost atom cutoff = 3.8 + binsize = 13.499745, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tri/lj, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton/tri + stencil: half/multi/3d/tri + bin: multi +Per MPI rank memory allocation (min/avg/max) = 278.4 | 278.4 | 278.4 Mbytes + Step f_1 c_tsmall Temp Press f_2[9] f_2[4] + 1000 9.8719995 1.0317167 6.98982 4.0948969 0 0 + 1100 7.6460335 1.0028444 5.2446585 6.6348814 1 1320 + 1200 6.2789381 1.0012003 4.5257435 6.3278972 1 1024 + 1300 5.5060209 1.002182 3.7063549 7.0004503 1 794 + 1400 5.4107119 1.002291 3.594515 7.9511695 1 621 + 1500 5.072582 1.0001037 3.2501353 8.6993671 1 503 + 1600 4.7912016 0.99982803 3.1208274 6.464157 1 416 + 1700 4.5518848 1.0030059 2.9084074 6.3278992 1 346 + 1800 4.368682 1.000831 2.807184 6.7382017 1 282 + 1900 4.458655 1.0012568 2.7966515 6.0124309 1 246 + 2000 4.1256128 1.0004032 2.763649 6.3707442 1 208 + 2100 3.7040346 1.0004125 2.4398152 5.4213931 1 181 + 2200 4.2347861 1.002625 2.6206986 6.6832437 1 151 + 2300 4.254984 1.0028871 2.6794167 7.1661525 1 127 + 2400 4.1017692 1.0028508 2.6371178 8.388599 1 105 + 2500 3.9285571 1.0002888 2.5002741 6.0806187 1 95 + 2600 3.6239964 1.0012152 2.2573993 6.7863124 1 80 + 2700 3.4085702 1.0023974 2.1179914 6.7351139 1 68 + 2800 3.1399303 1.0005349 2.0163219 6.4502765 1 61 + 2900 3.1277562 1.0004013 2.0453134 6.6485498 1 51 + 3000 3.0737732 1.0022962 1.997382 6.797214 1 44 +Loop time of 206.387 on 1 procs for 2000 steps with 16271 atoms + +Performance: 837.264 tau/day, 9.691 timesteps/s, 157.675 katom-step/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 173.6 | 173.6 | 173.6 | 0.0 | 84.12 +Neigh | 1.0077 | 1.0077 | 1.0077 | 0.0 | 0.49 +Comm | 0.58656 | 0.58656 | 0.58656 | 0.0 | 0.28 +Output | 0.0042824 | 0.0042824 | 0.0042824 | 0.0 | 0.00 +Modify | 31.128 | 31.128 | 31.128 | 0.0 | 15.08 +Other | | 0.05664 | | | 0.03 + +Nlocal: 16271 ave 16271 max 16271 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4521 ave 4521 max 4521 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 94777 ave 94777 max 94777 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 94777 +Ave neighs/atom = 5.8249032 +Neighbor list builds = 100 +Dangerous builds = 0 +Total wall time: 0:04:47 diff --git a/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.4 b/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.4 new file mode 100644 index 0000000000..c698c9e8db --- /dev/null +++ b/examples/ASPHERE/tri/log.1Feb24.tri.srd.g++.4 @@ -0,0 +1,343 @@ +LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-665-g17f869bf5e) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles + +units lj +atom_style tri +atom_modify first big map yes + +read_data data.tri.srd +Reading data file ... + orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 1500 atoms + 1500 triangles + read_data CPU = 0.010 seconds + +# add small particles as hi density lattice + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block INF INF INF INF INF INF +lattice sc 20.0 +Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315 +create_atoms 2 region box +Created 91125 atoms + using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405) + create_atoms CPU = 0.005 seconds + +group big type 1 +1500 atoms in group big +group small type 2 +91125 atoms in group small +set group small mass 0.01 +Setting atom values ... + 91125 settings made for mass + +# delete overlaps +# must set 1-2 cutoff to non-zero value + +pair_style lj/cut 1.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 + +delete_atoms overlap 1.5 small big +System init for delete_atoms ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.8 + ghost atom cutoff = 1.8 + binsize = 0.9, bins = 19 19 19 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +WARNING: Delete_atoms cutoff > minimum neighbor cutoff (src/delete_atoms.cpp:312) +Deleted 76354 atoms, new total = 16271 + +# SRD run + +reset_timestep 0 + +velocity small create 1.44 87287 loop geom + +neighbor 0.3 multi +neigh_modify delay 0 every 1 check yes +neigh_modify exclude molecule/intra big include big + +comm_modify mode multi group big vel yes +neigh_modify include big + +# no pairwise interactions with small particles + +pair_style tri/lj 3.5 +pair_coeff 1 1 0.1 1.0 +pair_coeff 2 2 0.0 1.0 0.0 +pair_coeff 1 2 0.0 1.0 0.0 + +# use fix SRD to push small particles out from inside big ones +# if comment out, big particles won't see SRD particles + +timestep 0.001 + +fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398 + create bodies CPU = 0.000 seconds + 125 rigid bodies with 1500 atoms + 1.8601881 = max distance from body owner to body atom +fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore + +fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8 + +# diagnostics + +compute tsmall small temp/deform +compute tbig big temp +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) + +compute_modify tbig extra/dof -4500 + +compute 1 big erotate/asphere +compute 2 all ke +compute 3 all pe +variable toteng equal (c_1+c_2+c_3)/atoms + +thermo 100 +thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4] +thermo_modify temp tbig +WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:530) + +compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z + +#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +@article{Monti2022, + author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava, + Ishan and Silbert, Leonardo E. and Grest, Gary S. + and Lechman, Jeremy B.}, + title = {Large-scale frictionless jamming with power-law particle + size distributions}, + journal = {Phys. Rev. E}, + volume = {106} + issue = {3} + year = {2022} +} + +- fix srd command: doi:10.1063/1.3419070 + +@Article{Petersen10, + author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and + G. S. Grest and in 't Veld, P. J. and P. R. Schunk}, + title = {Mesoscale Hydrodynamics via Stochastic Rotation + Dynamics: Comparison with {L}ennard-{J}ones Fluid}, + journal = {J.~Chem.\ Phys.}, + year = 2010, + volume = 132, + pages = 174106 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +WARNING: Using compute temp/deform with inconsistent fix deform remap option (src/compute_temp_deform.cpp:71) +WARNING: Using fix srd with box deformation but no SRD thermostat (src/SRD/fix_srd.cpp:405) +SRD info: + SRD/big particles = 14771 1500 + big particle diameter max/min = 2.9202881 0.87320391 + SRD temperature & lamda = 1 0.2 + SRD max distance & max velocity = 0.8 40 + SRD grid counts: 17 17 17 + SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829 + SRD per actual grid cell = -3.9971745 + SRD viscosity = -34.162587 + big/SRD mass density ratio = -3.3753691 +WARNING: SRD bin size for fix srd differs from user request (src/SRD/fix_srd.cpp:2809) +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) +WARNING: Fix srd viscosity < 0.0 due to low SRD density (src/SRD/fix_srd.cpp:2832) + # of rescaled SRD velocities = 0 + ave/max small velocity = 19.970837 35.150443 + ave/max big velocity = 0 0 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.8 + ghost atom cutoff = 3.8 + binsize = 16.874681, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tri/lj, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton + stencil: half/multi/3d + bin: multi +Per MPI rank memory allocation (min/avg/max) = 184.3 | 184.9 | 185.4 Mbytes + Step f_1 c_tsmall Temp Press f_2[9] f_2[4] + 0 0 1.4502537 0 -0.15949051 0 0 + 100 0.39689465 1.1495173 0.26931663 1.0004927 1.1170389 279 + 200 0.82155086 1.0684809 0.60689485 0.81307973 1.0433122 467 + 300 1.3210872 1.0334277 1.0368935 1.0853416 0.99443391 621 + 400 1.9755695 1.0149146 1.6438403 1.7258285 0.9925525 788 + 500 3.0111365 1.0121291 2.4285289 2.5210058 0.99688885 922 + 600 4.5413799 1.014305 3.4727946 3.8290233 0.99002027 1063 + 700 6.6071849 1.0062952 4.9025772 3.9595327 0.99573591 1186 + 800 7.6256618 1.0151252 5.3662442 5.0088255 0.99640985 1371 + 900 8.1578206 1.0148959 5.7716683 6.6059298 0.96053165 1555 + 1000 10.749617 1.0282309 7.6209538 11.277602 1.0012602 1844 +Loop time of 28.4136 on 4 procs for 1000 steps with 16271 atoms + +Performance: 3040.793 tau/day, 35.194 timesteps/s, 572.647 katom-step/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 12.454 | 15.242 | 17.781 | 48.4 | 53.64 +Neigh | 0.093078 | 0.094516 | 0.097759 | 0.6 | 0.33 +Comm | 0.48732 | 2.9927 | 5.7363 | 107.5 | 10.53 +Output | 0.00080706 | 0.0008431 | 0.00086933 | 0.0 | 0.00 +Modify | 10.015 | 10.063 | 10.111 | 1.4 | 35.42 +Other | | 0.02046 | | | 0.07 + +Nlocal: 4067.75 ave 4467 max 3606 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Nghost: 2313.5 ave 2327 max 2296 min +Histogram: 1 0 0 0 0 1 0 1 0 1 +Neighs: 24883 ave 26066 max 24145 min +Histogram: 2 0 0 0 0 1 0 0 0 1 + +Total # of neighbors = 99532 +Ave neighs/atom = 6.1171409 +Neighbor list builds = 70 +Dangerous builds = 0 + +#undump 1 +#undump 2 +unfix 3 + +change_box all triclinic +Changing box ... + triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0) + +fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore + +#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz +#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9] + +fix 3 all deform 1 xy erate 0.05 units box remap v + +run 2000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +SRD info: + SRD/big particles = 14771 1500 + big particle diameter max/min = 2.9202881 0.87320391 + SRD temperature & lamda = 1 0.2 + SRD max distance & max velocity = 0.8 40 + SRD grid counts: 13 13 13 + SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419 + SRD per actual grid cell = -2.775698 + SRD viscosity = -12.180602 + big/SRD mass density ratio = -5.5653033 +WARNING: SRD bin size for fix srd differs from user request (src/SRD/fix_srd.cpp:2809) +WARNING: Fix srd grid size > 1/4 of big particle diameter (src/SRD/fix_srd.cpp:2830) +WARNING: Fix srd viscosity < 0.0 due to low SRD density (src/SRD/fix_srd.cpp:2832) + # of rescaled SRD velocities = 3 + ave/max small velocity = 16.10299 40 + ave/max big velocity = 2.0311414 11.34118 +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.8 + ghost atom cutoff = 3.8 + binsize = 13.499745, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tri/lj, perpetual + attributes: half, newton on + pair build: half/multi/atomonly/newton/tri + stencil: half/multi/3d/tri + bin: multi +Per MPI rank memory allocation (min/avg/max) = 148.8 | 149.5 | 150 Mbytes + Step f_1 c_tsmall Temp Press f_2[9] f_2[4] + 1000 10.749616 1.0167438 7.6203704 5.4893075 0 0 + 1100 9.0727748 1.003438 6.1822573 8.6707036 1 1339 + 1200 7.1960998 1.0003968 4.8077632 6.7809972 1 1039 + 1300 6.2680889 1.0011134 4.3139658 8.2260362 1 861 + 1400 5.8199503 1.0024475 3.9876867 7.0322957 1 692 + 1500 5.399935 0.99757802 3.4552534 7.905565 1 577 + 1600 5.0830248 1.0023727 3.1330433 7.6897887 1 479 + 1700 4.8728937 1.0027203 3.0838267 7.606406 1 389 + 1800 4.8443541 1.0018057 3.115321 7.4547572 1 317 + 1900 5.0622362 1.0007126 2.9336473 6.514338 1 268 + 2000 5.022699 1.0030275 3.1244763 7.2999286 1 223 + 2100 4.4605894 1.0019457 2.9262733 8.3475145 1 196 + 2200 4.6544992 1.0023701 3.0140329 7.3670747 1 164 + 2300 4.1954825 1.0012089 2.5802739 7.5553707 1 142 + 2400 4.0806819 1.0000292 2.6492187 7.5648723 1 122 + 2500 3.7437189 0.99949605 2.3660722 8.2155316 1 104 + 2600 4.2333926 1.0002823 2.5704515 7.2839635 1 106 + 2700 3.7542455 1.001394 2.4146222 6.3785983 1 86 + 2800 3.4011329 0.99832028 2.141193 6.3869497 1 78 + 2900 3.4579019 1.0007319 2.1839274 6.241817 1 64 + 3000 3.6128019 1.0017345 2.2982426 5.8975992 1 55 +Loop time of 67.0194 on 4 procs for 2000 steps with 16271 atoms + +Performance: 2578.358 tau/day, 29.842 timesteps/s, 485.561 katom-step/s +98.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 36.774 | 43.583 | 50.126 | 71.5 | 65.03 +Neigh | 0.29299 | 0.3134 | 0.32399 | 2.2 | 0.47 +Comm | 0.75102 | 7.2688 | 14.075 | 174.8 | 10.85 +Output | 0.0016347 | 0.0017229 | 0.0018802 | 0.2 | 0.00 +Modify | 15.794 | 15.808 | 15.828 | 0.3 | 23.59 +Other | | 0.04379 | | | 0.07 + +Nlocal: 4067.75 ave 4560 max 3583 min +Histogram: 1 0 0 1 0 0 1 0 0 1 +Nghost: 2256.75 ave 2292 max 2241 min +Histogram: 2 1 0 0 0 0 0 0 0 1 +Neighs: 23706 ave 24669 max 22450 min +Histogram: 1 0 0 0 0 0 2 0 0 1 + +Total # of neighbors = 94824 +Ave neighs/atom = 5.8277918 +Neighbor list builds = 108 +Dangerous builds = 0 +Total wall time: 0:01:36 From d490d24bba21e513e67b3bab4317ee33e44db1dc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 11:30:59 -0500 Subject: [PATCH 56/89] update CMake script code to automatically chose heFFTe backed based on FFT choice --- cmake/Modules/Packages/KSPACE.cmake | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index 2ce136aefb..6060d4b1db 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -48,10 +48,15 @@ endif() option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF) if(FFT_USE_HEFFTE) - # if FFT_HEFFTE is enabled, switch the builtin FFT engine with Heffte - set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL) - set(FFT_HEFFTE_BACKEND "${FFT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL") + # if FFT_HEFFTE is enabled, use the heFFTe parallel engine instead of the builtin fftMPI engine + + # map standard FFT choices to available heFFTe backends: FFTW3 -> FFTW, KISS -> BUILTIN + set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL BUILTIN) + string(REPLACE FFTW3 FFTW FFT_HEFFTE_BACKEND_DEFAULT ${FFT}) + string(REPLACE KISS BUILTIN FFT_HEFFTE_BACKEND_DEFAULT ${FFT_HEFFTE_BACKEND_DEFAULT}) + set(FFT_HEFFTE_BACKEND "${FFT_HEFFTE_BACKEND_DEFAULT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL") set_property(CACHE FFT_HEFFTE_BACKEND PROPERTY STRINGS ${FFT_HEFFTE_BACKEND_VALUES}) + validate_option(FFT_HEFFTE_BACKEND FFT_HEFFTE_BACKEND_VALUES) if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL set(HEFFTE_COMPONENTS "FFTW") @@ -73,19 +78,21 @@ if(FFT_USE_HEFFTE) if(CMAKE_REQUEST_PIC) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() + set(Heffte_ENABLE_${FFT_HEFFTE_BACKEND} ON) include(FetchContent) FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0 URL "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz" URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d ) FetchContent_Populate(HEFFTE_PROJECT) - # fixup git hash to show "(unknown)" to avoid compilation failures. It cannot derive the HeFFTe hash anyway. + + # fixup git hash to show "(unknown)" to avoid compilation failures. file(READ ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h HEFFTE_CFG_FILE_TEXT) string(REPLACE "@Heffte_GIT_HASH@" "(unknown)" HEFFTE_CFG_FILE_TEXT "${HEFFTE_CFG_FILE_TEXT}") file(WRITE ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h "${HEFFTE_CFG_FILE_TEXT}") + add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR}) - add_library(Heffte::Heffte INTERFACE IMPORTED GLOBAL) - target_link_libraries(Heffte::Heffte INTERFACE Heffte) + add_library(Heffte::Heffte ALIAS Heffte) if(BUILD_SHARED_LIBS_WAS_ON) set(BUILD_SHARED_LIBS ON) endif() From ccd50a8958eee8ae963d7db4fcf378c653032c1a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 12:12:03 -0500 Subject: [PATCH 57/89] add workaround for Cray's Clang based compiler to compile fmtlib --- cmake/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f7e9b314bd..c8318c262a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -120,6 +120,19 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL " set(CMAKE_TUNE_DEFAULT "-Minform=severe") endif() +# this hack is required to compile fmt lib with CrayClang version 15.0.2 +# CrayClang is only directly recognized by version 3.28 and later +if(CMAKE_VERSION VERSION_LESS 3.28) + get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME) + if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC")) + set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR") + endif() +else() + if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang") + set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR") + endif() +endif() + # silence nvcc warnings if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma") From 8a9dfe8d113b94b31a8368ca6727963e58a442df Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 12:30:43 -0500 Subject: [PATCH 58/89] silence compiler warning --- src/compute.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compute.cpp b/src/compute.cpp index d6ac382151..a12373fd51 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; static constexpr int DELTA = 4; -static constexpr double BIG = MAXTAGINT; // allocate space for static class instance variable and initialize it From 2c9e652772e74327134fc28e819e38d1b76413d4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 20:15:04 -0500 Subject: [PATCH 59/89] fix uninitialized data bug when using a child class --- src/fix_wall_reflect.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fix_wall_reflect.cpp b/src/fix_wall_reflect.cpp index 00ef968828..0169644e4a 100644 --- a/src/fix_wall_reflect.cpp +++ b/src/fix_wall_reflect.cpp @@ -32,8 +32,7 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ FixWallReflect::FixWallReflect(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), - nwall(0) + Fix(lmp, narg, arg), nwall(0), varflag(0) { if (narg < 4) utils::missing_cmd_args(FLERR, "fix wall/reflect", error); From 33e57e50e86b529611a66127aaa4156afc9484b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Feb 2024 20:15:15 -0500 Subject: [PATCH 60/89] cosmetic --- src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp b/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp index c435cc14ae..42bb198049 100644 --- a/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp +++ b/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp @@ -43,8 +43,7 @@ FixWallReflectStochastic(LAMMPS *lmp, int narg, char **arg) : if (narg < 8) error->all(FLERR,"Illegal fix wall/reflect/stochastic command"); if (domain->triclinic != 0) - error->all(FLERR, "Fix wall/reflect/stochastic cannot be used with " - "triclinic simulation box"); + error->all(FLERR, "Fix wall/reflect/stochastic cannot be used with triclinic simulation box"); dynamic_group_allow = 1; @@ -168,8 +167,7 @@ FixWallReflectStochastic(LAMMPS *lmp, int narg, char **arg) : xscale = domain->lattice->xlattice; yscale = domain->lattice->ylattice; zscale = domain->lattice->zlattice; - } - else xscale = yscale = zscale = 1.0; + } else xscale = yscale = zscale = 1.0; for (int m = 0; m < nwall; m++) { if (wallstyle[m] != CONSTANT) continue; From 82f106c12a6b2768196a5b7ab93a820072787908 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 2 Feb 2024 11:53:40 -0500 Subject: [PATCH 61/89] ensure that the "timeremain" thermo keyword never reports a negative remaining time --- src/timer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/timer.cpp b/src/timer.cpp index 409135cbaf..ffcd616fbc 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -200,7 +200,10 @@ bool Timer::_check_timeout() /* ---------------------------------------------------------------------- */ double Timer::get_timeout_remain() { - return (_timeout < 0.0) ? 0.0 : _timeout + timeout_start - platform::walltime(); + double remain = _timeout + timeout_start - platform::walltime(); + // flag timeout if the timer expires right now + if (remain < 0.0) remain = 0.0; + return (_timeout < 0.0) ? 0.0 : remain; } /* ---------------------------------------------------------------------- From ac8f02ec5acd496f31a78761cdde39d71e9e12f6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 2 Feb 2024 12:17:58 -0500 Subject: [PATCH 62/89] correct comment --- src/timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timer.cpp b/src/timer.cpp index ffcd616fbc..288ac28f43 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -201,7 +201,7 @@ bool Timer::_check_timeout() double Timer::get_timeout_remain() { double remain = _timeout + timeout_start - platform::walltime(); - // flag timeout if the timer expires right now + // never report a negative remaining time. if (remain < 0.0) remain = 0.0; return (_timeout < 0.0) ? 0.0 : remain; } From e5abfda82324b35df560eb9b8113f5e2758b289b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 3 Feb 2024 17:47:00 -0500 Subject: [PATCH 63/89] cosmetic --- src/fix_adapt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 996597ab8b..2a10b9d603 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -270,7 +270,7 @@ void FixAdapt::post_constructor() if (diam_flag && atom->radius_flag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam, group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -288,7 +288,7 @@ void FixAdapt::post_constructor() if (chgflag && atom->q_flag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_chg, group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; From 094d099699097c2b6be053fc276c6fab446f3a49 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 10:11:01 -0500 Subject: [PATCH 64/89] update author credits --- src/ASPHERE/pair_ylz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ASPHERE/pair_ylz.cpp b/src/ASPHERE/pair_ylz.cpp index 0d0c8b9ee0..a678712619 100644 --- a/src/ASPHERE/pair_ylz.cpp +++ b/src/ASPHERE/pair_ylz.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Hongyan Yuan (SUSTech) + Contributing authors: Hongyan Yuan (SUSTech), Zhaoyan Huang(SUSTech) ------------------------------------------------------------------------- */ #include "pair_ylz.h" From 3c184aac849c9ad31030645165f1826e53df6c37 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 16:45:01 -0500 Subject: [PATCH 65/89] add fft support to info command --- src/KOKKOS/Install.sh | 1 - src/info.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ src/lmpfftsettings.h | 12 ++++++------ 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 112a2e947a..462c0cbe57 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -208,7 +208,6 @@ action kokkos_few.h action kokkos_type.h action kokkos.cpp action kokkos.h -action lmpfftsettings_kokkos.h lmpfftsettings.h action math_special_kokkos.cpp action math_special_kokkos.h action meam_dens_final_kokkos.h meam_dens_final.cpp diff --git a/src/info.cpp b/src/info.cpp index 49b77d60c9..aa3bbb2bcc 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -97,6 +97,7 @@ enum {COMPUTES=1<<0, DUMP_STYLES=1<<24, COMMAND_STYLES=1<<25, ACCELERATOR=1<<26, + FFT=1<<27, ALL=~0}; static const int STYLES = ATOM_STYLES | INTEGRATE_STYLES | MINIMIZE_STYLES @@ -206,6 +207,9 @@ void Info::command(int narg, char **arg) } else if (strncmp(arg[idx],"accelerator",3) == 0) { flags |= ACCELERATOR; ++idx; + } else if (strncmp(arg[idx],"fft",3) == 0) { + flags |= FFT; + ++idx; } else if (strncmp(arg[idx],"styles",3) == 0) { if (idx+1 < narg) { ++idx; @@ -400,6 +404,42 @@ void Info::command(int narg, char **arg) comm->procgrid[1], comm->procgrid[2]); } + if (flags & FFT) { + fputs("\nFFT information:\n",out); +#if defined(FFT_HEFFTE) + fputs("FFT engine = HeFFTe\n",out); +#if defined(FFT_HEFFTE_MKL) + fputs("FFT library = MKL\n", out); +#elif defined(FFT_HEFFTE_FFTW) + fputs("FFT library = FFTW\n", out); +#else + fputs("FFT library = (builtin)\n", out); +#endif +#else + fputs("FFT engine = mpiFFT\n",out); +#if defined(FFT_MKL) + fputs("FFT library = MKL\n", out); +#elif defined(FFT_FFTW3) + fputs("FFT library = FFTW3\n", out); +#else + fputs("FFT library = KISS\n", out); +#endif +#endif +#if defined(LMP_KOKKOS) + fputs("KOKKOS FFT engine = mpiFFT\n",out); +#if defined(FFT_KOKKOS_CUFFT) + fputs("KOKKOS FFT library = cuFFT\n", out); +#elif defined(FFT_KOKKOS_HIPFFT) + fputs("KOKKOS FFT library = hipFFT\n", out); +#elif defined(FFT_FFTW3) + fputs("KOKKOS FFT library = FFTW3\n", out); +#elif defined(FFT_KOKKOS_MKL) + fputs("KOKKOS FFT library = MKL\n", out); +#else + fputs("KOKKOS FFT library = KISS\n", out); +#endif +#endif + } if (flags & SYSTEM) { fputs("\nSystem information:\n",out); fmt::print(out,"Units = {}\n", update->unit_style); diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 10c57ee449..b4e4f15c6b 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -40,7 +40,7 @@ #elif defined(FFT_HEFFTE_MKL) #define LMP_FFT_LIB "HeFFTe(MKL)" #else -#define LMP_FFT_LIB "HeFFTe(native)" +#define LMP_FFT_LIB "HeFFTe(builtin)" #endif #elif defined(FFT_FFTW3) #define LMP_FFT_LIB "FFTW3" @@ -55,14 +55,14 @@ #endif #ifdef LMP_KOKKOS -#if defined(FFT_KOKKOS_FFTW3) -#define LMP_FFT_KOKKOS_LIB "FFTW3" -#elif defined(FFT_KOKKOS_MKL) -#define LMP_FFT_KOKKOS_LIB "MKL FFT" -#elif defined(FFT_KOKKOS_CUFFT) +#if defined(FFT_KOKKOS_CUFFT) #define LMP_FFT_KOKKOS_LIB "cuFFT" #elif defined(FFT_KOKKOS_HIPFFT) #define LMP_FFT_KOKKOS_LIB "hipFFT" +#elif defined(FFT_KOKKOS_FFTW3) +#define LMP_FFT_KOKKOS_LIB "FFTW3" +#elif defined(FFT_KOKKOS_MKL) +#define LMP_FFT_KOKKOS_LIB "MKL FFT" #else #define LMP_FFT_KOKKOS_LIB "KISS FFT" #endif From efbc0e0579496d14bb88b3e26675b33241ed5403 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 17:22:53 -0500 Subject: [PATCH 66/89] whitespace --- doc/src/kspace_style.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/kspace_style.rst b/doc/src/kspace_style.rst index 78d7380c01..e7d5e93d72 100644 --- a/doc/src/kspace_style.rst +++ b/doc/src/kspace_style.rst @@ -451,7 +451,7 @@ relative RMS error. assignment and force interpolation calculations, along with the FFTs themselves, on the GPU or (optionally) threaded on the CPU when using OpenMP and FFTW3. The specific FFT library is selected using - the FFT_KOKKOS CMake parameter. See the + the FFT_KOKKOS CMake parameter. See the :doc:`Build settings ` doc page for how to select a 3rd-party FFT library. From 11b2538cdbf4e9aecd072dddba54f0684a2a8b2e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 17:32:45 -0500 Subject: [PATCH 67/89] print fft info also with -help flag, using single function to create string --- src/info.cpp | 98 +++++++++++++++++++++++++++++++++----------------- src/info.h | 1 + src/lammps.cpp | 6 +++- 3 files changed, 71 insertions(+), 34 deletions(-) diff --git a/src/info.cpp b/src/info.cpp index aa3bbb2bcc..2b87452d72 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -34,6 +34,7 @@ #include "group.h" #include "improper.h" #include "input.h" +#include "lmpfftsettings.h" #include "modify.h" #include "neighbor.h" #include "output.h" @@ -406,40 +407,9 @@ void Info::command(int narg, char **arg) if (flags & FFT) { fputs("\nFFT information:\n",out); -#if defined(FFT_HEFFTE) - fputs("FFT engine = HeFFTe\n",out); -#if defined(FFT_HEFFTE_MKL) - fputs("FFT library = MKL\n", out); -#elif defined(FFT_HEFFTE_FFTW) - fputs("FFT library = FFTW\n", out); -#else - fputs("FFT library = (builtin)\n", out); -#endif -#else - fputs("FFT engine = mpiFFT\n",out); -#if defined(FFT_MKL) - fputs("FFT library = MKL\n", out); -#elif defined(FFT_FFTW3) - fputs("FFT library = FFTW3\n", out); -#else - fputs("FFT library = KISS\n", out); -#endif -#endif -#if defined(LMP_KOKKOS) - fputs("KOKKOS FFT engine = mpiFFT\n",out); -#if defined(FFT_KOKKOS_CUFFT) - fputs("KOKKOS FFT library = cuFFT\n", out); -#elif defined(FFT_KOKKOS_HIPFFT) - fputs("KOKKOS FFT library = hipFFT\n", out); -#elif defined(FFT_FFTW3) - fputs("KOKKOS FFT library = FFTW3\n", out); -#elif defined(FFT_KOKKOS_MKL) - fputs("KOKKOS FFT library = MKL\n", out); -#else - fputs("KOKKOS FFT library = KISS\n", out); -#endif -#endif + fputs(get_fft_info().c_str(),out); } + if (flags & SYSTEM) { fputs("\nSystem information:\n",out); fmt::print(out,"Units = {}\n", update->unit_style); @@ -1308,6 +1278,68 @@ std::string Info::get_accelerator_info(const std::string &package) /* ---------------------------------------------------------------------- */ +std::string Info::get_fft_info() +{ + std::string fft_info; +#if defined(FFT_SINGLE) + fft_info = "FFT precision = single\n"; +#else + fft_info = "FFT precision = double\n"; +#endif +#if defined(FFT_HEFFTE) + fft_info += "FFT engine = HeFFTe\n"; +#if defined(FFT_HEFFTE_MKL) + fft_info += "FFT library = MKL\n"; +#elif defined(FFT_HEFFTE_FFTW) + fft_info += "FFT library = FFTW\n"; +#else + fft_info += "FFT library = (builtin)\n"; +#endif +#else + fft_info += "FFT engine = mpiFFT\n"; +#if defined(FFT_MKL) +#if defined(FFT_MKL_THREADS) + fft_info += "FFT library = MKL with threads\n"; +#else + fft_info += "FFT library = MKL\n"; +#endif +#elif defined(FFT_FFTW3) +#if defined(FFT_FFTW_THREADS) + fft_info += "FFT library = FFTW3 with threads\n"; +#else + fft_info += "FFT library = FFTW3\n"; +#endif +#else + fft_info += "FFT library = KISS\n"; +#endif +#endif +#if defined(LMP_KOKKOS) + fft_info += "KOKKOS FFT engine = mpiFFT\n"; +#if defined(FFT_KOKKOS_CUFFT) + fft_info += "KOKKOS FFT library = cuFFT\n"; +#elif defined(FFT_KOKKOS_HIPFFT) + fft_info += "KOKKOS FFT library = hipFFT\n"; +#elif defined(FFT_KOKKOS_FFTW3) +#if defined(FFT_KOKKOS_FFTW_THREADS) + fft_info += "KOKKOS FFT library = FFTW3 with threads\n"; +#else + fft_info += "KOKKOS FFT library = FFTW3\n"; +#endif +#elif defined(FFT_KOKKOS_MKL) +#if defined(FFT_KOKKOS_MKL_THREADS) + fft_info += "KOKKOS FFT library = MKL with threads\n"; +#else + fft_info += "KOKKOS FFT library = MKL\n"; +#endif +#else + fft_info += "KOKKOS FFT library = KISS\n"; +#endif +#endif + return fft_info; +} + +/* ---------------------------------------------------------------------- */ + void Info::get_memory_info(double *meminfo) { double bytes = 0; diff --git a/src/info.h b/src/info.h index c4230b063e..8fd725abf6 100644 --- a/src/info.h +++ b/src/info.h @@ -47,6 +47,7 @@ class Info : public Command { static bool has_package(const std::string &); static bool has_accelerator_feature(const std::string &, const std::string &, const std::string &); + static std::string get_fft_info(); static bool has_gpu_device(); static std::string get_gpu_device_info(); static std::string get_accelerator_info(const std::string &pkg = ""); diff --git a/src/lammps.cpp b/src/lammps.cpp index b3d2171152..2a71714dcc 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -66,6 +66,7 @@ #include "lmpinstalledpkgs.h" #include "lmpgitversion.h" +#include "lmpfftsettings.h" #if defined(LAMMPS_UPDATE) #define UPDATE_STRING " - " LAMMPS_UPDATE @@ -1446,7 +1447,10 @@ void LAMMPS::print_config(FILE *fp) fmt::print(fp,"Compatible GPU present: {}\n\n",Info::has_gpu_device() ? "yes" : "no"); #endif - fputs("Active compile time flags:\n\n",fp); + fputs("FFT information:\n\n",fp); + fputs(Info::get_fft_info().c_str(),fp); + + fputs("\nActive compile time flags:\n\n",fp); if (Info::has_gzip_support()) fputs("-DLAMMPS_GZIP\n",fp); if (Info::has_png_support()) fputs("-DLAMMPS_PNG\n",fp); if (Info::has_jpeg_support()) fputs("-DLAMMPS_JPEG\n",fp); From de39bcc1fdc36fbee3f8192376469f541548260d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 17:37:53 -0500 Subject: [PATCH 68/89] update documentation --- doc/src/Build_settings.rst | 17 +++++++++-------- doc/src/info.rst | 9 ++++++++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 949d308510..a9a9eb25bf 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -70,7 +70,7 @@ libraries and better pipelining for packing and communication. the FFT library selected by the FFT_KOKKOS variable applies. Otherwise, the FFT library selected by the FFT variable applies. The same FFT settings apply to both. FFT_KOKKOS must be compatible with the - Kokkos backend - for example, when using the CUDA backend of Kokkos, + Kokkos back end - for example, when using the CUDA back end of Kokkos, you must use either CUFFT or KISS. Usually these settings are all that is needed. If FFTW3 is @@ -186,9 +186,10 @@ The Intel MKL math library is part of the Intel compiler suite. It can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting above). -The CUFFT and HIPFFT FFT libraries are packaged with NVIDIA's CUDA and AMD's -HIP installations, respectively. These FFT libraries require the Kokkos acceleration -package to be enabled and the Kokkos backend to be GPU-resident (ie, HIP or CUDA). +The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and +AMD's HIP installations, respectively. These FFT libraries require the +Kokkos acceleration package to be enabled and the Kokkos back end to be +GPU-resident (i.e., HIP or CUDA). Performing 3d FFTs in parallel can be time-consuming due to data access and required communication. This cost can be reduced by performing @@ -201,11 +202,11 @@ generally less than the difference in precision. Using the ``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory use and parallel communication costs for transposing 3d FFT data. -When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW -library a second time with support for single-precision. +When using ``-DFFT_SINGLE`` with FFTW3, you may need to ensure that +the FFTW3 installation includes support for single-precision. -For FFTW3, do the following, which should produce the additional -library ``libfftw3f.a`` or ``libfftw3f.so``\ . +When compiler FFTW3 from source, you can do the following, which should +produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ . .. code-block:: bash diff --git a/doc/src/info.rst b/doc/src/info.rst index 958542e3c8..ac70034c30 100644 --- a/doc/src/info.rst +++ b/doc/src/info.rst @@ -10,7 +10,7 @@ Syntax info args -* args = one or more of the following keywords: *out*, *all*, *system*, *memory*, *communication*, *computes*, *dumps*, *fixes*, *groups*, *regions*, *variables*, *coeffs*, *styles*, *time*, *accelerator*, or *configuration* +* args = one or more of the following keywords: *out*, *all*, *system*, *memory*, *communication*, *computes*, *dumps*, *fixes*, *groups*, *regions*, *variables*, *coeffs*, *styles*, *time*, *accelerator*, *fft* or *configuration* * *out* values = *screen*, *log*, *append* filename, *overwrite* filename * *styles* values = *all*, *angle*, *atom*, *bond*, *compute*, *command*, *dump*, *dihedral*, *fix*, *improper*, *integrate*, *kspace*, *minimize*, *pair*, *region* @@ -92,6 +92,13 @@ The *accelerator* category prints out information about compile time settings of included accelerator support for the GPU, KOKKOS, INTEL, and OPENMP packages. +.. versionadded:: TBD + +The *fft* category prints out information about the included 3d-FFT +support. This lists the 3d-FFT engine, FFT precision, FFT library +used by the FFT engine. If the KOKKOS package is included, the settings +used for the KOKKOS package are displayed as well. + The *styles* category prints the list of styles available in the current LAMMPS binary. It supports one of the following options to control which category of styles is printed out: From ad855ad7eab25c2e1f761c2d043ead92a831b108 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 19:50:51 -0500 Subject: [PATCH 69/89] remove unused constants --- src/AMOEBA/amoeba_convolution.cpp | 1 - src/AMOEBA/amoeba_multipole.cpp | 12 ++---------- src/AMOEBA/improper_amoeba.cpp | 3 --- src/BPM/fix_update_special_bonds.cpp | 2 -- src/CLASS2/improper_class2.cpp | 2 -- src/COLVARS/ndx_group.cpp | 1 - src/DIELECTRIC/pppm_dielectric.cpp | 5 ++--- src/DIELECTRIC/pppm_disp_dielectric.cpp | 8 +------- src/DPD-REACT/fix_rx.cpp | 1 - src/EFF/fix_langevin_eff.cpp | 7 ++----- src/ELECTRODE/ewald_electrode.cpp | 2 -- src/ELECTRODE/pppm_electrode.cpp | 3 --- src/EXTRA-FIX/fix_ffl.cpp | 2 -- src/EXTRA-FIX/fix_filter_corotate.cpp | 1 - src/EXTRA-FIX/fix_gle.cpp | 2 -- src/EXTRA-MOLECULE/angle_fourier.cpp | 3 --- src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp | 1 - src/EXTRA-MOLECULE/improper_distance.cpp | 4 ---- src/EXTRA-MOLECULE/improper_ring.cpp | 1 - src/GPU/pppm_gpu.cpp | 12 ++---------- src/INTEL/npair_skip_intel.cpp | 3 --- src/INTEL/pair_eam_intel.cpp | 2 -- src/INTEL/pair_sw_intel.cpp | 3 --- src/INTEL/pppm_disp_intel.cpp | 8 +------- src/INTEL/pppm_electrode_intel.cpp | 5 ----- src/INTEL/pppm_intel.cpp | 14 +++----------- src/INTERLAYER/pair_aip_water_2dm.cpp | 4 ---- src/INTERLAYER/pair_drip.cpp | 1 - src/INTERLAYER/pair_kolmogorov_crespi_full.cpp | 1 - src/INTERLAYER/pair_kolmogorov_crespi_z.cpp | 1 - src/INTERLAYER/pair_lebedeva_z.cpp | 1 - src/INTERLAYER/pair_saip_metal.cpp | 4 ---- src/KOKKOS/angle_cosine_kokkos.cpp | 2 -- src/KOKKOS/comm_tiled_kokkos.cpp | 7 ------- src/KOKKOS/dihedral_class2_kokkos.cpp | 1 - src/KOKKOS/dihedral_harmonic_kokkos.cpp | 2 -- src/KOKKOS/domain_kokkos.cpp | 1 - src/KOKKOS/fix_acks2_reaxff_kokkos.cpp | 3 +-- src/KOKKOS/fix_eos_table_rx_kokkos.cpp | 2 -- src/KOKKOS/fix_langevin_kokkos.cpp | 6 ++---- src/KOKKOS/fix_qeq_reaxff_kokkos.cpp | 3 +-- src/KOKKOS/fix_shake_kokkos.cpp | 5 ----- src/KOKKOS/improper_class2_kokkos.cpp | 1 - src/KOKKOS/mliap_descriptor_so3_kokkos.cpp | 3 --- src/KOKKOS/nbin_kokkos.cpp | 3 --- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 2 -- src/KOKKOS/pair_sw_kokkos.cpp | 3 --- src/KOKKOS/pair_vashishta_kokkos.cpp | 3 --- src/KOKKOS/pppm_kokkos.cpp | 9 +++------ src/KOKKOS/region_block_kokkos.cpp | 5 ++--- src/KSPACE/msm.cpp | 9 ++++----- src/KSPACE/pair_coul_streitz.cpp | 1 - src/KSPACE/pppm.cpp | 8 +++----- src/KSPACE/pppm_dipole.cpp | 9 +++------ src/KSPACE/pppm_dipole_spin.cpp | 9 ++------- src/KSPACE/pppm_disp.cpp | 5 +---- src/KSPACE/pppm_disp_tip4p.cpp | 2 -- src/KSPACE/pppm_stagger.cpp | 8 +++----- src/KSPACE/pppm_tip4p.cpp | 1 - src/MACHDYN/fix_smd_wall_surface.cpp | 2 +- src/MANYBODY/pair_comb.cpp | 1 - src/MANYBODY/pair_comb3.cpp | 1 - src/MANYBODY/pair_eam.cpp | 2 -- src/MANYBODY/pair_edip.cpp | 2 -- src/MANYBODY/pair_edip_multi.cpp | 1 - src/MANYBODY/pair_extep.cpp | 1 - src/MANYBODY/pair_gw_zbl.cpp | 1 - src/MANYBODY/pair_local_density.cpp | 2 -- src/MANYBODY/pair_meam_spline.cpp | 2 -- src/MANYBODY/pair_meam_sw_spline.cpp | 2 -- src/MANYBODY/pair_polymorphic.cpp | 4 ---- src/MANYBODY/pair_tersoff_table.cpp | 2 -- src/MC/fix_widom.cpp | 1 - src/MESONT/pair_mesocnt.cpp | 1 - src/MISC/pair_agni.cpp | 3 --- src/ML-IAP/mliap_descriptor_snap.cpp | 1 - src/ML-IAP/mliap_descriptor_so3.cpp | 1 - src/ML-IAP/mliap_model.cpp | 1 - src/ML-SNAP/pair_snap.cpp | 1 - src/MOFFF/improper_inversion_harmonic.cpp | 4 ---- src/OPENMP/angle_cosine_omp.cpp | 3 --- src/OPENMP/angle_cosine_periodic_omp.cpp | 2 -- src/OPENMP/angle_cosine_squared_omp.cpp | 3 --- src/OPENMP/angle_dipole_omp.cpp | 3 --- src/OPENMP/angle_fourier_omp.cpp | 3 --- src/OPENMP/dihedral_charmm_omp.cpp | 1 - src/OPENMP/dihedral_cosine_shift_exp_omp.cpp | 1 - src/OPENMP/dihedral_harmonic_omp.cpp | 1 - src/OPENMP/dihedral_table_omp.cpp | 3 --- src/OPENMP/ewald_omp.cpp | 2 -- src/OPENMP/improper_class2_omp.cpp | 3 --- src/OPENMP/improper_ring_omp.cpp | 1 - src/OPENMP/pair_brownian_omp.cpp | 2 -- src/OPENMP/pair_brownian_poly_omp.cpp | 2 -- src/OPENMP/pppm_cg_omp.cpp | 2 -- src/OPENMP/pppm_disp_omp.cpp | 1 - src/POEMS/fix_poems.cpp | 2 +- src/SMTBQ/pair_smtbq.cpp | 3 --- src/UEF/dump_cfg_uef.cpp | 2 -- src/YAFF/improper_distharm.cpp | 4 ---- src/YAFF/improper_sqdistharm.cpp | 4 ---- src/atom.cpp | 1 - src/compute_bond_local.cpp | 8 -------- src/compute_dihedral_local.cpp | 3 +-- src/compute_property_grid.cpp | 2 -- src/thermo.cpp | 1 - src/velocity.cpp | 9 ++++----- 107 files changed, 45 insertions(+), 296 deletions(-) diff --git a/src/AMOEBA/amoeba_convolution.cpp b/src/AMOEBA/amoeba_convolution.cpp index 262ce3a9c3..3bdfdc9b74 100644 --- a/src/AMOEBA/amoeba_convolution.cpp +++ b/src/AMOEBA/amoeba_convolution.cpp @@ -48,7 +48,6 @@ enum{MPOLE_GRID,POLAR_GRID,POLAR_GRIDC,DISP_GRID,INDUCE_GRID,INDUCE_GRIDC}; #define SCALE 0 static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- partition an FFT grid across processors diff --git a/src/AMOEBA/amoeba_multipole.cpp b/src/AMOEBA/amoeba_multipole.cpp index 81e7763fe7..68235dfe26 100644 --- a/src/AMOEBA/amoeba_multipole.cpp +++ b/src/AMOEBA/amoeba_multipole.cpp @@ -31,16 +31,8 @@ using namespace MathConst; using MathSpecial::square; -enum{FIELD,ZRSD,TORQUE,UFLD}; // reverse comm -enum{VDWL,REPULSE,QFER,DISP,MPOLE,POLAR,USOLV,DISP_LONG,MPOLE_LONG,POLAR_LONG}; - -#ifdef FFT_SINGLE -static constexpr FFT_SCALAR ZEROF = 0.0f; -static constexpr FFT_SCALAR ONEF = 1.0f; -#else -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; -#endif +enum { FIELD, ZRSD, TORQUE, UFLD }; // reverse comm +enum { VDWL, REPULSE, QFER, DISP, MPOLE, POLAR, USOLV, DISP_LONG, MPOLE_LONG, POLAR_LONG }; /* ---------------------------------------------------------------------- multipole = multipole interactions diff --git a/src/AMOEBA/improper_amoeba.cpp b/src/AMOEBA/improper_amoeba.cpp index 46c2585d1f..cbc7fbd8d2 100644 --- a/src/AMOEBA/improper_amoeba.cpp +++ b/src/AMOEBA/improper_amoeba.cpp @@ -28,9 +28,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperAmoeba::ImproperAmoeba(LAMMPS *lmp) : Improper(lmp) diff --git a/src/BPM/fix_update_special_bonds.cpp b/src/BPM/fix_update_special_bonds.cpp index 5452366090..04f5d94e7e 100644 --- a/src/BPM/fix_update_special_bonds.cpp +++ b/src/BPM/fix_update_special_bonds.cpp @@ -28,8 +28,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr int DELTA = 10000; - /* ---------------------------------------------------------------------- */ FixUpdateSpecialBonds::FixUpdateSpecialBonds(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index e2f5ffe01b..73f21600bb 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -32,8 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp) diff --git a/src/COLVARS/ndx_group.cpp b/src/COLVARS/ndx_group.cpp index 062f17619a..4170a9ea70 100644 --- a/src/COLVARS/ndx_group.cpp +++ b/src/COLVARS/ndx_group.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; static constexpr int BUFLEN = 4096; -static constexpr int DELTA = 16384; // read file until next section "name" or any next section if name == "" diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index dac24a9838..49fa8ed128 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -38,11 +38,10 @@ using namespace MathSpecial; static constexpr double SMALL = 0.00001; -enum {REVERSE_RHO}; -enum {FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index baa9478a45..c6108646be 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -33,11 +33,8 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{REVERSE_RHO,REVERSE_RHO_GEOM,REVERSE_RHO_ARITH,REVERSE_RHO_NONE}; enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, @@ -48,9 +45,6 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, FORWARD_IK_NONE,FORWARD_AD_NONE,FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDispDielectric::PPPMDispDielectric(LAMMPS *_lmp) : PPPMDisp(_lmp) diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index 69eab4dbee..a7e9e4ea77 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -42,7 +42,6 @@ enum { NONE, HARMONIC }; enum { LUCY }; static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; #ifdef DBL_EPSILON static constexpr double MY_EPSILON = 10.0*DBL_EPSILON; diff --git a/src/EFF/fix_langevin_eff.cpp b/src/EFF/fix_langevin_eff.cpp index 72c368b612..65a3f5b115 100644 --- a/src/EFF/fix_langevin_eff.cpp +++ b/src/EFF/fix_langevin_eff.cpp @@ -34,11 +34,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NOBIAS,BIAS}; -enum{CONSTANT,EQUAL,ATOM}; - -static constexpr double SINERTIA = 0.4; // moment of inertia prefactor for sphere -static constexpr double EINERTIA = 0.2; // moment of inertia prefactor for ellipsoid +enum { NOBIAS, BIAS }; +enum { CONSTANT, EQUAL, ATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/ELECTRODE/ewald_electrode.cpp b/src/ELECTRODE/ewald_electrode.cpp index 122708b97d..80c9c94a06 100644 --- a/src/ELECTRODE/ewald_electrode.cpp +++ b/src/ELECTRODE/ewald_electrode.cpp @@ -37,8 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.00001; - /* ---------------------------------------------------------------------- */ EwaldElectrode::EwaldElectrode(LAMMPS *lmp) : Ewald(lmp), boundcorr(nullptr) diff --git a/src/ELECTRODE/pppm_electrode.cpp b/src/ELECTRODE/pppm_electrode.cpp index b9024cd69a..39e7c66ce5 100644 --- a/src/ELECTRODE/pppm_electrode.cpp +++ b/src/ELECTRODE/pppm_electrode.cpp @@ -47,15 +47,12 @@ using namespace MathSpecial; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; enum { REVERSE_RHO }; enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static const char cite_pppm_electrode[] = "kspace_style pppm/electrode command:\n\n" diff --git a/src/EXTRA-FIX/fix_ffl.cpp b/src/EXTRA-FIX/fix_ffl.cpp index 3039d338fc..e113a5fd37 100644 --- a/src/EXTRA-FIX/fix_ffl.cpp +++ b/src/EXTRA-FIX/fix_ffl.cpp @@ -43,8 +43,6 @@ enum {CONSTANT,EQUAL,ATOM}; enum {NO_FLIP, FLIP_RESCALE, FLIP_HARD, FLIP_SOFT}; //#define FFL_DEBUG 1 -static constexpr int MAXLINE = 1024; - /* syntax for fix_ffl: * fix nfix id-group ffl tau Tstart Tstop seed [flip_type] * */ diff --git a/src/EXTRA-FIX/fix_filter_corotate.cpp b/src/EXTRA-FIX/fix_filter_corotate.cpp index 74d1d18486..872ebd1772 100644 --- a/src/EXTRA-FIX/fix_filter_corotate.cpp +++ b/src/EXTRA-FIX/fix_filter_corotate.cpp @@ -42,7 +42,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace FixConst; -static constexpr double BIG = 1.0e20; static constexpr double MASSDELTA = 0.1; static const char cite_filter_corotate[] = diff --git a/src/EXTRA-FIX/fix_gle.cpp b/src/EXTRA-FIX/fix_gle.cpp index a65b60377e..1ecc06ddf4 100644 --- a/src/EXTRA-FIX/fix_gle.cpp +++ b/src/EXTRA-FIX/fix_gle.cpp @@ -41,8 +41,6 @@ enum{CONSTANT,EQUAL,ATOM}; //#define GLE_DEBUG 1 -static constexpr int MAXLINE = 1024; - /* syntax for fix_gle: * fix nfix id-group gle ns Tstart Tstop seed amatrix [noneq cmatrix] [every nmts] * diff --git a/src/EXTRA-MOLECULE/angle_fourier.cpp b/src/EXTRA-MOLECULE/angle_fourier.cpp index 2c458c07cc..da1667c06f 100644 --- a/src/EXTRA-MOLECULE/angle_fourier.cpp +++ b/src/EXTRA-MOLECULE/angle_fourier.cpp @@ -29,12 +29,9 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleFourier::AngleFourier(LAMMPS *lmp) : Angle(lmp) diff --git a/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp b/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp index 36874ee934..28015b0c36 100644 --- a/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp +++ b/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_distance.cpp b/src/EXTRA-MOLECULE/improper_distance.cpp index acb962c4f0..934eeb285d 100644 --- a/src/EXTRA-MOLECULE/improper_distance.cpp +++ b/src/EXTRA-MOLECULE/improper_distance.cpp @@ -27,12 +27,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp) diff --git a/src/EXTRA-MOLECULE/improper_ring.cpp b/src/EXTRA-MOLECULE/improper_ring.cpp index 8c570550e4..3d8b672e1e 100644 --- a/src/EXTRA-MOLECULE/improper_ring.cpp +++ b/src/EXTRA-MOLECULE/improper_ring.cpp @@ -54,7 +54,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index 2c092f6a8e..517d843c93 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -1,4 +1,3 @@ - // clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator @@ -40,17 +39,10 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO_GPU,REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO_GPU, REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; // external functions from cuda library for atom decomposition diff --git a/src/INTEL/npair_skip_intel.cpp b/src/INTEL/npair_skip_intel.cpp index 8840f7ee43..3596237746 100644 --- a/src/INTEL/npair_skip_intel.cpp +++ b/src/INTEL/npair_skip_intel.cpp @@ -164,8 +164,6 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh, if (ipage.status()) error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); } - - int last_inum = 0, loop_end; _inum_counts[tid] = my_inum; } int inum = _inum_counts[0]; @@ -406,7 +404,6 @@ void NPairSkipTrimIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh, error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); } - int last_inum = 0, loop_end; _inum_counts[tid] = my_inum; } int inum = _inum_counts[0]; diff --git a/src/INTEL/pair_eam_intel.cpp b/src/INTEL/pair_eam_intel.cpp index 03e268bb68..bd78c3239d 100644 --- a/src/INTEL/pair_eam_intel.cpp +++ b/src/INTEL/pair_eam_intel.cpp @@ -34,8 +34,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - #define FC_PACKED1_T typename ForceConst::fc_packed1 #define FC_PACKED2_T typename ForceConst::fc_packed2 diff --git a/src/INTEL/pair_sw_intel.cpp b/src/INTEL/pair_sw_intel.cpp index 61c25692e9..dc73c26f4f 100644 --- a/src/INTEL/pair_sw_intel.cpp +++ b/src/INTEL/pair_sw_intel.cpp @@ -52,9 +52,6 @@ using namespace LAMMPS_NS; #define FC_PACKED2_T typename ForceConst::fc_packed2 #define FC_PACKED3_T typename ForceConst::fc_packed3 -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ PairSWIntel::PairSWIntel(LAMMPS *lmp) : PairSW(lmp) diff --git a/src/INTEL/pppm_disp_intel.cpp b/src/INTEL/pppm_disp_intel.cpp index 01981f3152..50e9c6e469 100644 --- a/src/INTEL/pppm_disp_intel.cpp +++ b/src/INTEL/pppm_disp_intel.cpp @@ -39,11 +39,8 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; enum{REVERSE_RHO, REVERSE_RHO_G, REVERSE_RHO_A, REVERSE_RHO_NONE}; @@ -53,9 +50,6 @@ enum{FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM, FORWARD_IK_NONE, FORWARD_AD_NONE, FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDispIntel::PPPMDispIntel(LAMMPS *lmp) : PPPMDisp(lmp) diff --git a/src/INTEL/pppm_electrode_intel.cpp b/src/INTEL/pppm_electrode_intel.cpp index 9f3c57b50e..fd2b21b627 100644 --- a/src/INTEL/pppm_electrode_intel.cpp +++ b/src/INTEL/pppm_electrode_intel.cpp @@ -48,18 +48,13 @@ using namespace LAMMPS_NS; using namespace std; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; enum { REVERSE_RHO }; enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; enum : bool { ELECTRODE = true, ELECTROLYTE = false }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static const char cite_pppm_electrode[] = "kspace_style pppm/electrode command:\n\n" diff --git a/src/INTEL/pppm_intel.cpp b/src/INTEL/pppm_intel.cpp index b72a7efd11..369c824142 100644 --- a/src/INTEL/pppm_intel.cpp +++ b/src/INTEL/pppm_intel.cpp @@ -41,17 +41,11 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ @@ -690,8 +684,6 @@ void PPPMIntel::fieldforce_ik(IntelBuffers *buffers) _alignvar(FFT_SCALAR ekx_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; _alignvar(FFT_SCALAR eky_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; _alignvar(FFT_SCALAR ekz_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; - _alignvar(FFT_SCALAR ekxy_arr[2 * INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; - _alignvar(FFT_SCALAR ekz0_arr[2 * INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; #if defined(LMP_SIMD_COMPILER) #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) diff --git a/src/INTERLAYER/pair_aip_water_2dm.cpp b/src/INTERLAYER/pair_aip_water_2dm.cpp index 655fc9f695..ea3812504d 100644 --- a/src/INTERLAYER/pair_aip_water_2dm.cpp +++ b/src/INTERLAYER/pair_aip_water_2dm.cpp @@ -29,10 +29,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; - static const char cite_aip_water[] = "aip/water/2dm potential doi/10.1021/acs.jpcc.2c08464\n" "@Article{Feng2023\n" diff --git a/src/INTERLAYER/pair_drip.cpp b/src/INTERLAYER/pair_drip.cpp index e9a820d5db..2800bd604d 100644 --- a/src/INTERLAYER/pair_drip.cpp +++ b/src/INTERLAYER/pair_drip.cpp @@ -36,7 +36,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr double HALF = 0.5; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp index 64e71f22fc..6bc3a6dde7 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp @@ -40,7 +40,6 @@ using namespace LAMMPS_NS; using namespace InterLayer; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp index 4ccbd28c02..dc1b82647a 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp @@ -37,7 +37,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/INTERLAYER/pair_lebedeva_z.cpp b/src/INTERLAYER/pair_lebedeva_z.cpp index d7b13ef821..b68db0184f 100644 --- a/src/INTERLAYER/pair_lebedeva_z.cpp +++ b/src/INTERLAYER/pair_lebedeva_z.cpp @@ -39,7 +39,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/INTERLAYER/pair_saip_metal.cpp b/src/INTERLAYER/pair_saip_metal.cpp index c6c107c980..3053113894 100644 --- a/src/INTERLAYER/pair_saip_metal.cpp +++ b/src/INTERLAYER/pair_saip_metal.cpp @@ -33,10 +33,6 @@ using namespace LAMMPS_NS; using namespace InterLayer; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; - static const char cite_saip[] = "saip/metal potential: doi:10.1021/acs.jctc.1c00622\n\n" "@Article{Ouyang2021\n" diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index ec20c8fbda..768dfd43ca 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/comm_tiled_kokkos.cpp b/src/KOKKOS/comm_tiled_kokkos.cpp index 4549f53f70..5b35527b7e 100644 --- a/src/KOKKOS/comm_tiled_kokkos.cpp +++ b/src/KOKKOS/comm_tiled_kokkos.cpp @@ -20,13 +20,6 @@ using namespace LAMMPS_NS; -static constexpr double BUFFACTOR = 1.5; -static constexpr int BUFMIN = 1000; -static constexpr int BUFEXTRA = 1000; -static constexpr double EPSILON = 1.0e-6; - -#define DELTA_PROCS 16 - /* ---------------------------------------------------------------------- */ CommTiledKokkos::CommTiledKokkos(LAMMPS *_lmp) : CommTiled(_lmp) {} diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 59f5c18ee7..204a6d0d1a 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; -static constexpr double SMALLER = 0.00001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index 87e83a17fc..78860800be 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; -static constexpr double SMALLER = 0.00001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/domain_kokkos.cpp b/src/KOKKOS/domain_kokkos.cpp index d0af281a14..aecc12cd12 100644 --- a/src/KOKKOS/domain_kokkos.cpp +++ b/src/KOKKOS/domain_kokkos.cpp @@ -23,7 +23,6 @@ using namespace LAMMPS_NS; static constexpr double BIG = 1.0e20; -static constexpr double SMALL = 1.0e-4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index 5256b7f4a4..5187031d26 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -38,8 +38,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr double SMALL = 0.0001; -#define EV_TO_KCAL_PER_MOL 14.4 +static constexpr double EV_TO_KCAL_PER_MOL = 14.4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index 9b8ac91569..8bf87ca6d3 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -25,8 +25,6 @@ #include #include "atom_masks.h" -static constexpr int MAXLINE = 1024; - #ifdef DBL_EPSILON #define MY_EPSILON (10.0*DBL_EPSILON) #else diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 89cf91130f..e60b1f0ec6 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -32,10 +32,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NOBIAS,BIAS}; -enum{CONSTANT,EQUAL,ATOM}; -static constexpr double SINERTIA = 0.4; // moment of inertia prefactor for sphere -static constexpr double EINERTIA = 0.2; // moment of inertia prefactor for ellipsoid +enum { NOBIAS, BIAS }; +enum { CONSTANT, EQUAL, ATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 06485eb1cc..b3d6b0c567 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -46,8 +46,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr double SMALL = 0.0001; -#define EV_TO_KCAL_PER_MOL 14.4 +static constexpr double EV_TO_KCAL_PER_MOL = 14.4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 81489142db..45e767f415 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -41,11 +41,6 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -static constexpr int RVOUS = 1; // 0 for irregular, 1 for all2all - -static constexpr double BIG = 1.0e20; -static constexpr double MASSDELTA = 0.1; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 4b9a009df2..862ba2a52f 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp index b079b734e0..7e30ab8cc7 100644 --- a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp +++ b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp @@ -31,9 +31,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; - /* ---------------------------------------------------------------------- */ template MLIAPDescriptorSO3Kokkos::MLIAPDescriptorSO3Kokkos(LAMMPS *lmp, char *paramfilename) diff --git a/src/KOKKOS/nbin_kokkos.cpp b/src/KOKKOS/nbin_kokkos.cpp index fd8cf5771b..79ae9c6632 100644 --- a/src/KOKKOS/nbin_kokkos.cpp +++ b/src/KOKKOS/nbin_kokkos.cpp @@ -22,9 +22,6 @@ using namespace LAMMPS_NS; -static constexpr double SMALL = 1.0e-6; -#define CUT2BIN_RATIO 100 - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 9f0b1dd747..41fcac126d 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -43,8 +43,6 @@ using MathConst::MY_PI; enum{NONE,RLINEAR,RSQ}; -static constexpr int MAXLINE = 1024; - #ifdef DBL_EPSILON #define MY_EPSILON (10.0*DBL_EPSILON) #else diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 294b451e7e..a25e1e6fde 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -37,9 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index d2eb3036d6..0beb7902eb 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -36,9 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 4a253c5779..b0d3ac55f6 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -41,15 +41,12 @@ using namespace MathSpecialKokkos; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_IK_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_IK_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index 6d53514d19..8df33c32db 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -18,12 +18,11 @@ using namespace LAMMPS_NS; -static constexpr double BIG = 1.0e20; - /* ---------------------------------------------------------------------- */ template -RegBlockKokkos::RegBlockKokkos(LAMMPS *lmp, int narg, char **arg) : RegBlock(lmp, narg, arg) +RegBlockKokkos::RegBlockKokkos(LAMMPS *lmp, int narg, char **arg) + : RegBlock(lmp, narg, arg) { atomKK = (AtomKokkos*) atom; } diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 8f79ab408c..ece8068382 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -30,18 +30,17 @@ #include "neighbor.h" #include "pair.h" -#include #include +#include using namespace LAMMPS_NS; using namespace MathConst; -#define MAX_LEVELS 10 +static constexpr int MAX_LEVELS = 10; static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -enum{REVERSE_RHO,REVERSE_AD,REVERSE_AD_PERATOM}; -enum{FORWARD_RHO,FORWARD_AD,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO, REVERSE_AD, REVERSE_AD_PERATOM }; +enum { FORWARD_RHO, FORWARD_AD, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_coul_streitz.cpp b/src/KSPACE/pair_coul_streitz.cpp index 9e3811c027..b499df3946 100644 --- a/src/KSPACE/pair_coul_streitz.cpp +++ b/src/KSPACE/pair_coul_streitz.cpp @@ -36,7 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 0ac83c01fb..2616282973 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -50,12 +50,10 @@ static constexpr int OFFSET = 16384; static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index da64f85f9e..99a0efd75e 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -42,15 +42,12 @@ using namespace MathSpecial; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_MU}; -enum{FORWARD_MU,FORWARD_MU_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_MU }; +enum { FORWARD_MU, FORWARD_MU_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_dipole_spin.cpp b/src/KSPACE/pppm_dipole_spin.cpp index 16b9e459e6..8f195a8a41 100644 --- a/src/KSPACE/pppm_dipole_spin.cpp +++ b/src/KSPACE/pppm_dipole_spin.cpp @@ -36,16 +36,11 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; -enum{REVERSE_MU}; -enum{FORWARD_MU,FORWARD_MU_PERATOM}; +enum { REVERSE_MU }; +enum { FORWARD_MU, FORWARD_MU_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 58c91ce3be..b70dae45f9 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -44,7 +44,7 @@ static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; static constexpr double SMALL = 0.00001; static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{REVERSE_RHO,REVERSE_RHO_GEOM,REVERSE_RHO_ARITH,REVERSE_RHO_NONE}; enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, @@ -55,9 +55,6 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, FORWARD_IK_NONE,FORWARD_AD_NONE,FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDisp::PPPMDisp(LAMMPS *lmp) : KSpace(lmp), diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 6161ebbe09..9e2184f2a9 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -30,9 +30,7 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int OFFSET = 16384; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index a14d7a68d6..b740d21daa 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -35,12 +35,10 @@ using namespace MathSpecial; static constexpr int OFFSET = 16384; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum{ REVERSE_RHO }; +enum{ FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 7237bc24f2..2a34db2b77 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static constexpr int OFFSET = 16384; /* ---------------------------------------------------------------------- */ diff --git a/src/MACHDYN/fix_smd_wall_surface.cpp b/src/MACHDYN/fix_smd_wall_surface.cpp index 3753b64f52..f8a8ef970c 100644 --- a/src/MACHDYN/fix_smd_wall_surface.cpp +++ b/src/MACHDYN/fix_smd_wall_surface.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace Eigen; using namespace std; -static constexpr int DELTA = 16384; + static constexpr double EPSILON = 1.0e-6; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 37e3bb404f..609e4efcf8 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -44,7 +44,6 @@ using namespace MathExtra; using namespace MathSpecial; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 5ae599ea31..b4228dbb4f 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -44,7 +44,6 @@ using namespace MathExtra; using namespace MathSpecial; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index a2fff8fb55..669a5cadbb 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -33,8 +33,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - /* ---------------------------------------------------------------------- */ PairEAM::PairEAM(LAMMPS *lmp) : Pair(lmp) diff --git a/src/MANYBODY/pair_edip.cpp b/src/MANYBODY/pair_edip.cpp index 0098bb32e5..1eac053ebd 100644 --- a/src/MANYBODY/pair_edip.cpp +++ b/src/MANYBODY/pair_edip.cpp @@ -39,9 +39,7 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; - static constexpr int GRIDDENSITY = 8000; static constexpr double GRIDSTART = 0.1; diff --git a/src/MANYBODY/pair_edip_multi.cpp b/src/MANYBODY/pair_edip_multi.cpp index 2f8e9ca9c8..32e21861f3 100644 --- a/src/MANYBODY/pair_edip_multi.cpp +++ b/src/MANYBODY/pair_edip_multi.cpp @@ -38,7 +38,6 @@ using namespace LAMMPS_NS; using namespace MathExtra; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static const char cite_pair_edip[] = diff --git a/src/MANYBODY/pair_extep.cpp b/src/MANYBODY/pair_extep.cpp index bcebbd3e72..7ed65f0f71 100644 --- a/src/MANYBODY/pair_extep.cpp +++ b/src/MANYBODY/pair_extep.cpp @@ -37,7 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathExtra; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp index da1ff557ad..a08cf0907f 100644 --- a/src/MANYBODY/pair_gw_zbl.cpp +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_local_density.cpp b/src/MANYBODY/pair_local_density.cpp index 444f56f291..da405e9118 100644 --- a/src/MANYBODY/pair_local_density.cpp +++ b/src/MANYBODY/pair_local_density.cpp @@ -34,8 +34,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - static const char cite_pair_local_density[] = "pair_style local/density command: doi:10.1063/1.4958629, doi:10.1021/acs.jpcb.7b12446\n\n" "@Article{Sanyal16,\n" diff --git a/src/MANYBODY/pair_meam_spline.cpp b/src/MANYBODY/pair_meam_spline.cpp index b952330c04..e888e2274c 100644 --- a/src/MANYBODY/pair_meam_spline.cpp +++ b/src/MANYBODY/pair_meam_spline.cpp @@ -440,8 +440,6 @@ void PairMEAMSpline::coeff(int narg, char **arg) } } -static constexpr int MAXLINE = 1024; - void PairMEAMSpline::read_file(const char* filename) { int nmultichoose2; // = (n+1)*n/2; diff --git a/src/MANYBODY/pair_meam_sw_spline.cpp b/src/MANYBODY/pair_meam_sw_spline.cpp index e02625c598..5b5713dc4c 100644 --- a/src/MANYBODY/pair_meam_sw_spline.cpp +++ b/src/MANYBODY/pair_meam_sw_spline.cpp @@ -384,8 +384,6 @@ void PairMEAMSWSpline::coeff(int narg, char **arg) set coeffs for one or more type pairs ------------------------------------------------------------------------- */ -static constexpr int MAXLINE = 1024; - void PairMEAMSWSpline::read_file(const char* filename) { if (comm->me == 0) { diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index cc0b225a78..535fb766bc 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -38,10 +38,6 @@ using namespace LAMMPS_NS; using namespace MathExtra; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - - /* ---------------------------------------------------------------------- */ PairPolymorphic::PairParameters::PairParameters() diff --git a/src/MANYBODY/pair_tersoff_table.cpp b/src/MANYBODY/pair_tersoff_table.cpp index 34c3573d0c..90f29bb201 100644 --- a/src/MANYBODY/pair_tersoff_table.cpp +++ b/src/MANYBODY/pair_tersoff_table.cpp @@ -39,9 +39,7 @@ using namespace LAMMPS_NS; using MathConst::MY_PI; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; - static constexpr double GRIDSTART = 0.1; #define GRIDDENSITY_FCUTOFF 5000 #define GRIDDENSITY_EXP 12000 diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index c0a5501a22..2e48630f59 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -50,7 +50,6 @@ using namespace LAMMPS_NS; using namespace FixConst; using MathConst::MY_2PI; -static constexpr double MAXENERGYTEST = 1.0e50; enum { EXCHATOM, EXCHMOL }; // exchmode /* ---------------------------------------------------------------------- */ diff --git a/src/MESONT/pair_mesocnt.cpp b/src/MESONT/pair_mesocnt.cpp index eae638bde8..c8e160ab4b 100644 --- a/src/MESONT/pair_mesocnt.cpp +++ b/src/MESONT/pair_mesocnt.cpp @@ -43,7 +43,6 @@ using namespace MathExtra; using MathConst::MY_2PI; using MathConst::MY_PI; -static constexpr int MAXLINE = 1024; #define SELF_CUTOFF 3 static constexpr double SMALL = 1.0e-6; static constexpr double SWITCH = 1.0e-4; diff --git a/src/MISC/pair_agni.cpp b/src/MISC/pair_agni.cpp index 92b358316f..cbc6cf6c92 100644 --- a/src/MISC/pair_agni.cpp +++ b/src/MISC/pair_agni.cpp @@ -47,9 +47,6 @@ static const char cite_pair_agni[] = " year = {2019},\n" "}\n\n"; -static constexpr int MAXLINE = 10240; -static constexpr int MAXWORD = 40; - /* ---------------------------------------------------------------------- */ PairAGNI::PairAGNI(LAMMPS *lmp) : Pair(lmp) diff --git a/src/ML-IAP/mliap_descriptor_snap.cpp b/src/ML-IAP/mliap_descriptor_snap.cpp index 892dc8a004..e8f6eec977 100644 --- a/src/ML-IAP/mliap_descriptor_snap.cpp +++ b/src/ML-IAP/mliap_descriptor_snap.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_descriptor_so3.cpp b/src/ML-IAP/mliap_descriptor_so3.cpp index 2308961913..676c53a4a8 100644 --- a/src/ML-IAP/mliap_descriptor_so3.cpp +++ b/src/ML-IAP/mliap_descriptor_so3.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_model.cpp b/src/ML-IAP/mliap_model.cpp index c6df037c04..232bf18bbd 100644 --- a/src/ML-IAP/mliap_model.cpp +++ b/src/ML-IAP/mliap_model.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-SNAP/pair_snap.cpp b/src/ML-SNAP/pair_snap.cpp index f0fcd5c4e7..ff6409095d 100644 --- a/src/ML-SNAP/pair_snap.cpp +++ b/src/ML-SNAP/pair_snap.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/MOFFF/improper_inversion_harmonic.cpp b/src/MOFFF/improper_inversion_harmonic.cpp index cc9bd8ad94..c0de968626 100644 --- a/src/MOFFF/improper_inversion_harmonic.cpp +++ b/src/MOFFF/improper_inversion_harmonic.cpp @@ -31,13 +31,9 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperInversionHarmonic::ImproperInversionHarmonic(LAMMPS *lmp) : Improper(lmp) diff --git a/src/OPENMP/angle_cosine_omp.cpp b/src/OPENMP/angle_cosine_omp.cpp index e4e32bd769..62320b7c6c 100644 --- a/src/OPENMP/angle_cosine_omp.cpp +++ b/src/OPENMP/angle_cosine_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosineOMP::AngleCosineOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_cosine_periodic_omp.cpp b/src/OPENMP/angle_cosine_periodic_omp.cpp index 4abe7bd692..3d546af278 100644 --- a/src/OPENMP/angle_cosine_periodic_omp.cpp +++ b/src/OPENMP/angle_cosine_periodic_omp.cpp @@ -30,8 +30,6 @@ using namespace LAMMPS_NS; using namespace MathSpecial; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosinePeriodicOMP::AngleCosinePeriodicOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_cosine_squared_omp.cpp b/src/OPENMP/angle_cosine_squared_omp.cpp index f14af0b3e4..9b849c62a3 100644 --- a/src/OPENMP/angle_cosine_squared_omp.cpp +++ b/src/OPENMP/angle_cosine_squared_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosineSquaredOMP::AngleCosineSquaredOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_dipole_omp.cpp b/src/OPENMP/angle_dipole_omp.cpp index 338c63e42e..3c771df69f 100644 --- a/src/OPENMP/angle_dipole_omp.cpp +++ b/src/OPENMP/angle_dipole_omp.cpp @@ -25,12 +25,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleDipoleOMP::AngleDipoleOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_fourier_omp.cpp b/src/OPENMP/angle_fourier_omp.cpp index 27d5f62595..a11d3b6327 100644 --- a/src/OPENMP/angle_fourier_omp.cpp +++ b/src/OPENMP/angle_fourier_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleFourierOMP::AngleFourierOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/dihedral_charmm_omp.cpp b/src/OPENMP/dihedral_charmm_omp.cpp index 42fbea419f..d0c38c8774 100644 --- a/src/OPENMP/dihedral_charmm_omp.cpp +++ b/src/OPENMP/dihedral_charmm_omp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp index 4032f9a13d..0cffc3e245 100644 --- a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_harmonic_omp.cpp b/src/OPENMP/dihedral_harmonic_omp.cpp index f8df7dd41e..fe3fb988ce 100644 --- a/src/OPENMP/dihedral_harmonic_omp.cpp +++ b/src/OPENMP/dihedral_harmonic_omp.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_table_omp.cpp b/src/OPENMP/dihedral_table_omp.cpp index db90e32e6b..df1ca292c9 100644 --- a/src/OPENMP/dihedral_table_omp.cpp +++ b/src/OPENMP/dihedral_table_omp.cpp @@ -34,9 +34,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathExtra; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - // -------------------------------------------- // ------- Calculate the dihedral angle ------- // -------------------------------------------- diff --git a/src/OPENMP/ewald_omp.cpp b/src/OPENMP/ewald_omp.cpp index fc32efd3c0..8674017592 100644 --- a/src/OPENMP/ewald_omp.cpp +++ b/src/OPENMP/ewald_omp.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.00001; - /* ---------------------------------------------------------------------- */ EwaldOMP::EwaldOMP(LAMMPS *lmp) : Ewald(lmp), ThrOMP(lmp, THR_KSPACE) diff --git a/src/OPENMP/improper_class2_omp.cpp b/src/OPENMP/improper_class2_omp.cpp index 38a2f12f5e..8233f0bee6 100644 --- a/src/OPENMP/improper_class2_omp.cpp +++ b/src/OPENMP/improper_class2_omp.cpp @@ -29,9 +29,6 @@ #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperClass2OMP::ImproperClass2OMP(class LAMMPS *lmp) diff --git a/src/OPENMP/improper_ring_omp.cpp b/src/OPENMP/improper_ring_omp.cpp index 366d03e02d..a1b4e31cee 100644 --- a/src/OPENMP/improper_ring_omp.cpp +++ b/src/OPENMP/improper_ring_omp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; using namespace MathSpecial; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_brownian_omp.cpp b/src/OPENMP/pair_brownian_omp.cpp index 1506f1f35a..ecb80456d1 100644 --- a/src/OPENMP/pair_brownian_omp.cpp +++ b/src/OPENMP/pair_brownian_omp.cpp @@ -36,8 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairBrownianOMP::PairBrownianOMP(LAMMPS *lmp) : diff --git a/src/OPENMP/pair_brownian_poly_omp.cpp b/src/OPENMP/pair_brownian_poly_omp.cpp index ddd1af2c01..f9db86043a 100644 --- a/src/OPENMP/pair_brownian_poly_omp.cpp +++ b/src/OPENMP/pair_brownian_poly_omp.cpp @@ -36,8 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairBrownianPolyOMP::PairBrownianPolyOMP(LAMMPS *lmp) : diff --git a/src/OPENMP/pppm_cg_omp.cpp b/src/OPENMP/pppm_cg_omp.cpp index 0eff5c9363..6630510003 100644 --- a/src/OPENMP/pppm_cg_omp.cpp +++ b/src/OPENMP/pppm_cg_omp.cpp @@ -39,8 +39,6 @@ using namespace MathConst; using namespace MathSpecial; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - static constexpr double EPS_HOC = 1.0e-7; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pppm_disp_omp.cpp b/src/OPENMP/pppm_disp_omp.cpp index b610b1711e..45959dadba 100644 --- a/src/OPENMP/pppm_disp_omp.cpp +++ b/src/OPENMP/pppm_disp_omp.cpp @@ -39,7 +39,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static constexpr int OFFSET = 16384; diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 6ae21f652c..a2720a3f64 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -42,7 +42,7 @@ using namespace LAMMPS_NS; using namespace FixConst; #define MAXBODY 2 // currently 2 since only linear chains allowed -static constexpr int DELTA = 128; + static constexpr double TOLERANCE = 1.0e-6; static constexpr double EPSILON = 1.0e-7; diff --git a/src/SMTBQ/pair_smtbq.cpp b/src/SMTBQ/pair_smtbq.cpp index d262491912..4e4a6109fa 100644 --- a/src/SMTBQ/pair_smtbq.cpp +++ b/src/SMTBQ/pair_smtbq.cpp @@ -70,9 +70,6 @@ using namespace MathConst; using namespace MathExtra; using namespace MathSpecial; -static constexpr int MAXLINE = 2048; -static constexpr int MAXTOKENS = 2048; -static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; diff --git a/src/UEF/dump_cfg_uef.cpp b/src/UEF/dump_cfg_uef.cpp index 34ef655af9..776c4675f3 100644 --- a/src/UEF/dump_cfg_uef.cpp +++ b/src/UEF/dump_cfg_uef.cpp @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; static constexpr double UNWRAPEXPAND = 10.0; -static constexpr int ONEFIELD = 32; -static constexpr int DELTA = 1048576; /* ---------------------------------------------------------------------- * base method is mostly fine, just need to find the FixNHUef diff --git a/src/YAFF/improper_distharm.cpp b/src/YAFF/improper_distharm.cpp index 53658a1377..257cbce1b3 100644 --- a/src/YAFF/improper_distharm.cpp +++ b/src/YAFF/improper_distharm.cpp @@ -28,12 +28,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) diff --git a/src/YAFF/improper_sqdistharm.cpp b/src/YAFF/improper_sqdistharm.cpp index e85f8e4c25..f4beab3587 100644 --- a/src/YAFF/improper_sqdistharm.cpp +++ b/src/YAFF/improper_sqdistharm.cpp @@ -28,12 +28,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp) diff --git a/src/atom.cpp b/src/atom.cpp index f7f61d6ced..085ca88b4e 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -50,7 +50,6 @@ using namespace MathConst; static constexpr int DELTA = 1; static constexpr double EPSILON = 1.0e-6; -static constexpr int MAXLINE = 256; /* ---------------------------------------------------------------------- one instance per AtomVec style in style_atom.h diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 143539d435..9ed591f73f 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1.0e-12; enum{DIST,DX,DY,DZ,VELVIB,OMEGA,ENGTRANS,ENGVIB,ENGROT,ENGPOT,FORCE,FX,FY,FZ,VARIABLE,BN}; @@ -375,13 +374,6 @@ int ComputeBondLocal::compute_bonds(int flag) engrot = 0.5 * inertia * omegasq; - // sanity check: engtotal = engtrans + engvib + engrot - - //engtot = 0.5 * (mass1*MathExtra::lensq3(v[atom1]) + - // mass2*MathExtra::lensq3(v[atom2])); - //if (fabs(engtot-engtrans-engvib-engrot) > EPSILON) - // error->one(FLERR,"Sanity check on 3 energy components failed"); - // scale energies by units mvv2e = force->mvv2e; diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index 6543c06d20..894d0e33e4 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -31,9 +31,8 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int DELTA = 10000; -static constexpr double SMALL = 0.001; -enum{PHI,VARIABLE}; +enum { PHI, VARIABLE }; /* ---------------------------------------------------------------------- */ diff --git a/src/compute_property_grid.cpp b/src/compute_property_grid.cpp index 6e316de3f8..7624a3b4a9 100644 --- a/src/compute_property_grid.cpp +++ b/src/compute_property_grid.cpp @@ -28,8 +28,6 @@ using namespace LAMMPS_NS; enum { LOW, CTR }; enum { UNSCALED, SCALED }; -static constexpr int DELTA = 10000; - /* ---------------------------------------------------------------------- */ ComputePropertyGrid::ComputePropertyGrid(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/thermo.cpp b/src/thermo.cpp index 3d8b419991..efc5f984fc 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -93,7 +93,6 @@ static constexpr char id_press[] = "thermo_press"; static constexpr char id_pe[] = "thermo_pe"; static char fmtbuf[512]; -static constexpr int DELTA = 8; /* ---------------------------------------------------------------------- */ diff --git a/src/velocity.cpp b/src/velocity.cpp index fd4fd71f68..1f0a757d7c 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -33,13 +33,12 @@ using namespace LAMMPS_NS; -enum{CREATE,SET,SCALE,RAMP,ZERO}; -enum{ALL,LOCAL,GEOM}; -enum{UNIFORM,GAUSSIAN}; -enum{NONE,CONSTANT,EQUAL,ATOM}; +enum { CREATE, SET, SCALE, RAMP, ZERO }; +enum { ALL, LOCAL, GEOM }; +enum { UNIFORM, GAUSSIAN }; +enum { NONE, CONSTANT, EQUAL, ATOM }; static constexpr int WARMUP = 100; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ From d1f1cf4012154dc6dd336abef157a4419b9b0ffb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 23:22:07 -0500 Subject: [PATCH 70/89] silence compiler warnings --- src/INTEL/pair_sw_intel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/INTEL/pair_sw_intel.cpp b/src/INTEL/pair_sw_intel.cpp index dc73c26f4f..35a091aef2 100644 --- a/src/INTEL/pair_sw_intel.cpp +++ b/src/INTEL/pair_sw_intel.cpp @@ -475,7 +475,6 @@ void PairSWIntel::eval(const int offload, const int vflag, const flt_t r2 = (flt_t)1.0 / std::sqrt(rinvsq2); const flt_t rainv2 = (flt_t)1.0 / (r2 - cut); const flt_t gsrainv2 = sigma_gamma * rainv2; - const flt_t gsrainvsq2 = gsrainv2 * rainv2 / r2; const flt_t expgsrainv2 = std::exp(gsrainv2); const flt_t rinv12 = (flt_t)1.0 / (r1 * r2); @@ -491,7 +490,6 @@ void PairSWIntel::eval(const int offload, const int vflag, const flt_t facexp = expgsrainv1*expgsrainv2*kfactor; const flt_t facrad = lambda_epsilon * facexp * delcssq; const flt_t frad1 = facrad*gsrainvsq1; - const flt_t frad2 = facrad*gsrainvsq2; const flt_t facang = lambda_epsilon2 * facexp * delcs; const flt_t facang12 = rinv12*facang; const flt_t csfacang = cs*facang; @@ -1270,13 +1268,13 @@ void PairSWIntel::ForceConst::set_ntypes(const int ntypes, if (memory != nullptr) _memory = memory; if (ntypes != _ntypes) { if (_ntypes > 0) { + + #ifdef _LMP_INTEL_OFFLOAD fc_packed0 *op2 = p2[0]; fc_packed1 *op2f = p2f[0]; fc_packed1p2 *op2f2 = p2f2[0]; fc_packed2 *op2e = p2e[0]; fc_packed3 *op3 = p3[0][0]; - - #ifdef _LMP_INTEL_OFFLOAD if (op2 != nullptr && op2f != nullptr && op2f2 != nullptr && op2e != nullptr && op3 != nullptr && _cop >= 0) { #pragma offload_transfer target(mic:_cop) \ From 187a35d7b21086f872ae5107d743a16e520488de Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Feb 2024 23:57:41 -0500 Subject: [PATCH 71/89] convert a few more defines to static constexpr --- src/CG-SPICA/pair_lj_spica_coul_long.cpp | 10 ++-------- src/CORESHELL/pair_born_coul_long_cs.cpp | 24 +++++++++++++----------- src/CORESHELL/pair_buck_coul_long_cs.cpp | 20 ++++++++++---------- src/EXTRA-PAIR/pair_coul_slater_long.cpp | 10 ++-------- src/EXTRA-PAIR/pair_lj_cut_coul_dsf.cpp | 13 ++++++------- src/comm_tiled.cpp | 3 +-- src/fix_box_relax.cpp | 6 ++---- src/fix_box_relax.h | 11 ++++++----- src/math_special.cpp | 2 +- src/min_cg.cpp | 2 +- src/min_fire.cpp | 2 +- src/min_linesearch.cpp | 11 +++++------ src/min_quickmin.cpp | 3 +-- src/min_sd.cpp | 2 +- src/nbin_multi.cpp | 2 +- src/nbin_standard.cpp | 2 +- src/pair_coul_dsf.cpp | 13 ++++++------- 17 files changed, 60 insertions(+), 76 deletions(-) diff --git a/src/CG-SPICA/pair_lj_spica_coul_long.cpp b/src/CG-SPICA/pair_lj_spica_coul_long.cpp index 8b655ea911..9e0d4dc276 100644 --- a/src/CG-SPICA/pair_lj_spica_coul_long.cpp +++ b/src/CG-SPICA/pair_lj_spica_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -35,14 +36,7 @@ using namespace LAMMPS_NS; using namespace LJSPICAParms; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/CORESHELL/pair_born_coul_long_cs.cpp b/src/CORESHELL/pair_born_coul_long_cs.cpp index c29bd5c31d..3e13577879 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.cpp +++ b/src/CORESHELL/pair_born_coul_long_cs.cpp @@ -17,25 +17,27 @@ ------------------------------------------------------------------------- */ #include "pair_born_coul_long_cs.h" -#include + #include "atom.h" #include "force.h" #include "neigh_list.h" +#include + using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/CORESHELL/pair_buck_coul_long_cs.cpp b/src/CORESHELL/pair_buck_coul_long_cs.cpp index 96203deae1..f885b412d8 100644 --- a/src/CORESHELL/pair_buck_coul_long_cs.cpp +++ b/src/CORESHELL/pair_buck_coul_long_cs.cpp @@ -24,18 +24,18 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-PAIR/pair_coul_slater_long.cpp b/src/EXTRA-PAIR/pair_coul_slater_long.cpp index 3f5803af8e..65906f73b5 100644 --- a/src/EXTRA-PAIR/pair_coul_slater_long.cpp +++ b/src/EXTRA-PAIR/pair_coul_slater_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -31,14 +32,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-PAIR/pair_lj_cut_coul_dsf.cpp b/src/EXTRA-PAIR/pair_lj_cut_coul_dsf.cpp index 49e1468af1..9356062914 100644 --- a/src/EXTRA-PAIR/pair_lj_cut_coul_dsf.cpp +++ b/src/EXTRA-PAIR/pair_lj_cut_coul_dsf.cpp @@ -34,13 +34,12 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index 6c44af686f..65cbfad0b5 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -39,8 +39,7 @@ using namespace LAMMPS_NS; static constexpr double BUFFACTOR = 1.5; static constexpr int BUFMIN = 1024; static constexpr double EPSILON = 1.0e-6; - -#define DELTA_PROCS 16 +static constexpr int DELTA_PROCS = 16; /* ---------------------------------------------------------------------- */ diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index 1f715a1dd4..cf8df7cd02 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -35,10 +35,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NONE,XYZ,XY,YZ,XZ}; -enum{ISO,ANISO,TRICLINIC}; - -#define MAX_LIFO_DEPTH 2 // 3 box0 arrays in *.h dimensioned to this +enum { NONE, XYZ, XY, YZ, XZ }; +enum { ISO, ANISO, TRICLINIC }; /* ---------------------------------------------------------------------- */ diff --git a/src/fix_box_relax.h b/src/fix_box_relax.h index 0870ed522d..bf9379ceac 100644 --- a/src/fix_box_relax.h +++ b/src/fix_box_relax.h @@ -52,11 +52,12 @@ class FixBoxRelax : public Fix { double vmax, pv2e, pflagsum; int kspace_flag; - int current_lifo; // LIFO stack pointer - double boxlo0[2][3]; // box bounds at start of line search - double boxhi0[2][3]; - double boxtilt0[2][3]; // xy,xz,yz tilts at start of line search - double ds[6]; // increment in scale matrix + static constexpr int MAX_LIFO_DEPTH = 2; + int current_lifo; // LIFO stack pointer + double boxlo0[MAX_LIFO_DEPTH][3]; // low box bounds at start of line search + double boxhi0[MAX_LIFO_DEPTH][3]; // high box bounds at start of line search + double boxtilt0[MAX_LIFO_DEPTH][3]; // xy,xz,yz tilts at start of line search + double ds[6]; // increment in scale matrix int scaleyz; // 1 if yz scaled with lz int scalexz; // 1 if xz scaled with lz diff --git a/src/math_special.cpp b/src/math_special.cpp index fd47aec9e9..2bc0cc3deb 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -702,7 +702,7 @@ static const double fm_exp2_p[] = { }; /* double precision constants */ -#define FM_DOUBLE_LOG2OFE 1.4426950408889634074 +static constexpr double FM_DOUBLE_LOG2OFE = 1.4426950408889634074; double MathSpecial::exp2_x86(double x) { diff --git a/src/min_cg.cpp b/src/min_cg.cpp index 782ab04c44..aa4d036b6c 100644 --- a/src/min_cg.cpp +++ b/src/min_cg.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 +static constexpr double EPS_ENERGY = 1.0e-8; /* ---------------------------------------------------------------------- */ diff --git a/src/min_fire.cpp b/src/min_fire.cpp index 1f24ea5a15..b227c1cc3a 100644 --- a/src/min_fire.cpp +++ b/src/min_fire.cpp @@ -38,7 +38,7 @@ using namespace LAMMPS_NS; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 +static constexpr double EPS_ENERGY = 1.0e-8; /* ---------------------------------------------------------------------- */ diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index 97dcca9d8a..d33b7579b9 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -42,13 +42,12 @@ using namespace LAMMPS_NS; // EMACH = machine accuracy limit of energy changes (1.0e-8) // EPS_QUAD = tolerance for quadratic projection -#define ALPHA_MAX 1.0 -#define ALPHA_REDUCE 0.5 -#define BACKTRACK_SLOPE 0.4 -#define QUADRATIC_TOL 0.1 -//#define EMACH 1.0e-8 +static constexpr double ALPHA_MAX = 1.0; +static constexpr double ALPHA_REDUCE = 0.5; +static constexpr double BACKTRACK_SLOPE = 0.4; +static constexpr double QUADRATIC_TOL = 0.1; static constexpr double EMACH = 1.0e-8; -#define EPS_QUAD 1.0e-28 +static constexpr double EPS_QUAD = 1.0e-28; /* ---------------------------------------------------------------------- */ diff --git a/src/min_quickmin.cpp b/src/min_quickmin.cpp index c3730f2cd7..6e314cc67b 100644 --- a/src/min_quickmin.cpp +++ b/src/min_quickmin.cpp @@ -28,8 +28,7 @@ using namespace LAMMPS_NS; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 - +static constexpr double EPS_ENERGY = 1.0e-8; static constexpr int DELAYSTEP = 5; /* ---------------------------------------------------------------------- */ diff --git a/src/min_sd.cpp b/src/min_sd.cpp index b190c78575..122b92ae8e 100644 --- a/src/min_sd.cpp +++ b/src/min_sd.cpp @@ -24,7 +24,7 @@ using namespace LAMMPS_NS; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 +static constexpr double EPS_ENERGY = 1.0e-8; /* ---------------------------------------------------------------------- */ diff --git a/src/nbin_multi.cpp b/src/nbin_multi.cpp index 15c089bee7..86cefbfa23 100644 --- a/src/nbin_multi.cpp +++ b/src/nbin_multi.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; static constexpr double SMALL = 1.0e-6; -#define CUT2BIN_RATIO 100 +static constexpr double CUT2BIN_RATIO = 100.0; /* ---------------------------------------------------------------------- */ diff --git a/src/nbin_standard.cpp b/src/nbin_standard.cpp index 08ff537d71..1c611080cf 100644 --- a/src/nbin_standard.cpp +++ b/src/nbin_standard.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; static constexpr double SMALL = 1.0e-6; -#define CUT2BIN_RATIO 100 +static constexpr double CUT2BIN_RATIO = 100.0; /* ---------------------------------------------------------------------- */ diff --git a/src/pair_coul_dsf.cpp b/src/pair_coul_dsf.cpp index 8e42cdadee..b384946e86 100644 --- a/src/pair_coul_dsf.cpp +++ b/src/pair_coul_dsf.cpp @@ -33,13 +33,12 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ From 2760480630a3cea0a642183cdbb339a5e280c863 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 00:28:58 -0500 Subject: [PATCH 72/89] more constant cleanups --- src/CORESHELL/pair_coul_long_cs.cpp | 20 +++++++++---------- src/CORESHELL/pair_lj_class2_coul_long_cs.cpp | 20 +++++++++---------- src/CORESHELL/pair_lj_cut_coul_long_cs.cpp | 20 +++++++++---------- src/DIPOLE/pair_lj_cut_dipole_long.cpp | 10 ++-------- src/DIPOLE/pair_lj_long_dipole_long.cpp | 10 ++-------- src/DPD-REACT/fix_shardlow.cpp | 3 +-- src/DPD-REACT/pair_multi_lucy_rx.cpp | 6 ------ src/DRUDE/pair_lj_cut_thole_long.cpp | 20 +++++++++---------- src/ELECTRODE/fix_electrode_thermo.cpp | 2 +- src/EXTRA-FIX/fix_smd.cpp | 2 +- src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp | 10 ++-------- src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp | 10 ++-------- src/FEP/pair_coul_long_soft.cpp | 10 ++-------- src/FEP/pair_lj_charmm_coul_long_soft.cpp | 10 ++-------- src/FEP/pair_lj_class2_coul_long_soft.cpp | 10 ++-------- src/FEP/pair_lj_cut_coul_long_soft.cpp | 10 ++-------- src/FEP/pair_lj_cut_tip4p_long_soft.cpp | 18 ++++++----------- src/FEP/pair_tip4p_long_soft.cpp | 18 ++++++----------- src/GPU/pair_born_coul_long_cs_gpu.cpp | 20 +++++++++---------- src/GPU/pair_born_coul_long_gpu.cpp | 10 ++-------- src/GPU/pair_buck_coul_long_gpu.cpp | 10 ++-------- src/GPU/pair_coul_dsf_gpu.cpp | 16 +++++++-------- src/GPU/pair_coul_long_cs_gpu.cpp | 20 +++++++++---------- src/GPU/pair_coul_long_gpu.cpp | 10 ++-------- src/GPU/pair_coul_slater_long_gpu.cpp | 10 ++-------- src/GPU/pair_eam_gpu.cpp | 2 -- src/GPU/pair_edpd_gpu.cpp | 2 -- src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 10 ++-------- src/GPU/pair_lj_class2_coul_long_gpu.cpp | 10 ++-------- src/GPU/pair_mdpd_gpu.cpp | 2 -- src/GPU/pair_sw_gpu.cpp | 3 --- src/GPU/pair_tersoff_gpu.cpp | 3 --- 32 files changed, 111 insertions(+), 226 deletions(-) diff --git a/src/CORESHELL/pair_coul_long_cs.cpp b/src/CORESHELL/pair_coul_long_cs.cpp index 6af9a30639..156fef7e03 100644 --- a/src/CORESHELL/pair_coul_long_cs.cpp +++ b/src/CORESHELL/pair_coul_long_cs.cpp @@ -24,18 +24,18 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/CORESHELL/pair_lj_class2_coul_long_cs.cpp b/src/CORESHELL/pair_lj_class2_coul_long_cs.cpp index 577bc2e6df..48141b40a1 100644 --- a/src/CORESHELL/pair_lj_class2_coul_long_cs.cpp +++ b/src/CORESHELL/pair_lj_class2_coul_long_cs.cpp @@ -20,18 +20,18 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp index d5fd66e382..ddb6d57837 100644 --- a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp +++ b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp @@ -24,18 +24,18 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index 0522a7a34d..5d71842d54 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -30,14 +31,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index 1ed4a8c8d7..6f46d9d024 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -36,14 +37,7 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; // ---------------------------------------------------------------------- diff --git a/src/DPD-REACT/fix_shardlow.cpp b/src/DPD-REACT/fix_shardlow.cpp index 747d2725b8..fa0ab384b0 100644 --- a/src/DPD-REACT/fix_shardlow.cpp +++ b/src/DPD-REACT/fix_shardlow.cpp @@ -59,8 +59,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace random_external_state; -static constexpr double EPSILON = 1.0e-10; -#define EPSILON_SQUARED ((EPSILON) * (EPSILON)) +static constexpr double EPSILON_SQUARED = 1.0e-20; static const char cite_fix_shardlow[] = "fix shardlow command: doi:10.1016/j.cpc.2014.03.029, doi:10.1063/1.3660209\n\n" diff --git a/src/DPD-REACT/pair_multi_lucy_rx.cpp b/src/DPD-REACT/pair_multi_lucy_rx.cpp index 5ff03de6e7..c248d92694 100644 --- a/src/DPD-REACT/pair_multi_lucy_rx.cpp +++ b/src/DPD-REACT/pair_multi_lucy_rx.cpp @@ -45,12 +45,6 @@ enum{ NONE, RLINEAR, RSQ }; static constexpr int MAXLINE = 1024; -#ifdef DBL_EPSILON -static constexpr double MY_EPSILON = 10.0*DBL_EPSILON; -#else -static constexpr double MY_EPSILON = 10.0*2.220446049250313e-16; -#endif - #define oneFluidParameter (-1) #define isOneFluid(_site) ( (_site) == oneFluidParameter ) diff --git a/src/DRUDE/pair_lj_cut_thole_long.cpp b/src/DRUDE/pair_lj_cut_thole_long.cpp index a11fc691b1..b7f1ce9be9 100644 --- a/src/DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/DRUDE/pair_lj_cut_thole_long.cpp @@ -37,18 +37,18 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/ELECTRODE/fix_electrode_thermo.cpp b/src/ELECTRODE/fix_electrode_thermo.cpp index f95aeac615..343bf14069 100644 --- a/src/ELECTRODE/fix_electrode_thermo.cpp +++ b/src/ELECTRODE/fix_electrode_thermo.cpp @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; -#define NUM_GROUPS 2 +static constexpr int NUM_GROUPS = 2; static constexpr double SMALL = 0.00001; /* ----------------------------------------------------------------------- */ diff --git a/src/EXTRA-FIX/fix_smd.cpp b/src/EXTRA-FIX/fix_smd.cpp index a9dbfcc2d1..bc5dca0b58 100644 --- a/src/EXTRA-FIX/fix_smd.cpp +++ b/src/EXTRA-FIX/fix_smd.cpp @@ -430,7 +430,7 @@ void FixSMD::smd_couple() void FixSMD::write_restart(FILE *fp) { -#define RESTART_ITEMS 5 + static constexpr int RESTART_ITEMS = 5; double buf[RESTART_ITEMS], fsign; if (comm->me == 0) { diff --git a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp index 119ad6edbf..428b105621 100644 --- a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -35,14 +36,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp b/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp index d68e12c37f..2d4d048e26 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -33,14 +34,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_coul_long_soft.cpp b/src/FEP/pair_coul_long_soft.cpp index d243e7662f..bc3774fd1c 100644 --- a/src/FEP/pair_coul_long_soft.cpp +++ b/src/FEP/pair_coul_long_soft.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -32,14 +33,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_lj_charmm_coul_long_soft.cpp b/src/FEP/pair_lj_charmm_coul_long_soft.cpp index e1c3894790..1fa2ff6ea6 100644 --- a/src/FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/FEP/pair_lj_charmm_coul_long_soft.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -34,14 +35,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_lj_class2_coul_long_soft.cpp b/src/FEP/pair_lj_class2_coul_long_soft.cpp index e7f928f540..43801ef5c6 100644 --- a/src/FEP/pair_lj_class2_coul_long_soft.cpp +++ b/src/FEP/pair_lj_class2_coul_long_soft.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -29,14 +30,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_lj_cut_coul_long_soft.cpp b/src/FEP/pair_lj_cut_coul_long_soft.cpp index 20fd052035..a5f9f03d12 100644 --- a/src/FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/FEP/pair_lj_cut_coul_long_soft.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -36,14 +37,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/FEP/pair_lj_cut_tip4p_long_soft.cpp index bced5c17cc..d0a0d846a9 100644 --- a/src/FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -25,24 +25,18 @@ #include "bond.h" #include "comm.h" #include "domain.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "ewald_const.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" #include #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_tip4p_long_soft.cpp b/src/FEP/pair_tip4p_long_soft.cpp index 4c357b32e0..09351f9e05 100644 --- a/src/FEP/pair_tip4p_long_soft.cpp +++ b/src/FEP/pair_tip4p_long_soft.cpp @@ -25,24 +25,18 @@ #include "bond.h" #include "comm.h" #include "domain.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "ewald_const.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" #include #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index d37f0c53e2..1ab61c0582 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -33,18 +33,18 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index ca12f03070..19b545003e 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -30,16 +31,9 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; using namespace MathConst; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index adae92d1ac..bb29096007 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index bf207caf60..a3ac4542e8 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -22,22 +22,22 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "math_const.h" #include "neigh_list.h" #include "neighbor.h" #include "suffix.h" #include -#define MY_PIS 1.77245385090551602729 -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; using namespace LAMMPS_NS; +using MathConst::MY_PIS; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index bbe50e4351..5eba34c85f 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -31,18 +31,18 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 7ecb052f69..eb176673dd 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_coul_slater_long_gpu.cpp b/src/GPU/pair_coul_slater_long_gpu.cpp index 4ace8bd761..c5489fa9fb 100644 --- a/src/GPU/pair_coul_slater_long_gpu.cpp +++ b/src/GPU/pair_coul_slater_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 563b3f8284..40f143ebde 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -29,8 +29,6 @@ #include -static constexpr int MAXLINE = 1024; - using namespace LAMMPS_NS; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_edpd_gpu.cpp b/src/GPU/pair_edpd_gpu.cpp index b6ea6d9098..4b865b6a7e 100644 --- a/src/GPU/pair_edpd_gpu.cpp +++ b/src/GPU/pair_edpd_gpu.cpp @@ -58,8 +58,6 @@ void edpd_gpu_get_extra_data(double *host_T, double *host_cv); void edpd_gpu_update_flux(void **flux_ptr); double edpd_gpu_bytes(); -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairEDPDGPU::PairEDPDGPU(LAMMPS *lmp) : PairEDPD(lmp), gpu_mode(GPU_FORCE) diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index 87d4896bde..a84ec67c6b 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 90a4682e8f..0f87099e3b 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_mdpd_gpu.cpp b/src/GPU/pair_mdpd_gpu.cpp index 78861504ee..8647dbd0fd 100644 --- a/src/GPU/pair_mdpd_gpu.cpp +++ b/src/GPU/pair_mdpd_gpu.cpp @@ -55,8 +55,6 @@ void mdpd_gpu_compute(const int ago, const int inum_full, const int nall, double void mdpd_gpu_get_extra_data(double *host_rho); double mdpd_gpu_bytes(); -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairMDPDGPU::PairMDPDGPU(LAMMPS *lmp) : PairMDPD(lmp), gpu_mode(GPU_FORCE) diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index ac604f3a74..3e916a6571 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -49,9 +49,6 @@ void sw_gpu_compute(const int ago, const int nloc, const int nall, const int ln, const double cpu_time, bool &success); double sw_gpu_bytes(); -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ PairSWGPU::PairSWGPU(LAMMPS *lmp) : PairSW(lmp), gpu_mode(GPU_FORCE) diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index c3c9e6cfab..9ba94548c1 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -54,9 +54,6 @@ void tersoff_gpu_compute(const int ago, const int nlocal, const int nall, const int &host_start, const double cpu_time, bool &success); double tersoff_gpu_bytes(); -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ PairTersoffGPU::PairTersoffGPU(LAMMPS *lmp) : PairTersoff(lmp), gpu_mode(GPU_FORCE) From eb9412f5070b66878fde2c2b42ff333fc9e6fef6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 00:57:46 -0500 Subject: [PATCH 73/89] even more constant cleanup --- src/GPU/pair_lj_cut_coul_dsf_gpu.cpp | 18 +++++++-------- src/GPU/pair_lj_cut_coul_long_gpu.cpp | 10 ++------- src/GPU/pair_lj_cut_coul_long_soft_gpu.cpp | 10 ++------- src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 26 +++------------------- src/GPU/pair_lj_cut_tip4p_long_gpu.cpp | 10 ++------- src/GPU/pair_lj_expand_coul_long_gpu.cpp | 10 ++------- src/GPU/pair_lj_spica_coul_long_gpu.cpp | 10 ++------- src/KOKKOS/fix_shardlow_kokkos.cpp | 2 +- src/KOKKOS/min_cg_kokkos.cpp | 2 +- src/KOKKOS/min_linesearch_kokkos.cpp | 11 +++++---- src/KOKKOS/pair_buck_coul_long_kokkos.cpp | 11 ++------- src/KOKKOS/pair_coul_dsf_kokkos.cpp | 13 +++++------ src/KOKKOS/pair_coul_long_kokkos.cpp | 11 ++------- src/SPIN/min_spin.cpp | 3 +-- src/SPIN/min_spin_cg.cpp | 3 +-- src/SPIN/min_spin_lbfgs.cpp | 3 +-- 16 files changed, 42 insertions(+), 111 deletions(-) diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index 08d90b8b57..d389425e6a 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -22,22 +22,22 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "math_const.h" #include "neigh_list.h" #include "neighbor.h" #include "suffix.h" #include -#define MY_PIS 1.77245385090551602729 -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using MathConst::MY_PIS; + +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index c70fe555d0..45e71440eb 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_cut_coul_long_soft_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_soft_gpu.cpp index e8342b6530..e6e40ce08e 100644 --- a/src/GPU/pair_lj_cut_coul_long_soft_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_soft_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index df1a2d78ba..6c04b92b47 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -32,16 +33,9 @@ #include #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; using namespace MathConst; +using namespace EwaldConst; // External functions from cuda library for atom decomposition @@ -207,7 +201,7 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl double pdotp, pidotr, pjdotr, pre1, pre2, pre3; double grij, expm2, t, erfc; double g0, g1, g2, b0, b1, b2, b3, d0, d1, d2, d3; - double zdix, zdiy, zdiz, zdjx, zdjy, zdjz, zaix, zaiy, zaiz, zajx, zajy, zajz; + double zdix, zdiy, zdiz, zaix, zaiy, zaiz; double g0b1_g1b2_g2b3, g0d1_g1d2_g2d3; double forcelj, factor_coul, factor_lj, facm1; double evdwl, ecoul; @@ -290,9 +284,6 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl zdix = delx * (q[j] * b1 + b2 * pjdotr) - b1 * mu[j][0]; zdiy = dely * (q[j] * b1 + b2 * pjdotr) - b1 * mu[j][1]; zdiz = delz * (q[j] * b1 + b2 * pjdotr) - b1 * mu[j][2]; - zdjx = delx * (-qtmp * b1 + b2 * pidotr) - b1 * mu[i][0]; - zdjy = dely * (-qtmp * b1 + b2 * pidotr) - b1 * mu[i][1]; - zdjz = delz * (-qtmp * b1 + b2 * pidotr) - b1 * mu[i][2]; if (factor_coul < 1.0) { fdx *= factor_coul; @@ -301,14 +292,10 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl zdix *= factor_coul; zdiy *= factor_coul; zdiz *= factor_coul; - zdjx *= factor_coul; - zdjy *= factor_coul; - zdjz *= factor_coul; } } else { fdx = fdy = fdz = 0.0; zdix = zdiy = zdiz = 0.0; - zdjx = zdjy = zdjz = 0.0; } if (factor_coul < 1.0) { @@ -328,9 +315,6 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl zaix = delx * (q[j] * d1 + d2 * pjdotr) - d1 * mu[j][0]; zaiy = dely * (q[j] * d1 + d2 * pjdotr) - d1 * mu[j][1]; zaiz = delz * (q[j] * d1 + d2 * pjdotr) - d1 * mu[j][2]; - zajx = delx * (-qtmp * d1 + d2 * pidotr) - d1 * mu[i][0]; - zajy = dely * (-qtmp * d1 + d2 * pidotr) - d1 * mu[i][1]; - zajz = delz * (-qtmp * d1 + d2 * pidotr) - d1 * mu[i][2]; if (factor_coul > 0.0) { facm1 = 1.0 - factor_coul; @@ -340,14 +324,10 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl zaix *= facm1; zaiy *= facm1; zaiz *= facm1; - zajx *= facm1; - zajy *= facm1; - zajz *= facm1; } } else { fax = fay = faz = 0.0; zaix = zaiy = zaiz = 0.0; - zajx = zajy = zajz = 0.0; } forcecoulx = fdx + fax; diff --git a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp index d7eaf4b006..b89272c457 100644 --- a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -33,15 +34,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index 35cb18122a..99f61316e2 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/GPU/pair_lj_spica_coul_long_gpu.cpp b/src/GPU/pair_lj_spica_coul_long_gpu.cpp index 4317c04220..896f692d02 100644 --- a/src/GPU/pair_lj_spica_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_spica_coul_long_gpu.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "gpu_extra.h" #include "kspace.h" @@ -29,15 +30,8 @@ #include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - using namespace LAMMPS_NS; +using namespace EwaldConst; // External functions from cuda library for atom decomposition diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index cb35a63fcb..bd39ba5114 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -58,7 +58,7 @@ using namespace FixConst; using namespace random_external_state; static constexpr double EPSILON = 1.0e-10; -#define EPSILON_SQUARED ((EPSILON) * (EPSILON)) +static constexpr double EPSILON_SQUARED = EPSILON * EPSILON; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/min_cg_kokkos.cpp b/src/KOKKOS/min_cg_kokkos.cpp index d9a7088c3b..2ac869e4ea 100644 --- a/src/KOKKOS/min_cg_kokkos.cpp +++ b/src/KOKKOS/min_cg_kokkos.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 +static constexpr double EPS_ENERGY = 1.0e-8; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/min_linesearch_kokkos.cpp b/src/KOKKOS/min_linesearch_kokkos.cpp index 601d5e7d57..61aa3900cd 100644 --- a/src/KOKKOS/min_linesearch_kokkos.cpp +++ b/src/KOKKOS/min_linesearch_kokkos.cpp @@ -38,13 +38,12 @@ using namespace LAMMPS_NS; // EMACH = machine accuracy limit of energy changes (1.0e-8) // EPS_QUAD = tolerance for quadratic projection -#define ALPHA_MAX 1.0 -#define ALPHA_REDUCE 0.5 -#define BACKTRACK_SLOPE 0.4 -#define QUADRATIC_TOL 0.1 -//#define EMACH 1.0e-8 +static constexpr double ALPHA_MAX = 1.0; +static constexpr double ALPHA_REDUCE = 0.5; +static constexpr double BACKTRACK_SLOPE = 0.4; +static constexpr double QUADRATIC_TOL = 0.1; static constexpr double EMACH = 1.0e-8; -#define EPS_QUAD 1.0e-28 +static constexpr double EPS_QUAD = 1.0e-28; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 2f1d4a79b2..a13361d09f 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -34,15 +35,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index da4c7b1b4c..936b6b1d8c 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -34,13 +34,12 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index ed9b4c31c1..0452a08b8f 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -34,15 +35,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index 99b3bd7145..2843efeb4b 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -36,8 +36,7 @@ using namespace MathConst; // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 - +static constexpr double EPS_ENERGY = 1.0e-8; static constexpr int DELAYSTEP = 5; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/min_spin_cg.cpp b/src/SPIN/min_spin_cg.cpp index 25ea83d6de..ed7ab6c329 100644 --- a/src/SPIN/min_spin_cg.cpp +++ b/src/SPIN/min_spin_cg.cpp @@ -54,8 +54,7 @@ static const char cite_minstyle_spin_cg[] = // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 - +static constexpr double EPS_ENERGY = 1.0e-8; static constexpr int DELAYSTEP = 5; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/min_spin_lbfgs.cpp b/src/SPIN/min_spin_lbfgs.cpp index 357d8364e1..e4f0dce8b9 100644 --- a/src/SPIN/min_spin_lbfgs.cpp +++ b/src/SPIN/min_spin_lbfgs.cpp @@ -54,8 +54,7 @@ static const char cite_minstyle_spin_lbfgs[] = // EPS_ENERGY = minimum normalization for energy tolerance -#define EPS_ENERGY 1.0e-8 - +static constexpr double EPS_ENERGY = 1.0e-8; static constexpr int DELAYSTEP = 5; /* ---------------------------------------------------------------------- */ From f6ce3ae45e2612267ac5d244dea5308b8e3e8a8a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 01:11:49 -0500 Subject: [PATCH 74/89] some more constant cleanups --- ..._lj_charmm_coul_charmm_implicit_kokkos.cpp | 11 ++-------- .../pair_lj_charmm_coul_charmm_kokkos.cpp | 11 ++-------- .../pair_lj_charmm_coul_long_kokkos.cpp | 11 ++-------- .../pair_lj_charmmfsw_coul_long_kokkos.cpp | 11 ++-------- .../pair_lj_class2_coul_long_kokkos.cpp | 11 ++-------- src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp | 15 +++++++------ src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp | 11 ++-------- .../pair_lj_expand_coul_long_kokkos.cpp | 11 ++-------- src/KSPACE/pair_born_coul_long.cpp | 10 ++------- src/KSPACE/pair_buck_coul_long.cpp | 10 ++------- src/KSPACE/pair_buck_long_coul_long.cpp | 10 ++------- src/KSPACE/pair_coul_long.cpp | 10 ++------- src/KSPACE/pair_lj_charmm_coul_long.cpp | 10 ++------- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 10 ++------- src/KSPACE/pair_lj_cut_coul_long.cpp | 10 ++------- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 10 ++------- src/KSPACE/pair_lj_long_coul_long.cpp | 10 ++------- src/KSPACE/pair_lj_long_tip4p_long.cpp | 10 ++------- src/KSPACE/pair_tip4p_long.cpp | 11 ++-------- src/OPENMP/pair_born_coul_long_omp.cpp | 11 +++------- src/OPENMP/pair_buck_coul_long_omp.cpp | 10 ++------- src/OPENMP/pair_buck_long_coul_long_omp.cpp | 10 ++------- src/OPENMP/pair_coul_dsf_omp.cpp | 15 +++++++------ src/OPENMP/pair_coul_long_omp.cpp | 11 +++------- src/OPENMP/pair_coul_long_soft_omp.cpp | 11 +++------- src/OPENMP/pair_lj_class2_coul_long_omp.cpp | 10 ++------- src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp | 18 ++++++++-------- src/OPENMP/pair_lj_cut_coul_long_omp.cpp | 11 +++------- src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp | 11 +++------- src/OPENMP/pair_lj_cut_thole_long_omp.cpp | 20 +++++++++--------- src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp | 8 ------- src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp | 10 +++------ .../pair_lj_cut_tip4p_long_soft_omp.cpp | 12 ++++------- src/OPENMP/pair_lj_long_coul_long_omp.cpp | 11 +++------- src/OPENMP/pair_lj_long_tip4p_long_omp.cpp | 11 +++------- src/OPENMP/pair_nm_cut_coul_long_omp.cpp | 11 +++------- src/OPENMP/pair_tip4p_cut_omp.cpp | 9 +------- src/OPENMP/pair_tip4p_long_omp.cpp | 12 ++++------- src/OPENMP/pair_tip4p_long_soft_omp.cpp | 11 +++------- src/OPT/pair_lj_charmm_coul_long_opt.cpp | 21 ++++++------------- src/OPT/pair_lj_cut_coul_long_opt.cpp | 14 +++++-------- src/OPT/pair_lj_cut_tip4p_long_opt.cpp | 14 +++++-------- src/OPT/pair_lj_long_coul_long_opt.cpp | 10 ++------- src/SPIN/pair_spin_dipole_long.cpp | 10 ++------- src/YAFF/pair_lj_switch3_coulgauss_long.cpp | 10 ++------- src/YAFF/pair_mm3_switch3_coulgauss_long.cpp | 10 ++------- 46 files changed, 138 insertions(+), 387 deletions(-) diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index f8fb7cdda4..a2c8943340 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -33,15 +34,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 526e15c222..24551e27ce 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -34,15 +35,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index c7e10d39ef..90ab8adf26 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -34,15 +35,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp index f412721411..c07a089a35 100644 --- a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp @@ -26,6 +26,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -39,15 +40,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index e861d1cec2..b5d55a023a 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -17,6 +17,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" @@ -30,15 +31,7 @@ #include using namespace LAMMPS_NS; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index bd430db764..628cb29b0e 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -35,15 +35,14 @@ #include using namespace LAMMPS_NS; -using namespace MathConst; +using MathConst::MY_PIS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index ce2bf480d8..5124d40505 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -17,6 +17,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "math_const.h" @@ -32,15 +33,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp index acb1cf253e..a5c6fcc552 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp @@ -21,6 +21,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kokkos.h" #include "math_const.h" @@ -36,15 +37,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index d31f655ce0..0165beba0d 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -33,14 +34,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 1516aab571..a6a86f3d45 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -29,14 +30,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 820b76b96f..e7cce1071a 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_extra.h" @@ -35,14 +36,7 @@ using namespace LAMMPS_NS; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index 6b91050e3e..ef1b60ac56 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -30,14 +31,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index cdb8ead70a..ef367f8742 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -33,14 +34,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 260c26e8aa..a0889d92ea 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -25,6 +25,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "memory.h" @@ -37,14 +38,7 @@ #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index c474816075..969f235c55 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -35,14 +36,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 817b335b3a..32a04e2761 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -29,19 +29,13 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" +#include "ewald_const.h" #include #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 5f77009d6c..5f3c0327db 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -23,6 +23,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_extra.h" @@ -37,14 +38,7 @@ using namespace LAMMPS_NS; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 8c331922f6..187b22a78a 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -29,19 +29,13 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" +#include "ewald_const.h" #include #include using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index 83eeccca9c..637a272e49 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -31,17 +31,10 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" - +#include "ewald_const.h" using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_born_coul_long_omp.cpp b/src/OPENMP/pair_born_coul_long_omp.cpp index 0f51a3a5cc..30efb6e633 100644 --- a/src/OPENMP/pair_born_coul_long_omp.cpp +++ b/src/OPENMP/pair_born_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_buck_coul_long_omp.cpp b/src/OPENMP/pair_buck_coul_long_omp.cpp index da4b0bb5b0..2bbb7a1cd8 100644 --- a/src/OPENMP/pair_buck_coul_long_omp.cpp +++ b/src/OPENMP/pair_buck_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -25,14 +26,7 @@ #include "omp_compat.h" using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_buck_long_coul_long_omp.cpp b/src/OPENMP/pair_buck_long_coul_long_omp.cpp index bb1bdd9f2a..c03bfcd33c 100644 --- a/src/OPENMP/pair_buck_long_coul_long_omp.cpp +++ b/src/OPENMP/pair_buck_long_coul_long_omp.cpp @@ -16,6 +16,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "math_extra.h" #include "neigh_list.h" @@ -27,14 +28,7 @@ #include "omp_compat.h" using namespace LAMMPS_NS; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_coul_dsf_omp.cpp b/src/OPENMP/pair_coul_dsf_omp.cpp index 4609288d24..64f4c1ce8d 100644 --- a/src/OPENMP/pair_coul_dsf_omp.cpp +++ b/src/OPENMP/pair_coul_dsf_omp.cpp @@ -24,15 +24,14 @@ #include "suffix.h" #include "math_const.h" using namespace LAMMPS_NS; -using namespace MathConst; +using MathConst::MY_PIS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_coul_long_omp.cpp b/src/OPENMP/pair_coul_long_omp.cpp index b8c7423e76..eb7e2236f3 100644 --- a/src/OPENMP/pair_coul_long_omp.cpp +++ b/src/OPENMP/pair_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_coul_long_soft_omp.cpp b/src/OPENMP/pair_coul_long_soft_omp.cpp index 3670a219b6..ccfe1e8963 100644 --- a/src/OPENMP/pair_coul_long_soft_omp.cpp +++ b/src/OPENMP/pair_coul_long_soft_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_class2_coul_long_omp.cpp b/src/OPENMP/pair_lj_class2_coul_long_omp.cpp index 0791cce8f3..b15a0cc129 100644 --- a/src/OPENMP/pair_lj_class2_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_class2_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -25,14 +26,7 @@ #include "omp_compat.h" using namespace LAMMPS_NS; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp b/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp index f82dfa8d33..d05d49f277 100644 --- a/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp @@ -25,16 +25,16 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using MathConst::MY_PIS; + +static constexpr double EWALD_P = 0.3275911; +static constexpr double A1 = 0.254829592; +static constexpr double A2 = -0.284496736; +static constexpr double A3 = 1.421413741; +static constexpr double A4 = -1.453152027; +static constexpr double A5 = 1.061405429; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_coul_long_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_omp.cpp index 49ad3a508c..a1ad688b62 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp index c8f3635b4f..650f828a0a 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_thole_long_omp.cpp b/src/OPENMP/pair_lj_cut_thole_long_omp.cpp index 8fdea2ce6d..fd9f80f465 100644 --- a/src/OPENMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_thole_long_omp.cpp @@ -34,18 +34,18 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define EWALD_F 1.12837917 -#define EWALD_P 9.95473818e-1 -#define B0 -0.1335096380159268 -#define B1 -2.57839507e-1 -#define B2 -1.37203639e-1 -#define B3 -8.88822059e-3 -#define B4 -5.80844129e-3 -#define B5 1.14652755e-1 +static constexpr double EWALD_F = 1.12837917; +static constexpr double EWALD_P = 9.95473818e-1; +static constexpr double B0 = -0.1335096380159268; +static constexpr double B1 = -2.57839507e-1; +static constexpr double B2 = -1.37203639e-1; +static constexpr double B3 = -8.88822059e-3; +static constexpr double B4 = -5.80844129e-3; +static constexpr double B5 = 1.14652755e-1; static constexpr double EPSILON = 1.0e-20; -#define EPS_EWALD 1.0e-6 -#define EPS_EWALD_SQR 1.0e-12 +static constexpr double EPS_EWALD = 1.0e-6; +static constexpr double EPS_EWALD_SQR = 1.0e-12; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp index 04e94ded0e..c54e681686 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp @@ -28,14 +28,6 @@ #include "suffix.h" using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 - /* ---------------------------------------------------------------------- */ PairLJCutTIP4PCutOMP::PairLJCutTIP4PCutOMP(LAMMPS *lmp) : diff --git a/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp index b346154df0..2654ac17fe 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp @@ -19,22 +19,18 @@ #include "atom.h" #include "domain.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neighbor.h" #include "error.h" +#include "ewald_const.h" #include "memory.h" #include "neigh_list.h" #include "suffix.h" using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp index c19828bf04..e1c668202a 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp @@ -19,22 +19,18 @@ #include "atom.h" #include "domain.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neighbor.h" #include "error.h" +#include "ewald_const.h" #include "memory.h" #include "neigh_list.h" #include "suffix.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_long_coul_long_omp.cpp b/src/OPENMP/pair_lj_long_coul_long_omp.cpp index e1f9e5fea4..1a930b1125 100644 --- a/src/OPENMP/pair_lj_long_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_long_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "math_extra.h" #include "neigh_list.h" @@ -26,16 +27,10 @@ #include #include "omp_compat.h" + using namespace LAMMPS_NS; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp b/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp index b452960386..b8206bd21f 100644 --- a/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp @@ -19,6 +19,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "memory.h" #include "neigh_list.h" @@ -28,15 +29,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_nm_cut_coul_long_omp.cpp b/src/OPENMP/pair_nm_cut_coul_long_omp.cpp index 6694a1237b..313905c967 100644 --- a/src/OPENMP/pair_nm_cut_coul_long_omp.cpp +++ b/src/OPENMP/pair_nm_cut_coul_long_omp.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" #include "suffix.h" @@ -24,15 +25,9 @@ #include #include "omp_compat.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_tip4p_cut_omp.cpp b/src/OPENMP/pair_tip4p_cut_omp.cpp index 497743daff..d43559fc81 100644 --- a/src/OPENMP/pair_tip4p_cut_omp.cpp +++ b/src/OPENMP/pair_tip4p_cut_omp.cpp @@ -26,15 +26,8 @@ #include "neigh_list.h" #include "suffix.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_tip4p_long_omp.cpp b/src/OPENMP/pair_tip4p_long_omp.cpp index 8c0648cc4a..96e063d110 100644 --- a/src/OPENMP/pair_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_tip4p_long_omp.cpp @@ -19,22 +19,18 @@ #include "atom.h" #include "domain.h" #include "comm.h" +#include "ewald_const.h" #include "force.h" #include "neighbor.h" #include "error.h" +#include "ewald_const.h" #include "memory.h" #include "neigh_list.h" #include "suffix.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_tip4p_long_soft_omp.cpp b/src/OPENMP/pair_tip4p_long_soft_omp.cpp index 4a7d6bdfe2..d2fa95a10c 100644 --- a/src/OPENMP/pair_tip4p_long_soft_omp.cpp +++ b/src/OPENMP/pair_tip4p_long_soft_omp.cpp @@ -22,19 +22,14 @@ #include "force.h" #include "neighbor.h" #include "error.h" +#include "ewald_const.h" #include "memory.h" #include "neigh_list.h" #include "suffix.h" -using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPT/pair_lj_charmm_coul_long_opt.cpp b/src/OPT/pair_lj_charmm_coul_long_opt.cpp index f5d38148a6..cc1bb71f9b 100644 --- a/src/OPT/pair_lj_charmm_coul_long_opt.cpp +++ b/src/OPT/pair_lj_charmm_coul_long_opt.cpp @@ -20,21 +20,16 @@ ------------------------------------------------------------------------- */ #include "pair_lj_charmm_coul_long_opt.h" -#include #include "atom.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" -using namespace LAMMPS_NS; +#include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define EWALD_A1 0.254829592 -#define EWALD_A2 -0.284496736 -#define EWALD_A3 1.421413741 -#define EWALD_A4 -1.453152027 -#define EWALD_A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ @@ -158,9 +153,7 @@ void PairLJCharmmCoulLongOpt::eval() grij = g_ewald * r; expm2 = exp(-grij*grij); t = 1.0 / (1.0 + EWALD_P*grij); - erfc = t * - (EWALD_A1+t*(EWALD_A2+t*(EWALD_A3+t*(EWALD_A4+t*EWALD_A5)))) * - expm2; + erfc = t * (A1 + t*(A2 + t*(A3 + t*(A4 + t*A5)))) * expm2; prefactor = qqrd2e * tmp_coef3/r; forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); } else { @@ -247,9 +240,7 @@ void PairLJCharmmCoulLongOpt::eval() grij = g_ewald * r; expm2 = exp(-grij*grij); t = 1.0 / (1.0 + EWALD_P*grij); - erfc = t * - (EWALD_A1+t*(EWALD_A2+t*(EWALD_A3+t*(EWALD_A4+t*EWALD_A5)))) * - expm2; + erfc = t * (A1 + t*(A2 + t*(A3 + t*(A4 + t*A5)))) * expm2; prefactor = qqrd2e * tmp_coef3/r; forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); if (factor_coul < 1.0) { diff --git a/src/OPT/pair_lj_cut_coul_long_opt.cpp b/src/OPT/pair_lj_cut_coul_long_opt.cpp index 7ae43658d9..ea4ce7bede 100644 --- a/src/OPT/pair_lj_cut_coul_long_opt.cpp +++ b/src/OPT/pair_lj_cut_coul_long_opt.cpp @@ -13,20 +13,16 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_coul_long_opt.h" -#include + #include "atom.h" +#include "ewald_const.h" #include "force.h" #include "neigh_list.h" -using namespace LAMMPS_NS; +#include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp index 5e484fd866..9a9e536bfe 100644 --- a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp +++ b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp @@ -17,24 +17,20 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_tip4p_long_opt.h" -#include + #include "atom.h" #include "domain.h" #include "force.h" #include "error.h" +#include "ewald_const.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" -using namespace LAMMPS_NS; +#include -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace LAMMPS_NS; +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index a7aa232882..afadf107f4 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -19,6 +19,7 @@ #include "pair_lj_long_coul_long_opt.h" #include "atom.h" +#include "ewald_const.h" #include "force.h" #include "math_extra.h" #include "neigh_list.h" @@ -28,14 +29,7 @@ using namespace LAMMPS_NS; using namespace MathExtra; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index 849d5c4a9d..f3ef997d01 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -33,14 +34,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/YAFF/pair_lj_switch3_coulgauss_long.cpp b/src/YAFF/pair_lj_switch3_coulgauss_long.cpp index dbbab7e5fe..27da25e517 100644 --- a/src/YAFF/pair_lj_switch3_coulgauss_long.cpp +++ b/src/YAFF/pair_lj_switch3_coulgauss_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -33,14 +34,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ diff --git a/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp b/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp index 96e4e4c35f..fcadf4a9f5 100644 --- a/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp +++ b/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "ewald_const.h" #include "force.h" #include "kspace.h" #include "math_const.h" @@ -33,14 +34,7 @@ using namespace LAMMPS_NS; using namespace MathConst; - -#define EWALD_F 1.12837917 -#define EWALD_P 0.3275911 -#define A1 0.254829592 -#define A2 -0.284496736 -#define A3 1.421413741 -#define A4 -1.453152027 -#define A5 1.061405429 +using namespace EwaldConst; /* ---------------------------------------------------------------------- */ From 2059b85e228e0ba20735f71888545c8e2e27c17b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 05:13:32 -0500 Subject: [PATCH 75/89] avoid uninitialized data access --- src/YAFF/pair_lj_switch3_coulgauss_long.cpp | 9 +++++---- src/YAFF/pair_mm3_switch3_coulgauss_long.cpp | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/YAFF/pair_lj_switch3_coulgauss_long.cpp b/src/YAFF/pair_lj_switch3_coulgauss_long.cpp index 27da25e517..5fe9b886bf 100644 --- a/src/YAFF/pair_lj_switch3_coulgauss_long.cpp +++ b/src/YAFF/pair_lj_switch3_coulgauss_long.cpp @@ -124,6 +124,7 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag) jtype = type[j]; if (rsq < cutsq[itype][jtype]) { + forcecoul = forcecoul2 = forcelj = 0.0; r2inv = 1.0/rsq; if (rsq < cut_coulsq) { @@ -149,7 +150,7 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag) forcecoul -= (1.0-factor_coul)*prefactor; } } - } else forcecoul = 0.0; + } if (rsq < cut_ljsq[itype][jtype]) { // Lennard-Jones potential @@ -160,7 +161,6 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag) if (lj2[itype][jtype]==0.0) { // This means a point charge is considered, so the correction is zero erfc2 = 0.0; - forcecoul2 = 0.0; prefactor2 = 0.0; } else { rrij = lj2[itype][jtype]*r; @@ -169,7 +169,7 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag) prefactor2 = -qqrd2e*qtmp*q[j]/r; forcecoul2 = prefactor2*(erfc2+EWALD_F*rrij*expn2); } - } else forcelj = 0.0; + } if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) @@ -580,6 +580,8 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, r2inv = 1.0/rsq; r = sqrt(rsq); + forcecoul = forcecoul2 = 0.0; + if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) { grij = g_ewald * r; @@ -610,7 +612,6 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, forcelj = r6inv*(12.0*lj3[itype][jtype]*r6inv-6.0*lj4[itype][jtype]); if (lj2[itype][jtype] == 0.0) { erfc2 = 0.0; - forcecoul2 = 0.0; prefactor2 = 0.0; } else { rrij = lj2[itype][jtype]*r; diff --git a/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp b/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp index fcadf4a9f5..c4f31f2059 100644 --- a/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp +++ b/src/YAFF/pair_mm3_switch3_coulgauss_long.cpp @@ -124,6 +124,7 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag) jtype = type[j]; if (rsq < cutsq[itype][jtype]) { + forcecoul = forcecoul2 = forcelj = 0.0; r2inv = 1.0/rsq; if (rsq < cut_coulsq) { @@ -149,7 +150,7 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag) forcecoul -= (1.0-factor_coul)*prefactor; } } - } else forcecoul = 0.0; + } if (rsq < cut_ljsq[itype][jtype]) { // Repulsive exponential part @@ -164,7 +165,6 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag) // This means a point charge is considered, so the correction is zero expn2 = 0.0; erfc2 = 0.0; - forcecoul2 = 0.0; prefactor2 = 0.0; } else { rrij = lj2[itype][jtype]*r; @@ -173,7 +173,7 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag) prefactor2 = -qqrd2e*qtmp*q[j]/r; forcecoul2 = prefactor2*(erfc2+EWALD_F*rrij*expn2); } - } else forcelj = 0.0; + } if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) @@ -581,6 +581,8 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, r2inv = 1.0/rsq; r = sqrt(rsq); + forcecoul = forcecoul2 = 0.0; + if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) { grij = g_ewald * r; @@ -604,7 +606,7 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, forcecoul -= (1.0-factor_coul)*prefactor; } } - } else forcecoul = 0.0; + } if (rsq < cut_ljsq[itype][jtype]) { expb = lj3[itype][jtype]*exp(-lj1[itype][jtype]*r); @@ -615,7 +617,6 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, if (lj2[itype][jtype] == 0.0) { expn2 = 0.0; erfc2 = 0.0; - forcecoul2 = 0.0; prefactor2 = 0.0; } else { rrij = lj2[itype][jtype]*r; From d2def08778e8aff20ba9bb951e292eda07c41847 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 05:31:39 -0500 Subject: [PATCH 76/89] a few more define to constexpr translations --- src/BODY/body_rounded_polyhedron.cpp | 4 ++-- src/BODY/fix_wall_body_polygon.cpp | 6 +++--- src/BODY/fix_wall_body_polyhedron.cpp | 5 ++--- src/BODY/pair_body_rounded_polygon.cpp | 8 ++++---- src/BODY/pair_body_rounded_polyhedron.cpp | 6 +++--- src/KOKKOS/fix_wall_gran_old.cpp | 15 +++++++-------- src/MACHDYN/pair_smd_hertz.cpp | 2 -- src/MANYBODY/pair_tersoff_table.cpp | 10 +++++----- src/MESONT/pair_mesocnt.cpp | 10 +++++----- src/MESONT/pair_mesocnt_viscous.cpp | 6 +++--- src/MOFFF/pair_buck6d_coul_gauss_long.cpp | 2 +- src/OPENMP/pair_tersoff_table_omp.cpp | 10 +++++----- src/QEQ/fix_qeq_fire.cpp | 8 ++++---- src/REAXFF/fix_reaxff.cpp | 5 ++--- src/STUBS/mpi.cpp | 3 +-- 15 files changed, 47 insertions(+), 53 deletions(-) diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp index bcc3495644..991f52cac5 100644 --- a/src/BODY/body_rounded_polyhedron.cpp +++ b/src/BODY/body_rounded_polyhedron.cpp @@ -32,9 +32,9 @@ using namespace LAMMPS_NS; static constexpr double EPSILON = 1.0e-7; -#define MAX_FACE_SIZE 4 // maximum number of vertices per face (for now) +static constexpr int MAX_FACE_SIZE = 4; // maximum number of vertices per face (for now) -enum{SPHERE,LINE}; // also in DumpImage +enum { SPHERE, LINE }; // also in DumpImage /* ---------------------------------------------------------------------- */ diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 0920145eb2..051d316a28 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -44,10 +44,10 @@ enum {FAR=0,XLO,XHI,YLO,YHI}; //#define _POLYGON_DEBUG static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1e-2; // dimensionless threshold (dot products, end point checks, contact checks) +static constexpr double EPSILON = 1.0e-2; // dimensionless threshold (dot products, end point checks, contact checks) static constexpr double BIG = 1.0e20; -#define MAX_CONTACTS 4 // maximum number of contacts for 2D models -#define EFF_CONTACTS 2 // effective contacts for 2D models +static constexpr int MAX_CONTACTS = 4; // maximum number of contacts for 2D models +static constexpr int EFF_CONTACTS = 2; // effective contacts for 2D models /* ---------------------------------------------------------------------- */ diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 035e814692..b42cc6843f 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -44,10 +44,9 @@ enum {FAR=0,XLO,XHI,YLO,YHI,ZLO,ZHI}; //#define _POLYHEDRON_DEBUG static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1e-3; // dimensionless threshold (dot products, end point checks) +static constexpr double EPSILON = 1.0e-3; // dimensionless threshold (dot products, end point checks) static constexpr double BIG = 1.0e20; -#define MAX_CONTACTS 4 // maximum number of contacts for 2D models -#define EFF_CONTACTS 2 // effective contacts for 2D models +static constexpr int MAX_CONTACTS = 4; // maximum number of contacts for 2D models /* ---------------------------------------------------------------------- */ diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index 4b5a3c4f64..432f1d5c9c 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -40,14 +40,14 @@ using namespace LAMMPS_NS; static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1e-3; // dimensionless threshold (dot products, end point checks, contact checks) -#define MAX_CONTACTS 4 // maximum number of contacts for 2D models -#define EFF_CONTACTS 2 // effective contacts for 2D models +static constexpr double EPSILON = 1.0e-3; // dimensionless threshold (dot products, end point checks, contact checks) +static constexpr int MAX_CONTACTS = 4; // maximum number of contacts for 2D models +static constexpr int EFF_CONTACTS = 2; // effective contacts for 2D models //#define _CONVEX_POLYGON //#define _POLYGON_DEBUG -enum {INVALID=0,NONE=1,VERTEXI=2,VERTEXJ=3,EDGE=4}; +enum { INVALID=0, NONE=1, VERTEXI=2, VERTEXJ=3, EDGE=4 }; /* ---------------------------------------------------------------------- */ diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index 9eaed320fe..82660df1e0 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -44,9 +44,9 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1e-3; // dimensionless threshold (dot products, end point checks, contact checks) -#define MAX_FACE_SIZE 4 // maximum number of vertices per face (same as BodyRoundedPolyhedron) -#define MAX_CONTACTS 32 // for 3D models (including duplicated counts) +static constexpr double EPSILON = 1.0e-3; // dimensionless threshold (dot products, end point checks, contact checks) +static constexpr int MAX_FACE_SIZE = 4; // maximum number of vertices per face (same as BodyRoundedPolyhedron) +static constexpr int MAX_CONTACTS = 32; // for 3D models (including duplicated counts) //#define _POLYHEDRON_DEBUG diff --git a/src/KOKKOS/fix_wall_gran_old.cpp b/src/KOKKOS/fix_wall_gran_old.cpp index 63b779f6f2..f832a80d11 100644 --- a/src/KOKKOS/fix_wall_gran_old.cpp +++ b/src/KOKKOS/fix_wall_gran_old.cpp @@ -37,13 +37,13 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS 1.333333333333333 // 4/3 -#define THREEQUARTERS 0.75 // 3/4 -#define TWOPI 6.28318530717959 // 2*PI +static constexpr double PI27SQ = 266.47931882941264802866; // 27*PI**2 +static constexpr double THREEROOT3 = 5.19615242270663202362; // 3*sqrt(3) +static constexpr double SIXROOT6 = 14.69693845669906728801; // 6*sqrt(6) +static constexpr double INVROOT6 = 0.40824829046386307274; // 1/sqrt(6) +static constexpr double FOURTHIRDS = 1.333333333333333; // 4/3 +static constexpr double THREEQUARTERS = 0.75; // 3/4 +static constexpr double TWOPI = 6.28318530717959; // 2*PI static constexpr double BIG = 1.0e20; static constexpr double EPSILON = 1e-10; @@ -1704,4 +1704,3 @@ double FixWallGranOld::pulloff_distance(double radius) dist = a*a/radius - 2*sqrt(MY_PI*coh*a/E); return dist; } - diff --git a/src/MACHDYN/pair_smd_hertz.cpp b/src/MACHDYN/pair_smd_hertz.cpp index bf526f5e4e..99e8ae6426 100644 --- a/src/MACHDYN/pair_smd_hertz.cpp +++ b/src/MACHDYN/pair_smd_hertz.cpp @@ -43,8 +43,6 @@ using namespace LAMMPS_NS; -#define SQRT2 1.414213562e0 - /* ---------------------------------------------------------------------- */ PairHertz::PairHertz(LAMMPS *lmp) : diff --git a/src/MANYBODY/pair_tersoff_table.cpp b/src/MANYBODY/pair_tersoff_table.cpp index 90f29bb201..b2aec2653c 100644 --- a/src/MANYBODY/pair_tersoff_table.cpp +++ b/src/MANYBODY/pair_tersoff_table.cpp @@ -41,14 +41,14 @@ using MathConst::MY_PI; static constexpr int DELTA = 4; static constexpr double GRIDSTART = 0.1; -#define GRIDDENSITY_FCUTOFF 5000 -#define GRIDDENSITY_EXP 12000 -#define GRIDDENSITY_GTETA 12000 -#define GRIDDENSITY_BIJ 7500 +static constexpr int GRIDDENSITY_FCUTOFF = 5000; +static constexpr int GRIDDENSITY_EXP = 12000; +static constexpr int GRIDDENSITY_GTETA = 12000; +static constexpr int GRIDDENSITY_BIJ = 7500; // max number of interaction per atom for environment potential -#define leadingDimensionInteractionList 64 +static constexpr int leadingDimensionInteractionList = 64; /* ---------------------------------------------------------------------- */ diff --git a/src/MESONT/pair_mesocnt.cpp b/src/MESONT/pair_mesocnt.cpp index c8e160ab4b..133170f883 100644 --- a/src/MESONT/pair_mesocnt.cpp +++ b/src/MESONT/pair_mesocnt.cpp @@ -43,16 +43,16 @@ using namespace MathExtra; using MathConst::MY_2PI; using MathConst::MY_PI; -#define SELF_CUTOFF 3 +static constexpr int SELF_CUTOFF = 3; static constexpr double SMALL = 1.0e-6; static constexpr double SWITCH = 1.0e-4; static constexpr double RHOMIN = 10.0; -#define QUAD_FINF 129 -#define QUAD_FSEMI 10 +static constexpr int QUAD_FINF = 129; +static constexpr int QUAD_FSEMI = 10; -#define BISECTION_STEPS 1000000 -#define BISECTION_EPS 1.0e-15 +static constexpr int BISECTION_STEPS = 1000000; +static constexpr double BISECTION_EPS = 1.0e-15; /* ---------------------------------------------------------------------- */ diff --git a/src/MESONT/pair_mesocnt_viscous.cpp b/src/MESONT/pair_mesocnt_viscous.cpp index df159db92a..9beabe0d2f 100644 --- a/src/MESONT/pair_mesocnt_viscous.cpp +++ b/src/MESONT/pair_mesocnt_viscous.cpp @@ -35,11 +35,11 @@ using namespace LAMMPS_NS; using namespace MathExtra; using MathConst::MY_PI; -#define SELF_CUTOFF 3 +static constexpr int SELF_CUTOFF = 3; static constexpr double RHOMIN = 10.0; -#define QUAD_FINF 129 -#define QUAD_FSEMI 10 +static constexpr int QUAD_FINF = 129; +static constexpr int QUAD_FSEMI = 10; /* ---------------------------------------------------------------------- */ diff --git a/src/MOFFF/pair_buck6d_coul_gauss_long.cpp b/src/MOFFF/pair_buck6d_coul_gauss_long.cpp index a750fea084..2ccc921448 100644 --- a/src/MOFFF/pair_buck6d_coul_gauss_long.cpp +++ b/src/MOFFF/pair_buck6d_coul_gauss_long.cpp @@ -36,7 +36,7 @@ using namespace LAMMPS_NS; -#define EWALD_F 1.12837917 +static constexpr double EWALD_F = 1.12837917; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_tersoff_table_omp.cpp b/src/OPENMP/pair_tersoff_table_omp.cpp index ec97df26f6..edd5b73d89 100644 --- a/src/OPENMP/pair_tersoff_table_omp.cpp +++ b/src/OPENMP/pair_tersoff_table_omp.cpp @@ -27,14 +27,14 @@ using namespace LAMMPS_NS; static constexpr double GRIDSTART = 0.1; -#define GRIDDENSITY_FCUTOFF 5000 -#define GRIDDENSITY_EXP 12000 -#define GRIDDENSITY_GTETA 12000 -#define GRIDDENSITY_BIJ 7500 +static constexpr int GRIDDENSITY_FCUTOFF = 5000; +static constexpr int GRIDDENSITY_EXP = 12000; +static constexpr int GRIDDENSITY_GTETA = 12000; +static constexpr int GRIDDENSITY_BIJ = 7500; // max number of interaction per atom for environment potential -#define leadingDimensionInteractionList 64 +static constexpr int leadingDimensionInteractionList = 64; /* ---------------------------------------------------------------------- */ diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index f8eb667f2a..5df793b153 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -35,10 +35,10 @@ using namespace LAMMPS_NS; using namespace FixConst; static constexpr int DELAYSTEP = 0; -#define DT_GROW 1.1 -#define DT_SHRINK 0.5 -#define ALPHA0 0.8 -#define ALPHA_SHRINK 0.10 +static constexpr double DT_GROW = 1.1; +static constexpr double DT_SHRINK = 0.5; +static constexpr double ALPHA0 = 0.8; +static constexpr double ALPHA_SHRINK = 0.10; static constexpr double TMAX = 10.0; /* ---------------------------------------------------------------------- */ diff --git a/src/REAXFF/fix_reaxff.cpp b/src/REAXFF/fix_reaxff.cpp index bec16b5d04..ede0d79f87 100644 --- a/src/REAXFF/fix_reaxff.cpp +++ b/src/REAXFF/fix_reaxff.cpp @@ -29,9 +29,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -#define MAX_REAX_BONDS 30 -#define MIN_REAX_BONDS 15 -#define MIN_REAX_HBONDS 25 +static constexpr int MIN_REAX_BONDS = 15; +static constexpr int MIN_REAX_HBONDS = 25; /* ---------------------------------------------------------------------- */ diff --git a/src/STUBS/mpi.cpp b/src/STUBS/mpi.cpp index 53b83236ba..ffe60515a2 100644 --- a/src/STUBS/mpi.cpp +++ b/src/STUBS/mpi.cpp @@ -38,8 +38,7 @@ typedef struct _mpi_double_int double_int; /* extra MPI_Datatypes registered by MPI_Type_contiguous */ -#define MAXEXTRA_DATATYPE 16 - +static constexpr int MAXEXTRA_DATATYPE = 16; int nextra_datatype; MPI_Datatype *ptr_datatype[MAXEXTRA_DATATYPE]; int index_datatype[MAXEXTRA_DATATYPE]; From def362ffa4f5e2e10bf0987ea926903fb068c0c8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 05:45:58 -0500 Subject: [PATCH 77/89] a few final updates --- src/MACHDYN/atom_vec_smd.cpp | 4 ++-- src/MACHDYN/pair_smd_tlsph.cpp | 6 +++--- src/MACHDYN/pair_smd_triangulated_surface.cpp | 2 -- src/MACHDYN/pair_smd_ulsph.cpp | 1 - src/OPENMP/reaxff_torsion_angles_omp.cpp | 2 -- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/MACHDYN/atom_vec_smd.cpp b/src/MACHDYN/atom_vec_smd.cpp index d1bae9ecb7..760dd963eb 100644 --- a/src/MACHDYN/atom_vec_smd.cpp +++ b/src/MACHDYN/atom_vec_smd.cpp @@ -30,8 +30,8 @@ using namespace LAMMPS_NS; -#define NMAT_FULL 9 -#define NMAT_SYMM 6 +static constexpr int NMAT_FULL = 9; +static constexpr int NMAT_SYMM = 6; /* ---------------------------------------------------------------------- */ diff --git a/src/MACHDYN/pair_smd_tlsph.cpp b/src/MACHDYN/pair_smd_tlsph.cpp index 6b2320219f..a1c8fbf1ea 100644 --- a/src/MACHDYN/pair_smd_tlsph.cpp +++ b/src/MACHDYN/pair_smd_tlsph.cpp @@ -51,9 +51,9 @@ using namespace Eigen; using namespace LAMMPS_NS; using namespace SMD_Math; -#define JAUMANN false -#define DETF_MIN 0.2 // maximum compression deformation allow -#define DETF_MAX 2.0 // maximum tension deformation allowed +static constexpr bool JAUMANN = false; +static constexpr double DETF_MIN = 0.2; // maximum compression deformation allow +static constexpr double DETF_MAX = 2.0; // maximum tension deformation allowed /* ---------------------------------------------------------------------- */ diff --git a/src/MACHDYN/pair_smd_triangulated_surface.cpp b/src/MACHDYN/pair_smd_triangulated_surface.cpp index e1ebc2562d..dc777cc66f 100644 --- a/src/MACHDYN/pair_smd_triangulated_surface.cpp +++ b/src/MACHDYN/pair_smd_triangulated_surface.cpp @@ -46,8 +46,6 @@ using namespace std; using namespace LAMMPS_NS; using namespace Eigen; -#define SQRT2 1.414213562e0 - /* ---------------------------------------------------------------------- */ PairTriSurf::PairTriSurf(LAMMPS *lmp) : diff --git a/src/MACHDYN/pair_smd_ulsph.cpp b/src/MACHDYN/pair_smd_ulsph.cpp index a06be48283..20897a7852 100644 --- a/src/MACHDYN/pair_smd_ulsph.cpp +++ b/src/MACHDYN/pair_smd_ulsph.cpp @@ -48,7 +48,6 @@ using namespace SMD_Math; #include using namespace Eigen; -#define ARTIFICIAL_STRESS false #define FORMAT1 "%60s : %g\n" #define FORMAT2 "\n.............................. %s \n" diff --git a/src/OPENMP/reaxff_torsion_angles_omp.cpp b/src/OPENMP/reaxff_torsion_angles_omp.cpp index 3b730e26d4..945a670a51 100644 --- a/src/OPENMP/reaxff_torsion_angles_omp.cpp +++ b/src/OPENMP/reaxff_torsion_angles_omp.cpp @@ -34,8 +34,6 @@ #include -#define MIN_SINE 1e-10 - using namespace LAMMPS_NS; namespace ReaxFF { From 5773e35892c5d8edacda0044f5de21aa67292520 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 09:36:35 -0500 Subject: [PATCH 78/89] recover compilation of MPI stubs on older systems that don't default to C++11 --- src/STUBS/mpi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/STUBS/mpi.cpp b/src/STUBS/mpi.cpp index ffe60515a2..53b83236ba 100644 --- a/src/STUBS/mpi.cpp +++ b/src/STUBS/mpi.cpp @@ -38,7 +38,8 @@ typedef struct _mpi_double_int double_int; /* extra MPI_Datatypes registered by MPI_Type_contiguous */ -static constexpr int MAXEXTRA_DATATYPE = 16; +#define MAXEXTRA_DATATYPE 16 + int nextra_datatype; MPI_Datatype *ptr_datatype[MAXEXTRA_DATATYPE]; int index_datatype[MAXEXTRA_DATATYPE]; From 0bb6be5dd9e439c8f06f1fe51939c48422b7548d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 11:37:41 -0500 Subject: [PATCH 79/89] provide a more detailed description of the bundled tests --- doc/src/Build_development.rst | 31 ++++++++++++++++----- doc/utils/sphinx-config/false_positives.txt | 1 + 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 36772c13f2..ec2468d54e 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -241,14 +241,31 @@ will be skipped if prerequisite features are not available in LAMMPS. time. Preference is given to parts of the code base that are easy to test or commonly used. -Many tests have special test programs that test individual functions or -classes. There are also special cases for the Fortran and Python -module. Tests for force computing or modifying styles (e.g. pair styles -or bond styles) are performed with the same test executable using input -files in YAML format. So to add a test for another style of this kind -it may be sufficient to add a suitable YAML file. :doc:`Detailed +Tests as shown by the ``ctest`` program are command lines defined in the +``CMakeLists.txt`` files in the ``unittest`` directory tree. A few +tests simply execute LAMMPS with specific command line flags and check +the output to the screen for expected content. A large number of unit +tests are special tests programs using the `GoogleTest framework +`_ and linked to the LAMMPS +library that test individual functions or create a LAMMPS class +instance, execute one or more commands and check data inside the LAMMPS +class hierarchy. There are also tests for the C-library, Fortran, and +Python module interfaces to LAMMPS. The Python tests use the Python +"unittest" module in a similar fashion than the others use `GoogleTest`. +These special test programs are structured to have perform multiple +individual tests internally and each of those contains several checks +(aka assertions) for internal data being changed as expected. + +Tests for force computing or modifying styles (e.g. styles for non-bonded +and bonded interactions and selected fixes) are run by using a more generic +test program that reads its input from files in YAML format. The YAML file +provides the information on how to customized the test program to test +a specific style and - if needed - with specific settings. +To add a test for another, similar style (e.g. a new pair style) it is +usually sufficient to add a suitable YAML file. :doc:`Detailed instructions for adding tests ` are provided in the -Programmer Guide part of the manual. +Programmer Guide part of the manual. A description of what happens +during the tests is given below. Unit tests for force styles ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index c74e2a79f3..4f5fe6fdaf 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -3797,6 +3797,7 @@ unimodal uninstall unitarg unitless +unittest Universite unix unmaintained From e95d52780c634a50c6285b3dbf315c112d8e1723 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 11:47:58 -0500 Subject: [PATCH 80/89] fix grammar error --- doc/src/Build_development.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index ec2468d54e..4d8bf0d07f 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -252,7 +252,7 @@ instance, execute one or more commands and check data inside the LAMMPS class hierarchy. There are also tests for the C-library, Fortran, and Python module interfaces to LAMMPS. The Python tests use the Python "unittest" module in a similar fashion than the others use `GoogleTest`. -These special test programs are structured to have perform multiple +These special test programs are structured to perform multiple individual tests internally and each of those contains several checks (aka assertions) for internal data being changed as expected. From 7fdc09608bacdabcd0496a6643a5f79423245cea Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 12:16:16 -0500 Subject: [PATCH 81/89] add notes about using static constexpr to programming style guide --- doc/src/Modify_style.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/src/Modify_style.rst b/doc/src/Modify_style.rst index e02c2ce59f..496415237c 100644 --- a/doc/src/Modify_style.rst +++ b/doc/src/Modify_style.rst @@ -96,6 +96,39 @@ list all non-conforming lines. By adding the `-f` flag to the command line, they will modify the flagged files to try to remove the detected issues. +Constants (strongly preferred) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Global or per-file constants should be declared as `static constexpr` +variables rather than via the pre-processor with `#define`. The name of +constants should be all uppercase. This has multiple advantages: + +- constants are easily identified as such by their all upper case name +- rather than a pure text substitution during pre-processing, `constexpr + variables` have a type associated with them and are processed later in + the parsing process where the syntax checks and type specific + processing (e.g. via overloads) can be applied to them. +- compilers can emit a warning if the constant is not used and thus can + be removed (we regularly check for and remove dead code like this) +- there are no unexpected substitutions and thus confusing syntax errors + when compiling leading to, for instance, conflicts so that LAMMPS + cannot be compiled with certain combinations of packages (this *has* + happened multiple times in the past). + +Pre-processor defines should be limited to macros (but consider C++ +templates) and conditional compilation. If a per-processor define must +be used, it should be defined at the top of the .cpp file after the +include statements and at all cost it should be avoided to put them into +header files. + +Some sets of commonly used constants are provided in the ``MathConst`` +and ``EwaldConst`` namespaces and implemented in the files +``math_const.h`` and ``ewald_const.h``, respectively. + +There are always exceptions, special cases, and legacy code in LAMMPS, +so please contact the LAMMPS developers if you are not sure. + + Placement of braces (strongly preferred) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 34cd8ad3bcc521ff023c4f3e332fee290ed73a3e Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 11:01:42 -0700 Subject: [PATCH 82/89] Small cleanup --- src/KOKKOS/fft3d_kokkos.cpp | 48 ++++++------------- src/KOKKOS/fft3d_kokkos.h | 2 - src/KOKKOS/fftdata_kokkos.h | 4 +- src/KOKKOS/fix_acks2_reaxff_kokkos.cpp | 6 +-- src/KOKKOS/fix_qeq_reaxff_kokkos.cpp | 2 +- src/KOKKOS/fix_shake_kokkos.cpp | 8 ++-- src/KOKKOS/meam_dens_init_kokkos.h | 2 +- src/KOKKOS/meam_force_kokkos.h | 2 +- src/KOKKOS/pair_adp_kokkos.cpp | 6 +-- src/KOKKOS/pair_dpd_ext_kokkos.cpp | 4 +- src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp | 4 +- src/KOKKOS/pair_dpd_kokkos.cpp | 4 +- src/KOKKOS/pair_dpd_tstat_kokkos.cpp | 4 +- src/KOKKOS/pair_eam_alloy_kokkos.cpp | 8 ++-- src/KOKKOS/pair_eam_fs_kokkos.cpp | 8 ++-- src/KOKKOS/pair_eam_kokkos.cpp | 8 ++-- src/KOKKOS/pair_pace_extrapolation_kokkos.cpp | 4 +- src/KOKKOS/pair_pace_kokkos.cpp | 4 +- src/KOKKOS/pair_reaxff_kokkos.cpp | 14 +++--- src/KOKKOS/pair_snap_kokkos_impl.h | 4 +- src/KOKKOS/pair_sw_kokkos.cpp | 6 +-- src/KOKKOS/pair_tersoff_kokkos.cpp | 6 +-- src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 6 +-- src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 6 +-- src/KOKKOS/remap_kokkos.cpp | 18 +++---- src/KOKKOS/remap_kokkos.h | 2 +- 26 files changed, 84 insertions(+), 106 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index c50af939a4..d3814b204e 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -15,6 +15,7 @@ /* ---------------------------------------------------------------------- Contributing authors: Stan Moore (SNL), Sam Mish (U.C. Davis), Nick Hagerty (ORNL) ------------------------------------------------------------------------- */ + #include "fft3d_kokkos.h" #include "error.h" @@ -37,7 +38,7 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int int out_ilo, int out_ihi, int out_jlo, int out_jhi, int out_klo, int out_khi, int scaled, int permute, int *nbuf, int usecollective, - int usecuda_aware) : + int usegpu_aware) : Pointers(lmp) { int nthreads = lmp->kokkos->nthreads; @@ -73,7 +74,7 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int plan = fft_3d_create_plan_kokkos(comm,nfast,nmid,nslow, in_ilo,in_ihi,in_jlo,in_jhi,in_klo,in_khi, out_ilo,out_ihi,out_jlo,out_jhi,out_klo,out_khi, - scaled,permute,nbuf,usecollective,nthreads,usecuda_aware); + scaled,permute,nbuf,usecollective,nthreads,usegpu_aware); if (plan == nullptr) error->one(FLERR,"Could not create 3d FFT plan"); } @@ -155,7 +156,7 @@ public: *(out_ptr++) *= norm; #elif defined(FFT_KOKKOS_MKL) d_out(i) *= norm; -#else // FFT_KISS +#else // FFT_KOKKOS_KISS d_out(i).re *= norm; d_out(i).im *= norm; #endif @@ -375,7 +376,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, 2 = permute twice = slow->fast, fast->mid, mid->slow nbuf returns size of internal storage buffers used by FFT usecollective use collective MPI operations for remapping data - usecuda_aware use CUDA-Aware MPI or not + usegpu_aware use GPU-Aware MPI or not ------------------------------------------------------------------------- */ template @@ -386,7 +387,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl int out_ilo, int out_ihi, int out_jlo, int out_jhi, int out_klo, int out_khi, int scaled, int permute, int *nbuf, int usecollective, - int nthreads, int usecuda_aware) + int nthreads, int usegpu_aware) { struct fft_plan_3d_kokkos *plan; int me,nprocs; @@ -418,7 +419,6 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl // not needed if all procs own entire fast axis initially // first indices = distribution after 1st set of FFTs - if (in_ilo == 0 && in_ihi == nfast-1) flag = 0; else flag = 1; @@ -444,7 +444,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl remapKK->remap_3d_create_plan_kokkos(comm,in_ilo,in_ihi,in_jlo,in_jhi,in_klo,in_khi, first_ilo,first_ihi,first_jlo,first_jhi, first_klo,first_khi,2,0,0,FFT_PRECISION, - usecollective,usecuda_aware); + usecollective,usegpu_aware); if (plan->pre_plan == nullptr) return nullptr; } @@ -469,7 +469,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl first_klo,first_khi, second_ilo,second_ihi,second_jlo,second_jhi, second_klo,second_khi,2,1,0,FFT_PRECISION, - usecollective,usecuda_aware); + usecollective,usegpu_aware); if (plan->mid1_plan == nullptr) return nullptr; // 1d FFTs along mid axis @@ -510,7 +510,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl second_ilo,second_ihi, third_jlo,third_jhi,third_klo,third_khi, third_ilo,third_ihi,2,1,0,FFT_PRECISION, - usecollective,usecuda_aware); + usecollective,usegpu_aware); if (plan->mid2_plan == nullptr) return nullptr; // 1d FFTs along slow axis @@ -538,7 +538,7 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl third_jlo,third_jhi, out_klo,out_khi,out_ilo,out_ihi, out_jlo,out_jhi,2,(permute+1)%3,0,FFT_PRECISION, - usecollective,usecuda_aware); + usecollective,usegpu_aware); if (plan->post_plan == nullptr) return nullptr; } @@ -714,17 +714,17 @@ struct fft_plan_3d_kokkos* FFT3dKokkos::fft_3d_create_pl hipfftPlanMany(&(plan->plan_fast), 1, &nfast, &nfast,1,plan->length1, &nfast,1,plan->length1, - HIPFFT_KOKKOS_TYPE,plan->total1/plan->length1); + HIPFFT_TYPE,plan->total1/plan->length1); hipfftPlanMany(&(plan->plan_mid), 1, &nmid, &nmid,1,plan->length2, &nmid,1,plan->length2, - HIPFFT_KOKKOS_TYPE,plan->total2/plan->length2); + HIPFFT_TYPE,plan->total2/plan->length2); hipfftPlanMany(&(plan->plan_slow), 1, &nslow, &nslow,1,plan->length3, &nslow,1,plan->length3, - HIPFFT_KOKKOS_TYPE,plan->total3/plan->length3); + HIPFFT_TYPE,plan->total3/plan->length3); #else /* FFT_KOKKOS_KISS */ @@ -805,27 +805,6 @@ void FFT3dKokkos::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk delete remapKK; } -/* ---------------------------------------------------------------------- - divide n into 2 factors of as equal size as possible -------------------------------------------------------------------------- */ - -template -void FFT3dKokkos::bifactor(int n, int *factor1, int *factor2) -{ - int n1,n2,facmax; - - facmax = static_cast (sqrt((double) n)); - - for (n1 = facmax; n1 > 0; n1--) { - n2 = n/n1; - if (n1*n2 == n) { - *factor1 = n1; - *factor2 = n2; - return; - } - } -} - /* ---------------------------------------------------------------------- perform just the 1d FFTs needed by a 3d FFT, no data movement used for timing purposes @@ -855,6 +834,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ // fftw3 and Dfti in MKL encode the number of transforms // into the plan, so we cannot operate on a smaller data set + #if defined(FFT_KOKKOS_MKL) || defined(FFT_KOKKOS_FFTW3) if ((total1 > nsize) || (total2 > nsize) || (total3 > nsize)) return; diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index ed49c4b1ee..a7349878ec 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -106,8 +106,6 @@ class FFT3dKokkos : protected Pointers { void fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokkos *); void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d, int, int, struct fft_plan_3d_kokkos *); - - void bifactor(int, int *, int *); }; } diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index 7f900002e5..c0a223478c 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -108,11 +108,11 @@ #include #if defined(FFT_SINGLE) #define hipfftExec hipfftExecC2C - #define HIPFFT_KOKKOS_TYPE HIPFFT_C2C + #define HIPFFT_TYPE HIPFFT_C2C typedef hipfftComplex FFT_KOKKOS_DATA; #else #define hipfftExec hipfftExecZ2Z - #define HIPFFT_KOKKOS_TYPE HIPFFT_Z2Z + #define HIPFFT_TYPE HIPFFT_Z2Z typedef hipfftDoubleComplex FFT_KOKKOS_DATA; #endif #else diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index 5256b7f4a4..b1b9851964 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -866,7 +866,7 @@ template KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::compute_x_item(int ii, int &m_fill, const bool &final) const { - // The X_diag array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The X_diag array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_X_diag = ScatterViewHelper,decltype(dup_X_diag),decltype(ndup_X_diag)>::get(dup_X_diag,ndup_X_diag); auto a_X_diag = v_X_diag.template access>(); @@ -944,7 +944,7 @@ void FixACKS2ReaxFFKokkos::compute_x_team( const typename Kokkos::TeamPolicy::member_type &team, int atoms_per_team, int vector_length) const { - // The X_diag array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The X_diag array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_X_diag = ScatterViewHelper,decltype(dup_X_diag),decltype(ndup_X_diag)>::get(dup_X_diag,ndup_X_diag); auto a_X_diag = v_X_diag.template access>(); @@ -1458,7 +1458,7 @@ template KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec3_Half, const int &ii) const { - // The bb array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The bb array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_bb = ScatterViewHelper,decltype(dup_bb),decltype(ndup_bb)>::get(dup_bb,ndup_bb); auto a_bb = v_bb.template access>(); diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 06485eb1cc..2cf6bcfba7 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -928,7 +928,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec2_Half,decltype(dup_o),decltype(ndup_o)>::get(dup_o,ndup_o); auto a_o = v_o.template access>(); diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 81489142db..5705163f64 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -643,7 +643,7 @@ KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake(int ilist, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -753,7 +753,7 @@ KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake3(int ilist, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -933,7 +933,7 @@ KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake4(int ilist, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1190,7 +1190,7 @@ KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake3angle(int ilist, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); diff --git a/src/KOKKOS/meam_dens_init_kokkos.h b/src/KOKKOS/meam_dens_init_kokkos.h index 60bb6553d8..68e69430fd 100644 --- a/src/KOKKOS/meam_dens_init_kokkos.h +++ b/src/KOKKOS/meam_dens_init_kokkos.h @@ -481,7 +481,7 @@ void MEAMKokkos::calc_rho1(int i, int /*ntype*/, typename AT::t_int_1d type, typename AT::t_int_1d d_map, typename AT::t_x_array x, typename AT::t_int_1d d_numneigh, int offset) const { - // The rho0, etc. arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The rho0, etc. arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_rho0 = ScatterViewHelper,decltype(dup_rho0),decltype(ndup_rho0)>::get(dup_rho0,ndup_rho0); auto a_rho0 = v_rho0.template access>(); auto v_arho2b = ScatterViewHelper,decltype(dup_arho2b),decltype(ndup_arho2b)>::get(dup_arho2b,ndup_arho2b); diff --git a/src/KOKKOS/meam_force_kokkos.h b/src/KOKKOS/meam_force_kokkos.h index d086230fc7..fec923f5b2 100644 --- a/src/KOKKOS/meam_force_kokkos.h +++ b/src/KOKKOS/meam_force_kokkos.h @@ -131,7 +131,7 @@ KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMForce, decltype(dup_f), decltype(ndup_f)>::get( diff --git a/src/KOKKOS/pair_adp_kokkos.cpp b/src/KOKKOS/pair_adp_kokkos.cpp index 86ba3d267e..d02edc43ab 100644 --- a/src/KOKKOS/pair_adp_kokkos.cpp +++ b/src/KOKKOS/pair_adp_kokkos.cpp @@ -671,7 +671,7 @@ void PairADPKokkos::operator()(TagPairADPKernelA,decltype(dup_rho),decltype(ndup_rho)>::get(dup_rho,ndup_rho); auto a_rho = v_rho.template access>(); @@ -929,7 +929,7 @@ template KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelC, const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1087,7 +1087,7 @@ void PairADPKokkos::ev_tally_xyz(EV_FLOAT &ev, const int &i, const i const int EFLAG = eflag; const int VFLAG = vflag_either; - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_kokkos.cpp index 3624208c6b..636235d1c8 100644 --- a/src/KOKKOS/pair_dpd_ext_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_kokkos.cpp @@ -228,7 +228,7 @@ template KOKKOS_INLINE_FUNCTION void PairDPDExtKokkos::operator() (TagDPDExtKokkos, const int &ii, EV_FLOAT &ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -354,7 +354,7 @@ void PairDPDExtKokkos::ev_tally_xyz(EV_FLOAT &ev, const int &i, cons const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp index 9808c53856..213b344fbb 100644 --- a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp @@ -232,7 +232,7 @@ template KOKKOS_INLINE_FUNCTION void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos, const int &ii, EV_FLOAT &ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -346,7 +346,7 @@ void PairDPDExtTstatKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_dpd_kokkos.cpp b/src/KOKKOS/pair_dpd_kokkos.cpp index 5dca219cdf..f888b5f6ce 100644 --- a/src/KOKKOS/pair_dpd_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_kokkos.cpp @@ -228,7 +228,7 @@ template KOKKOS_INLINE_FUNCTION void PairDPDKokkos::operator() (TagDPDKokkos, const int &ii, EV_FLOAT &ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -319,7 +319,7 @@ void PairDPDKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int & const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp index 78cc862ac0..63dbda3b59 100644 --- a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp @@ -231,7 +231,7 @@ template KOKKOS_INLINE_FUNCTION void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos, const int &ii, EV_FLOAT &ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -312,7 +312,7 @@ void PairDPDTstatKokkos::v_tally(EV_FLOAT &ev, const int &i, const i const F_FLOAT &dely, const F_FLOAT &delz) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 0dfe56c365..93ed9fc620 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -566,7 +566,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelA,decltype(dup_rho),decltype(ndup_rho)>::get(dup_rho,ndup_rho); auto a_rho = v_rho.template access>(); @@ -733,7 +733,7 @@ template KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC, const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -943,7 +943,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1076,7 +1076,7 @@ void PairEAMAlloyKokkos::ev_tally(EV_FLOAT &ev, const int &i, const const int EFLAG = eflag; const int VFLAG = vflag_either; - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 58ff615c04..5dee601302 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -566,7 +566,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelA,decltype(dup_rho),decltype(ndup_rho)>::get(dup_rho,ndup_rho); auto a_rho = v_rho.template access>(); @@ -733,7 +733,7 @@ template KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC, const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -943,7 +943,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1076,7 +1076,7 @@ void PairEAMFSKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int const int EFLAG = eflag; const int VFLAG = vflag_either; - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 864f736066..32f4afe225 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -561,7 +561,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelA,decltype(dup_rho),decltype(ndup_rho)>::get(dup_rho,ndup_rho); auto a_rho = v_rho.template access>(); @@ -728,7 +728,7 @@ template KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelC, const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -938,7 +938,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelC,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1071,7 +1071,7 @@ void PairEAMKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int & const int EFLAG = eflag; const int VFLAG = vflag_either; - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp index ef747ef95c..e7d376c870 100644 --- a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp +++ b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp @@ -1652,7 +1652,7 @@ template KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeForce, const int& ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); const auto a_f = v_f.template access>(); @@ -1721,7 +1721,7 @@ void PairPACEExtrapolationKokkos::v_tally_xyz(EV_FLOAT &ev, const in const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_pace_kokkos.cpp b/src/KOKKOS/pair_pace_kokkos.cpp index 4046649375..4407d1231e 100644 --- a/src/KOKKOS/pair_pace_kokkos.cpp +++ b/src/KOKKOS/pair_pace_kokkos.cpp @@ -1561,7 +1561,7 @@ template KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeForce, const int& ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); const auto a_f = v_f.template access>(); @@ -1630,7 +1630,7 @@ void PairPACEKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const i const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index 505681acb3..7dd86e07a9 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -1149,7 +1149,7 @@ template KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeLJCoulomb, const int &ii, EV_FLOAT_REAX& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1345,7 +1345,7 @@ template KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeTabulatedLJCoulomb, const int &ii, EV_FLOAT_REAX& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -3834,7 +3834,7 @@ void PairReaxFFKokkos::ev_tally(EV_FLOAT_REAX &ev, const int &i, con const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -3890,7 +3890,7 @@ KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::e_tally(EV_FLOAT_REAX & /*ev*/, const int &i, const int &j, const F_FLOAT &epair) const { - // The eatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -3908,7 +3908,7 @@ KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::e_tally_single(EV_FLOAT_REAX & /*ev*/, const int &i, const F_FLOAT &epair) const { - // The eatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -3959,7 +3959,7 @@ KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally3(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, F_FLOAT *fj, F_FLOAT *fk, F_FLOAT *drij, F_FLOAT *drik) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); @@ -3999,7 +3999,7 @@ KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally4(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, const int &l, F_FLOAT *fi, F_FLOAT *fj, F_FLOAT *fk, F_FLOAT *dril, F_FLOAT *drjl, F_FLOAT *drkl) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial F_FLOAT v[6]; diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 7b9fda60db..839240c62f 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -1265,7 +1265,7 @@ template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeForce, const int& ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -1365,7 +1365,7 @@ void PairSNAPKokkos::v_tally_xyz(EV_FLOAT const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 294b451e7e..69c34fdc93 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -235,7 +235,7 @@ template KOKKOS_INLINE_FUNCTION void PairSWKokkos::operator()(TagPairSWCompute, const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access>(); @@ -532,7 +532,7 @@ void PairSWKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -596,7 +596,7 @@ void PairSWKokkos::ev_tally3(EV_FLOAT &ev, const int &i, const int & { F_FLOAT epairthird,v[6]; - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index e860b0232d..1a0d45e435 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -336,7 +336,7 @@ template KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::tersoff_compute(const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); const auto a_f = v_f.template access>(); @@ -1003,7 +1003,7 @@ void PairTersoffKokkos::ev_tally(EV_FLOAT &ev, const int &i, const i const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -1061,7 +1061,7 @@ void PairTersoffKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, F_FLOAT *fj, F_FLOAT *fk, F_FLOAT *drij, F_FLOAT *drik) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 02a51af3d7..b941755d4b 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -326,7 +326,7 @@ template KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::tersoff_mod_compute(const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); const auto a_f = v_f.template access>(); @@ -899,7 +899,7 @@ void PairTersoffMODKokkos::ev_tally(EV_FLOAT &ev, const int &i, cons const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -956,7 +956,7 @@ KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, F_FLOAT *fj, F_FLOAT *fk, F_FLOAT *drij, F_FLOAT *drik) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 8bad880a4f..08d6cb17d7 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -339,7 +339,7 @@ template KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::tersoff_zbl_compute(const int &ii, EV_FLOAT& ev) const { - // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The f array is duplicated for OpenMP, atomic for GPU, and neither for Serial const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); const auto a_f = v_f.template access>(); @@ -963,7 +963,7 @@ void PairTersoffZBLKokkos::ev_tally(EV_FLOAT &ev, const int &i, cons const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const { - // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The eatom and vatom arrays are duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); auto a_eatom = v_eatom.template access>(); @@ -1021,7 +1021,7 @@ void PairTersoffZBLKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, F_FLOAT *fj, F_FLOAT *fk, F_FLOAT *drij, F_FLOAT *drik) const { - // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + // The vatom array is duplicated for OpenMP, atomic for GPU, and neither for Serial auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); auto a_vatom = v_vatom.template access>(); diff --git a/src/KOKKOS/remap_kokkos.cpp b/src/KOKKOS/remap_kokkos.cpp index efc6742a25..8cd3aec6dd 100644 --- a/src/KOKKOS/remap_kokkos.cpp +++ b/src/KOKKOS/remap_kokkos.cpp @@ -38,13 +38,13 @@ RemapKokkos::RemapKokkos(LAMMPS *lmp, MPI_Comm comm, int out_klo, int out_khi, int nqty, int permute, int memory, int precision, int usecollective, - int usecuda_aware) : Pointers(lmp) + int usegpu_aware) : Pointers(lmp) { plan = remap_3d_create_plan_kokkos(comm, in_ilo,in_ihi,in_jlo,in_jhi,in_klo,in_khi, out_ilo,out_ihi,out_jlo,out_jhi,out_klo,out_khi, nqty,permute,memory,precision,usecollective, - usecuda_aware); + usegpu_aware); if (plan == nullptr) error->one(FLERR,"Could not create 3d remap plan"); } @@ -121,7 +121,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d // post all recvs into scratch space FFT_SCALAR* v_scratch = d_scratch.data(); - if (!plan->usecuda_aware) { + if (!plan->usegpu_aware) { plan->h_scratch = Kokkos::create_mirror_view(d_scratch); v_scratch = plan->h_scratch.data(); } @@ -134,7 +134,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d } FFT_SCALAR* v_sendbuf = plan->d_sendbuf.data(); - if (!plan->usecuda_aware) { + if (!plan->usegpu_aware) { plan->h_sendbuf = Kokkos::create_mirror_view(plan->d_sendbuf); v_sendbuf = plan->h_sendbuf.data(); } @@ -146,7 +146,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d plan->pack(d_in,in_offset, plan->d_sendbuf,0,&plan->packplan[isend]); - if (!plan->usecuda_aware) + if (!plan->usegpu_aware) Kokkos::deep_copy(plan->h_sendbuf,plan->d_sendbuf); MPI_Send(v_sendbuf,plan->send_size[isend],MPI_FFT_SCALAR, @@ -178,7 +178,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d int scratch_offset = plan->recv_bufloc[irecv]; int out_offset = plan->recv_offset[irecv]; - if (!plan->usecuda_aware) + if (!plan->usegpu_aware) Kokkos::deep_copy(d_scratch,plan->h_scratch); plan->unpack(d_scratch,scratch_offset, @@ -209,7 +209,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d 1 = single precision (4 bytes per datum) 2 = double precision (8 bytes per datum) usecollective whether to use collective MPI or point-to-point - usecuda_aware whether to use CUDA-Aware MPI or not + usegpu_aware whether to use GPU-Aware MPI or not ------------------------------------------------------------------------- */ template @@ -220,7 +220,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat int out_ilo, int out_ihi, int out_jlo, int out_jhi, int out_klo, int out_khi, int nqty, int permute, int memory, int /*precision*/, - int usecollective, int usecuda_aware) + int usecollective, int usegpu_aware) { struct remap_plan_3d_kokkos *plan; @@ -238,7 +238,7 @@ struct remap_plan_3d_kokkos* RemapKokkos::remap_3d_creat plan = new struct remap_plan_3d_kokkos; if (plan == nullptr) return nullptr; plan->usecollective = usecollective; - plan->usecuda_aware = usecuda_aware; + plan->usegpu_aware = usegpu_aware; // store parameters in local data structs diff --git a/src/KOKKOS/remap_kokkos.h b/src/KOKKOS/remap_kokkos.h index a62c14f00b..77a3b1a37a 100644 --- a/src/KOKKOS/remap_kokkos.h +++ b/src/KOKKOS/remap_kokkos.h @@ -54,7 +54,7 @@ struct remap_plan_3d_kokkos { int usecollective; // use collective or point-to-point MPI int commringlen; // length of commringlist int *commringlist; // ranks on communication ring of this plan - int usecuda_aware; // use CUDA-Aware MPI or not + int usegpu_aware; // use GPU-Aware MPI or not }; template From 431788db496392af3505612a507e0ab2214e2b7d Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 11:31:16 -0700 Subject: [PATCH 83/89] Need bifactor duplicated code --- src/KOKKOS/fft3d_kokkos.cpp | 21 +++++++++++++++++++++ src/KOKKOS/fft3d_kokkos.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index d3814b204e..1f39e17326 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -805,6 +805,27 @@ void FFT3dKokkos::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk delete remapKK; } +/* ---------------------------------------------------------------------- + divide n into 2 factors of as equal size as possible +------------------------------------------------------------------------- */ + +template +void FFT3dKokkos::bifactor(int n, int *factor1, int *factor2) +{ + int n1,n2,facmax; + + facmax = static_cast (sqrt((double) n)); + + for (n1 = facmax; n1 > 0; n1--) { + n2 = n/n1; + if (n1*n2 == n) { + *factor1 = n1; + *factor2 = n2; + return; + } + } +} + /* ---------------------------------------------------------------------- perform just the 1d FFTs needed by a 3d FFT, no data movement used for timing purposes diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index a7349878ec..ed49c4b1ee 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -106,6 +106,8 @@ class FFT3dKokkos : protected Pointers { void fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokkos *); void fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_1d, int, int, struct fft_plan_3d_kokkos *); + + void bifactor(int, int *, int *); }; } From 46b39d2ca4877c8fefb20a6ff8ab5b78ed597541 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 12:07:48 -0700 Subject: [PATCH 84/89] Add warning --- src/KOKKOS/fft3d_kokkos.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 1f39e17326..e9ab095de9 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -69,6 +69,13 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int if (stack_size < 2048) cudaDeviceSetLimit(cudaLimitStackSize,2048); #endif + + #if defined (LMP_KOKKOS_GPU) + int me; + MPI_Comm_rank(comm,&me); + if (me == 0) + lmp->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); + #endif #endif plan = fft_3d_create_plan_kokkos(comm,nfast,nmid,nslow, From beaab56826b9ed9f967f30ba6b717dea81fa2428 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 12:08:00 -0700 Subject: [PATCH 85/89] Move define checks --- src/KOKKOS/pppm_kokkos.h | 30 ------------------------------ src/lmpfftsettings.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index 14d4670dbd..d29f036d45 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -33,36 +33,6 @@ KSpaceStyle(pppm/kk/host,PPPMKokkos); // clang-format off -// fix up FFT defines for KOKKOS with CUDA and HIP - -#ifdef KOKKOS_ENABLE_CUDA -# if defined(FFT_KOKKOS_FFTW) -# undef FFT_KOKKOS_FFTW -# endif -# if defined(FFT_KOKKOS_FFTW3) -# undef FFT_KOKKOS_FFTW3 -# endif -# if defined(FFT_KOKKOS_MKL) -# undef FFT_KOKKOS_MKL -# endif -# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT -# endif -#elif defined(KOKKOS_ENABLE_HIP) -# if defined(FFT_KOKKOS_FFTW) -# undef FFT_KOKKOS_FFTW -# endif -# if defined(FFT_KOKKOS_FFTW3) -# undef FFT_KOKKOS_FFTW3 -# endif -# if defined(FFT_KOKKOS_MKL) -# undef FFT_KOKKOS_MKL -# endif -# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT -# endif -#endif - #include "pppm.h" namespace LAMMPS_NS { diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index b4e4f15c6b..56314bf9c5 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -20,6 +20,7 @@ #ifdef FFT_FFTW #ifndef FFT_FFTW3 +#undef FFT_FFTW #define FFT_FFTW3 #endif #endif @@ -27,6 +28,7 @@ #ifdef LMP_KOKKOS #ifdef FFT_KOKKOS_FFTW #ifndef FFT_KOKKOS_FFTW3 +#undef FFT_KOKKOS_FFTW #define FFT_KOKKOS_FFTW3 #endif #endif @@ -55,6 +57,37 @@ #endif #ifdef LMP_KOKKOS + +// fix up FFT defines for KOKKOS with CUDA and HIP + +#ifdef KOKKOS_ENABLE_CUDA +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW +# endif +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 +# endif +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL +# endif +# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT +# endif +#elif defined(KOKKOS_ENABLE_HIP) +# if defined(FFT_KOKKOS_FFTW) +# undef FFT_KOKKOS_FFTW +# endif +# if defined(FFT_KOKKOS_FFTW3) +# undef FFT_KOKKOS_FFTW3 +# endif +# if defined(FFT_KOKKOS_MKL) +# undef FFT_KOKKOS_MKL +# endif +# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) +# define FFT_KOKKOS_KISSFFT +# endif +#endif + #if defined(FFT_KOKKOS_CUFFT) #define LMP_FFT_KOKKOS_LIB "cuFFT" #elif defined(FFT_KOKKOS_HIPFFT) From 5adbc09b71f285d7781906cd2a540c19a4c1cc10 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 6 Feb 2024 12:33:01 -0700 Subject: [PATCH 86/89] Move warning to avoid multiple instances --- src/KOKKOS/fft3d_kokkos.cpp | 7 ------- src/KOKKOS/pppm_kokkos.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index e9ab095de9..1f39e17326 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -69,13 +69,6 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int if (stack_size < 2048) cudaDeviceSetLimit(cudaLimitStackSize,2048); #endif - - #if defined (LMP_KOKKOS_GPU) - int me; - MPI_Comm_rank(comm,&me); - if (me == 0) - lmp->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); - #endif #endif plan = fft_3d_create_plan_kokkos(comm,nfast,nmid,nslow, diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index b83c7e0313..6a2618642b 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -20,6 +20,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" +#include "comm.h" #include "domain.h" #include "error.h" #include "fft3d_kokkos.h" @@ -105,6 +106,13 @@ PPPMKokkos::PPPMKokkos(LAMMPS *lmp) : PPPM(lmp) fft1 = nullptr; fft2 = nullptr; remap = nullptr; + +#if defined (LMP_KOKKOS_GPU) + #if defined(FFT_KOKKOS_KISSFFT) + if (comm->me == 0) + error->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); + #endif +#endif } /* ---------------------------------------------------------------------- From 19a5de1be6c1d1d7c02ee2a430f99d5c6904f168 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 15:11:31 -0500 Subject: [PATCH 87/89] silence compiler warning --- src/KSPACE/msm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 57d16006d1..60bb768911 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -1602,8 +1602,7 @@ void MSM::direct(int n) qtmp = qgridn[icz][icy][icx]; // charge on center grid point esum = 0.0; - if (vflag_either && !scalar_pressure_flag) - v0sum = v1sum = v2sum = v3sum = v4sum = v5sum = 0.0; + v0sum = v1sum = v2sum = v3sum = v4sum = v5sum = 0.0; // use hemisphere to avoid double computation of pair-wise // interactions in direct sum (no computations in -z direction) From 2f4dbdceb6465d2180cd0c5b399a999708409b42 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 13:28:33 -0700 Subject: [PATCH 88/89] Remove redundant checks --- src/KOKKOS/fftdata_kokkos.h | 48 ------------------------------------- src/lmpfftsettings.h | 26 ++++++++++++++------ 2 files changed, 19 insertions(+), 55 deletions(-) diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index c0a223478c..f994639106 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -27,54 +27,6 @@ // ------------------------------------------------------------------------- -// with KOKKOS in CUDA or HIP mode we can only have -// CUFFT/HIPFFT or KISSFFT, thus undefine all other -// FFTs here, since they may be valid in fft3d.cpp - -#ifdef KOKKOS_ENABLE_CUDA -# if defined(FFT_KOKKOS_FFTW) -# undef FFT_KOKKOS_FFTW -# endif -# if defined(FFT_KOKKOS_FFTW3) -# undef FFT_KOKKOS_FFTW3 -# endif -# if defined(FFT_KOKKOS_MKL) -# undef FFT_KOKKOS_MKL -# endif -# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT -# endif -#elif defined(KOKKOS_ENABLE_HIP) -# if defined(FFT_KOKKOS_FFTW) -# undef FFT_KOKKOS_FFTW -# endif -# if defined(FFT_KOKKOS_FFTW3) -# undef FFT_KOKKOS_FFTW3 -# endif -# if defined(FFT_KOKKOS_MKL) -# undef FFT_KOKKOS_MKL -# endif -# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT -# endif -#else -# if defined(FFT_KOKKOS_CUFFT) -# error "Must enable CUDA with KOKKOS to use -DFFT_KOKKOS_CUFFT" -# endif -# if defined(FFT_KOKKOS_HIPFFT) -# error "Must enable HIP with KOKKOS to use -DFFT_KOKKOS_HIPFFT" -# endif -// if user set FFTW, it means FFTW3 -# ifdef FFT_KOKKOS_FFTW -# define FFT_KOKKOS_FFTW3 -# endif -# ifdef FFT_KOKKOS_FFTW_THREADS -# if !defined(FFT_KOKKOS_FFTW3) -# error "Must use -DFFT_KOKKOS_FFTW3 with -DFFT_KOKKOS_FFTW_THREADS" -# endif -# endif -#endif - #if defined(FFT_KOKKOS_MKL) #include "mkl_dfti.h" #if defined(FFT_SINGLE) diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 56314bf9c5..b1a4cffa00 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -26,12 +26,15 @@ #endif #ifdef LMP_KOKKOS -#ifdef FFT_KOKKOS_FFTW -#ifndef FFT_KOKKOS_FFTW3 -#undef FFT_KOKKOS_FFTW -#define FFT_KOKKOS_FFTW3 -#endif -#endif +# ifdef FFT_KOKKOS_FFTW +# undef FFT_KOKKOS_FFTW +# define FFT_KOKKOS_FFTW3 +# endif +# ifdef FFT_KOKKOS_FFTW_THREADS +# if !defined(FFT_KOKKOS_FFTW3) +# error "Must use -DFFT_KOKKOS_FFTW3 with -DFFT_KOKKOS_FFTW_THREADS" +# endif +# endif #endif // set strings for library info output @@ -58,7 +61,9 @@ #ifdef LMP_KOKKOS -// fix up FFT defines for KOKKOS with CUDA and HIP +// with KOKKOS in CUDA or HIP mode we can only have +// CUFFT/HIPFFT or KISSFFT, thus undefine all other +// FFTs here #ifdef KOKKOS_ENABLE_CUDA # if defined(FFT_KOKKOS_FFTW) @@ -86,6 +91,13 @@ # if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) # define FFT_KOKKOS_KISSFFT # endif +#else +# if defined(FFT_KOKKOS_CUFFT) +# error "Must enable CUDA with KOKKOS to use -DFFT_KOKKOS_CUFFT" +# endif +# if defined(FFT_KOKKOS_HIPFFT) +# error "Must enable HIP with KOKKOS to use -DFFT_KOKKOS_HIPFFT" +# endif #endif #if defined(FFT_KOKKOS_CUFFT) From c1024c811f128d21da3bddc0bbf7159141a3b565 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 6 Feb 2024 14:05:04 -0700 Subject: [PATCH 89/89] Fix name issue --- src/KOKKOS/fft3d_kokkos.cpp | 6 +++--- src/KOKKOS/fft3d_kokkos.h | 2 +- src/KOKKOS/fftdata_kokkos.h | 6 +++--- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/lmpfftsettings.h | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 1f39e17326..1610ae9b4e 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -58,7 +58,7 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int if (ngpus > 0 && execution_space == Host) lmp->error->all(FLERR,"Cannot use the hipFFT library with Kokkos on the host CPUs"); -#elif defined(FFT_KOKKOS_KISSFFT) +#elif defined(FFT_KOKKOS_KISS) // The compiler can't statically determine the stack size needed for // recursive function calls in KISS FFT and the default per-thread // stack size on GPUs needs to be increased to prevent stack overflows @@ -163,7 +163,7 @@ public: } }; -#ifdef FFT_KOKKOS_KISSFFT +#ifdef FFT_KOKKOS_KISS template struct kiss_fft_functor { public: @@ -797,7 +797,7 @@ void FFT3dKokkos::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk FFTW_API(cleanup_threads)(); #endif -#elif defined (FFT_KOKKOS_KISSFFT) +#elif defined (FFT_KOKKOS_KISS) delete kissfftKK; #endif diff --git a/src/KOKKOS/fft3d_kokkos.h b/src/KOKKOS/fft3d_kokkos.h index ed49c4b1ee..48b0fd76de 100644 --- a/src/KOKKOS/fft3d_kokkos.h +++ b/src/KOKKOS/fft3d_kokkos.h @@ -92,7 +92,7 @@ class FFT3dKokkos : protected Pointers { struct fft_plan_3d_kokkos *plan; RemapKokkos *remapKK; -#ifdef FFT_KOKKOS_KISSFFT +#ifdef FFT_KOKKOS_KISS KissFFTKokkos *kissfftKK; #endif diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index f994639106..439a914e3a 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -77,8 +77,8 @@ kiss_fft_scalar re; kiss_fft_scalar im; } FFT_KOKKOS_DATA; - #ifndef FFT_KOKKOS_KISSFFT - #define FFT_KOKKOS_KISSFFT + #ifndef FFT_KOKKOS_KISS + #define FFT_KOKKOS_KISS #endif #endif @@ -159,7 +159,7 @@ typedef struct FFTArrayTypes FFT_DAT; typedef struct FFTArrayTypes FFT_HAT; -#if defined(FFT_KOKKOS_KISSFFT) +#if defined(FFT_KOKKOS_KISS) #include "kissfft_kokkos.h" // uses t_FFT_DATA_1d, needs to come last #endif diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 6a2618642b..73e2c1f06f 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -108,7 +108,7 @@ PPPMKokkos::PPPMKokkos(LAMMPS *lmp) : PPPM(lmp) remap = nullptr; #if defined (LMP_KOKKOS_GPU) - #if defined(FFT_KOKKOS_KISSFFT) + #if defined(FFT_KOKKOS_KISS) if (comm->me == 0) error->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); #endif diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index b1a4cffa00..a5ed057d97 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -62,7 +62,7 @@ #ifdef LMP_KOKKOS // with KOKKOS in CUDA or HIP mode we can only have -// CUFFT/HIPFFT or KISSFFT, thus undefine all other +// CUFFT/HIPFFT or KISS, thus undefine all other // FFTs here #ifdef KOKKOS_ENABLE_CUDA @@ -75,8 +75,8 @@ # if defined(FFT_KOKKOS_MKL) # undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT +# if !defined(FFT_KOKKOS_CUFFT) && !defined(FFT_KOKKOS_KISS) +# define FFT_KOKKOS_KISS # endif #elif defined(KOKKOS_ENABLE_HIP) # if defined(FFT_KOKKOS_FFTW) @@ -88,8 +88,8 @@ # if defined(FFT_KOKKOS_MKL) # undef FFT_KOKKOS_MKL # endif -# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISSFFT) -# define FFT_KOKKOS_KISSFFT +# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISS) +# define FFT_KOKKOS_KISS # endif #else # if defined(FFT_KOKKOS_CUFFT)