From 40c18ef53d4f70ab74c2c09b46a8477c6794196b Mon Sep 17 00:00:00 2001 From: "Goldman, Nir" Date: Mon, 22 Apr 2024 15:13:00 -0700 Subject: [PATCH 1/2] Fixes previous issue with incorrect neighbor list generation for non-orthorhombic simulation cells. --- .../src/serial_chimes_interface.cpp | 47 +++++++++++++++---- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/serial_interface/src/serial_chimes_interface.cpp b/serial_interface/src/serial_chimes_interface.cpp index 27d7538..b88a59b 100644 --- a/serial_interface/src/serial_chimes_interface.cpp +++ b/serial_interface/src/serial_chimes_interface.cpp @@ -574,6 +574,28 @@ void simulation_system::build_layered_system(vector & atmtyps, vector & poly_orders, vector > & neighlist_2b, vector > & neighlist_3b, vector > & neighlist_4b, double max_2b_cut, double max_3b_cut, double max_4b_cut) { + vector maxpos(3, -1.0e100) ; + vector minpos(3, +1.0e100) ; + + // Determine limits on position of all particles. + for(int i=0; i maxpos[0] ) + maxpos[0] = sys_x[i] ; + if ( sys_y[i] > maxpos[1] ) + maxpos[1] = sys_y[i] ; + if ( sys_z[i] > maxpos[2] ) + maxpos[2] = sys_z[i] ; + + if ( sys_x[i] < minpos[0] ) + minpos[0] = sys_x[i] ; + if ( sys_y[i] < minpos[1] ) + minpos[1] = sys_y[i] ; + if ( sys_z[i] < minpos[2] ) + minpos[2] = sys_z[i] ; + + } + // Make the 2b neighbor lists neighlist_2b.resize(n_ghost); @@ -594,10 +616,15 @@ void simulation_system::build_neigh_lists(vector & poly_orders, vector & poly_orders, vector & poly_orders, vector Date: Mon, 22 Apr 2024 15:47:29 -0700 Subject: [PATCH 2/2] Fixed error in fortran_instance/Makefile test directory that was causing failure in run_tests.sh for MAKEFILE tests only. CMAKE tests were not affected by the issue. --- serial_interface/examples/fortran_instance/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serial_interface/examples/fortran_instance/Makefile b/serial_interface/examples/fortran_instance/Makefile index e9ec893..c246a26 100644 --- a/serial_interface/examples/fortran_instance/Makefile +++ b/serial_interface/examples/fortran_instance/Makefile @@ -1,5 +1,5 @@ -CXX = g++ -g -std=c++11 -fPIC -FCC = gfortran -g -fPIC -std=f2008 -cpp # last flag allows processing of C-style pre-processor directives +CXX = g++ -O3 -std=c++11 -fPIC +FCC = gfortran -O3 -fPIC -std=f2003 -cpp # last flag allows processing of C-style pre-processor directives DEBUG = 1 VERBOSE = 1