From ead6264ab7e8270f09947ddb355762ed36dabb14 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 4 Feb 2022 14:25:13 +0000 Subject: [PATCH 01/79] Bug fix: epsilon[] etc should be extent 3 --- tests/unit/test_pair_ss_cut_ij.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_pair_ss_cut_ij.c b/tests/unit/test_pair_ss_cut_ij.c index f1afd6709..91ab8641a 100644 --- a/tests/unit/test_pair_ss_cut_ij.c +++ b/tests/unit/test_pair_ss_cut_ij.c @@ -57,10 +57,10 @@ int test_pair_ss_cut_ij_create(pe_t * pe, cs_t * cs) { pair_ss_cut_ij_t * obj = NULL; - double epsilon[2] = {}; - double sigma[2] = {}; - double nu[2] = {}; - double hc[2] = {}; + double epsilon[3] = {}; + double sigma[3] = {}; + double nu[3] = {}; + double hc[3] = {}; pair_ss_cut_ij_create(pe, cs, 2, epsilon, sigma, nu, hc, &obj); assert(obj); From 31ce6e63dedc8a5d81e9a53dfcc2a1c2e580b6e4 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 16 May 2022 16:16:31 +0100 Subject: [PATCH 02/79] Remove duplicated test files --- tests/regression/d3q19-short-gpu/Makefile | 26 -- tests/regression/d3q19-short-gpu/README | 22 -- .../d3q19-short-gpu/serial-actv-s01.inp | 1 - .../d3q19-short-gpu/serial-actv-s01.log | 154 ------------ .../d3q19-short-gpu/serial-actv-s02.inp | 1 - .../d3q19-short-gpu/serial-actv-s02.log | 154 ------------ .../d3q19-short-gpu/serial-bond-c01.inp | 1 - .../d3q19-short-gpu/serial-bond-c01.log | 1 - .../d3q19-short-gpu/serial-bond-c02.inp | 1 - .../d3q19-short-gpu/serial-bond-c02.log | 1 - .../d3q19-short-gpu/serial-chol-n01.inp | 1 - .../d3q19-short-gpu/serial-chol-n01.log | 1 - .../d3q19-short-gpu/serial-chol-n02.inp | 1 - .../d3q19-short-gpu/serial-chol-n02.log | 1 - .../d3q19-short-gpu/serial-chol-n03.inp | 1 - .../d3q19-short-gpu/serial-chol-n03.log | 1 - .../d3q19-short-gpu/serial-chol-n04.inp | 1 - .../d3q19-short-gpu/serial-chol-n04.log | 1 - .../d3q19-short-gpu/serial-chol-p01.inp | 1 - .../d3q19-short-gpu/serial-chol-p01.log | 1 - .../d3q19-short-gpu/serial-chol-st1.inp | 1 - .../d3q19-short-gpu/serial-chol-st1.log | 222 ------------------ .../d3q19-short-gpu/serial-chol-st2.inp | 1 - .../d3q19-short-gpu/serial-chol-st2.log | 222 ------------------ .../d3q19-short-gpu/serial-chol-w01.inp | 1 - .../d3q19-short-gpu/serial-chol-w01.log | 1 - .../d3q19-short-gpu/serial-chol-w02.inp | 1 - .../d3q19-short-gpu/serial-chol-w02.log | 1 - .../d3q19-short-gpu/serial-chol-w03.inp | 1 - .../d3q19-short-gpu/serial-chol-w03.log | 1 - .../d3q19-short-gpu/serial-chol-w04.inp | 1 - .../d3q19-short-gpu/serial-chol-w04.log | 175 -------------- .../d3q19-short-gpu/serial-chol-w05.inp | 1 - .../d3q19-short-gpu/serial-chol-w05.log | 175 -------------- .../d3q19-short-gpu/serial-coll-st1.inp | 1 - .../d3q19-short-gpu/serial-coll-st1.log | 138 ----------- .../d3q19-short-gpu/serial-dist-1dp.inp | 1 - .../d3q19-short-gpu/serial-dist-1dp.log | 102 -------- .../d3q19-short-gpu/serial-dist-2kh.inp | 1 - .../d3q19-short-gpu/serial-dist-2kh.log | 1 - .../d3q19-short-gpu/serial-dist-2sw.inp | 1 - .../d3q19-short-gpu/serial-dist-2sw.log | 102 -------- .../d3q19-short-gpu/serial-dist-3du.inp | 1 - .../d3q19-short-gpu/serial-dist-3du.log | 102 -------- .../d3q19-short-gpu/serial-ewld-s01.inp | 1 - .../d3q19-short-gpu/serial-ewld-s01.log | 1 - .../d3q19-short-gpu/serial-fene-st1.inp | 1 - .../d3q19-short-gpu/serial-fene-st1.log | 150 ------------ .../d3q19-short-gpu/serial-fene-st2.inp | 1 - .../d3q19-short-gpu/serial-fene-st2.log | 157 ------------- .../d3q19-short-gpu/serial-fene-st3.inp | 1 - .../d3q19-short-gpu/serial-fene-st3.log | 164 ------------- .../d3q19-short-gpu/serial-init-bp1.inp | 1 - .../d3q19-short-gpu/serial-init-bp1.log | 151 ------------ .../d3q19-short-gpu/serial-init-bp2.inp | 1 - .../d3q19-short-gpu/serial-init-bp2.log | 151 ------------ .../d3q19-short-gpu/serial-init-lcb.inp | 1 - .../d3q19-short-gpu/serial-init-lcb.log | 153 ------------ .../d3q19-short-gpu/serial-init-lcr.inp | 1 - .../d3q19-short-gpu/serial-init-lcr.log | 151 ------------ .../d3q19-short-gpu/serial-relx-bp1.inp | 1 - .../d3q19-short-gpu/serial-relx-bp1.log | 137 ----------- .../d3q19-short-gpu/serial-rest-c01.inp | 1 - .../d3q19-short-gpu/serial-rest-c01.log | 1 - .../d3q19-short-gpu/serial-rest-c02.inp | 1 - .../d3q19-short-gpu/serial-rest-c02.log | 134 ----------- .../d3q19-short-gpu/serial-spin-c02.inp | 1 - .../d3q19-short-gpu/serial-spin-c02.log | 1 - .../d3q19-short-gpu/serial-spin-fd1.inp | 1 - .../d3q19-short-gpu/serial-spin-fd1.log | 1 - .../d3q19-short-gpu/serial-spin-fd2.inp | 1 - .../d3q19-short-gpu/serial-spin-fd2.log | 1 - .../d3q19-short-gpu/serial-spin-lb1.inp | 1 - .../d3q19-short-gpu/serial-spin-lb1.log | 1 - .../d3q19-short-gpu/serial-spin-lb2.inp | 1 - .../d3q19-short-gpu/serial-spin-lb2.log | 133 ----------- .../d3q19-short-gpu/serial-spin-n02.inp | 1 - .../d3q19-short-gpu/serial-spin-n02.log | 1 - .../d3q19-short-gpu/serial-sqmr-st1.inp | 1 - .../d3q19-short-gpu/serial-sqmr-st1.log | 138 ----------- .../d3q19-short-gpu/serial-sqmr-st2.inp | 1 - .../d3q19-short-gpu/serial-sqmr-st2.log | 150 ------------ .../d3q19-short-gpu/serial-symm-dr1.inp | 1 - .../d3q19-short-gpu/serial-symm-dr1.log | 1 - .../d3q19-short-gpu/serial-symm-dr2.inp | 1 - .../d3q19-short-gpu/serial-symm-dr2.log | 1 - .../d3q19-short-gpu/serial-symm-pat.inp | 1 - .../d3q19-short-gpu/serial-symm-pat.log | 1 - .../d3q19-short-gpu/serial-wall-st1.inp | 1 - .../d3q19-short-gpu/serial-wall-st1.log | 113 --------- .../d3q19-short-gpu/serial-wall-st2.inp | 1 - .../d3q19-short-gpu/serial-wall-st2.log | 149 ------------ .../d3q19-short-gpu/serial-wall-st3.inp | 1 - .../d3q19-short-gpu/serial-wall-st3.log | 149 ------------ .../d3q19-short-gpu/serial-wall-st4.inp | 1 - .../d3q19-short-gpu/serial-wall-st4.log | 149 ------------ 96 files changed, 3991 deletions(-) delete mode 100644 tests/regression/d3q19-short-gpu/Makefile delete mode 100644 tests/regression/d3q19-short-gpu/README delete mode 120000 tests/regression/d3q19-short-gpu/serial-actv-s01.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-actv-s01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-actv-s02.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-actv-s02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-bond-c01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-bond-c01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-bond-c02.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-bond-c02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n02.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n03.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n03.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n04.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-n04.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-p01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-p01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-st1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-chol-st1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-st2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-chol-st2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w02.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w03.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w03.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w04.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-chol-w04.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-chol-w05.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-chol-w05.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-coll-st1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-coll-st1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-dist-1dp.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-dist-1dp.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-dist-2kh.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-dist-2kh.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-dist-2sw.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-dist-2sw.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-dist-3du.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-dist-3du.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-ewld-s01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-ewld-s01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-fene-st1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-fene-st1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-fene-st2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-fene-st2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-fene-st3.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-fene-st3.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-init-bp1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-init-bp1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-init-bp2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-init-bp2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-init-lcb.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-init-lcb.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-init-lcr.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-init-lcr.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-relx-bp1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-relx-bp1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-rest-c01.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-rest-c01.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-rest-c02.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-rest-c02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-c02.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-c02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-fd1.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-fd1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-fd2.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-fd2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-lb1.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-lb1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-lb2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-spin-lb2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-n02.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-spin-n02.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-sqmr-st1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-sqmr-st1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-sqmr-st2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-sqmr-st2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-dr1.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-dr1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-dr2.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-dr2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-pat.inp delete mode 120000 tests/regression/d3q19-short-gpu/serial-symm-pat.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-wall-st1.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-wall-st1.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-wall-st2.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-wall-st2.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-wall-st3.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-wall-st3.log delete mode 120000 tests/regression/d3q19-short-gpu/serial-wall-st4.inp delete mode 100644 tests/regression/d3q19-short-gpu/serial-wall-st4.log diff --git a/tests/regression/d3q19-short-gpu/Makefile b/tests/regression/d3q19-short-gpu/Makefile deleted file mode 100644 index 4c05f96f1..000000000 --- a/tests/regression/d3q19-short-gpu/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -############################################################################### -# -# Makefile -# -# D3Q19 short regression tests. "Short" is not more than 10 seconds -# on a single thread (with assertions). -# -############################################################################### - -include ../../../Makefile.mk - -ifeq (${BUILD},parallel) -MPIRUN_NTASKS=1 -endif - -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPIRUN_CMD} ${MPIRUN_NTASK_FLAG} ${MPIRUN_NTASKS} - - -test: - @echo "TEST --> regression tests serial" - inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "${SER}" "${PAR}"; done - -clean: - rm -f *new test-diff* *meta *001-001 diff --git a/tests/regression/d3q19-short-gpu/README b/tests/regression/d3q19-short-gpu/README deleted file mode 100644 index 7ae940eb7..000000000 --- a/tests/regression/d3q19-short-gpu/README +++ /dev/null @@ -1,22 +0,0 @@ -This is the current state of the tests cf those in d3q19-short. -The missing tests here are: - -serial-chol-st3.inp LE planes -serial-chol-st4.inp LE planes -serial-chol-st5.inp LE planes -serial-chol-st6.inp LE planes - -serial-drop-lc1.inp Line 941 (hydro.c): cudaErrorIllegalAddress: -serial-drop-lc2.inp All same. -serial-drop-lc3.inp -serial-drop-lc4.inp - -All Lees Edwards cases - -serial-pola-r01.inp polar active - -serial-rest-ec1.inp fe_electro -serial-rest-ec2.inp fe_electro - -serial-spin-c01.inp Bus error -serial-spin-n01.inp wrong result diff --git a/tests/regression/d3q19-short-gpu/serial-actv-s01.inp b/tests/regression/d3q19-short-gpu/serial-actv-s01.inp deleted file mode 120000 index 72d587bf1..000000000 --- a/tests/regression/d3q19-short-gpu/serial-actv-s01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-actv-s01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-actv-s01.log b/tests/regression/d3q19-short-gpu/serial-actv-s01.log deleted file mode 100644 index 1c14ca51e..000000000 --- a/tests/regression/d3q19-short-gpu/serial-actv-s01.log +++ /dev/null @@ -1,154 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 32 user parameters from serial-actv-s01.inp - -System details --------------- -System size: 64 64 1 -Decomposition: 1 1 1 -Local domain: 64 64 1 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e+00 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 0.0000000e+00 -... gives pitch length = inf -Elastic constant kappa0 = 4.0000000e-02 -Elastic constant kappa1 = 4.0000000e-02 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 0.0000000e+00 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity Yes -Activity constant zeta0 = 3.3333333e-01 -Activity constant zeta1 = 5.0000000e-03 -Activity constant zeta2 = 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 3.3750000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.33330e+00 -Bulk viscosity 1.33330e+00 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 4.49990e+00 -Bulk relaxation time: 4.49990e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab to quasi-2d with strip parallel to Y -Initial conditions. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -6.2059650e+02 -1.5151282e-01 7.1188129e-03 -1.6666667e-01 3.1825649e-01 -[phi] -3.6082248e-16 -8.8091427e-20 2.2847222e-04 -8.5505036e-02 8.5505036e-02 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 1.3032632e+03 3.1817948e-01 7.1188129e-03 -1.5158982e-01 3.3333333e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Momentum - x y z -[total ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 2.1166918e-06 0.98789531168 1.00580926654 -[phi] -6.2429132e+02 -1.5241487e-01 5.5639370e-03 -1.6702433e-01 2.8093481e-01 -[phi] 7.6049130e-16 1.8566682e-19 4.5406352e-04 -1.2374555e-01 1.2374555e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 1.3036556e+03 3.1827530e-01 5.9054578e-03 -1.2835456e-01 3.3386466e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 20 -2.7835856233e+01 4.0960000000e+03 -6.7958633380e-03 -6.9138978555e-03 1.1803451752e-04 1.0000000000e+00 - -Momentum - x y z -[total ] -1.0179357e-14 -1.7832957e-14 0.0000000e+00 -[fluid ] -1.0179357e-14 -1.7832957e-14 0.0000000e+00 - -Velocity - x y z -[minimum ] -2.3298341e-03 -5.5100697e-03 0.0000000e+00 -[maximum ] 2.3298341e-03 5.5100697e-03 1.1754944e-38 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.540 0.540 0.540 0.540000 (1 call) - Time step loop: 0.000 0.020 0.270 0.013500 (20 calls) - Propagation: 0.000 0.000 0.000 0.000000 (20 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Collision: 0.000 0.010 0.010 0.000500 (20 calls) - Collision (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Lattice halos: 0.000 0.020 0.050 0.002500 (20 calls) - phi gradients: 0.000 0.020 0.130 0.006500 (20 calls) - phi grad (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - phi halos: 0.000 0.020 0.120 0.006000 (20 calls) - BBL: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.010 0.010 0.000500 (20 calls) - Phi force (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - phi update: 0.000 0.020 0.070 0.003500 (20 calls) - Velocity Halo : 0.000 0.010 0.010 0.000500 (20 calls) -BE mol field (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) -BP BE update (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Advectn BCS (krnl) : 0.000 0.010 0.030 0.001500 (20 calls) - Free1: 0.000 0.010 0.010 0.000500 (20 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-actv-s02.inp b/tests/regression/d3q19-short-gpu/serial-actv-s02.inp deleted file mode 120000 index 07c9adc3b..000000000 --- a/tests/regression/d3q19-short-gpu/serial-actv-s02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-actv-s02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-actv-s02.log b/tests/regression/d3q19-short-gpu/serial-actv-s02.log deleted file mode 100644 index a81d3d0e8..000000000 --- a/tests/regression/d3q19-short-gpu/serial-actv-s02.log +++ /dev/null @@ -1,154 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 32 user parameters from serial-actv-s02.inp - -System details --------------- -System size: 64 64 1 -Decomposition: 1 1 1 -Local domain: 64 64 1 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e+00 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 0.0000000e+00 -... gives pitch length = inf -Elastic constant kappa0 = 4.0000000e-02 -Elastic constant kappa1 = 4.0000000e-02 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 0.0000000e+00 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity Yes -Activity constant zeta0 = 3.3333333e-01 -Activity constant zeta1 = 5.0000000e-02 -Activity constant zeta2 = 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 3.3750000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.33330e+00 -Bulk viscosity 1.33330e+00 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 4.49990e+00 -Bulk relaxation time: 4.49990e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab to quasi-2d with strip parallel to Y -Initial conditions. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -6.2059650e+02 -1.5151282e-01 7.1188129e-03 -1.6666667e-01 3.1825649e-01 -[phi] -3.6082248e-16 -8.8091427e-20 2.2847222e-04 -8.5505036e-02 8.5505036e-02 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 1.3032632e+03 3.1817948e-01 7.1188129e-03 -1.5158982e-01 3.3333333e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Momentum - x y z -[total ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 6.9021590e-05 0.94703141779 1.01928719360 -[phi] -6.2562059e+02 -1.5273940e-01 5.2634346e-03 -1.6776749e-01 2.8546866e-01 -[phi] -2.6308556e-16 -6.4229874e-20 6.8345581e-04 -1.5507906e-01 1.5507906e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 1.3052116e+03 3.1865516e-01 5.5474665e-03 -1.3107958e-01 3.3505841e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 20 -2.7856522638e+01 4.0960000000e+03 -6.8009088471e-03 -6.9151716814e-03 1.1426283429e-04 1.0000000000e+00 - -Momentum - x y z -[total ] 2.0945051e-14 -1.7368051e-14 0.0000000e+00 -[fluid ] 2.0945051e-14 -1.7368051e-14 0.0000000e+00 - -Velocity - x y z -[minimum ] -6.8273352e-03 -1.3469543e-02 0.0000000e+00 -[maximum ] 6.8273352e-03 1.3469543e-02 1.1754944e-38 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.510 0.510 0.510 0.510000 (1 call) - Time step loop: 0.010 0.030 0.260 0.013000 (20 calls) - Propagation: 0.000 0.000 0.000 0.000000 (20 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Collision: 0.000 0.000 0.000 0.000000 (20 calls) - Collision (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Lattice halos: 0.000 0.010 0.010 0.000500 (20 calls) - phi gradients: 0.000 0.020 0.180 0.009000 (20 calls) - phi grad (krnl) : 0.000 0.010 0.020 0.001000 (20 calls) - phi halos: 0.000 0.010 0.130 0.006500 (20 calls) - BBL: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.020 0.040 0.002000 (20 calls) - Phi force (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - phi update: 0.000 0.010 0.030 0.001500 (20 calls) - Velocity Halo : 0.000 0.010 0.020 0.001000 (20 calls) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Advectn BCS (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Free1: 0.000 0.020 0.020 0.001000 (20 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-bond-c01.inp b/tests/regression/d3q19-short-gpu/serial-bond-c01.inp deleted file mode 120000 index c0f7806e4..000000000 --- a/tests/regression/d3q19-short-gpu/serial-bond-c01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-bond-c01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-bond-c01.log b/tests/regression/d3q19-short-gpu/serial-bond-c01.log deleted file mode 120000 index 085c13bc9..000000000 --- a/tests/regression/d3q19-short-gpu/serial-bond-c01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-bond-c01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-bond-c02.inp b/tests/regression/d3q19-short-gpu/serial-bond-c02.inp deleted file mode 120000 index 3528aa579..000000000 --- a/tests/regression/d3q19-short-gpu/serial-bond-c02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-bond-c02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-bond-c02.log b/tests/regression/d3q19-short-gpu/serial-bond-c02.log deleted file mode 120000 index 5adc7d4d9..000000000 --- a/tests/regression/d3q19-short-gpu/serial-bond-c02.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-bond-c02.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n01.inp b/tests/regression/d3q19-short-gpu/serial-chol-n01.inp deleted file mode 120000 index 37ef84af6..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n01.log b/tests/regression/d3q19-short-gpu/serial-chol-n01.log deleted file mode 120000 index 1ed6446f1..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n02.inp b/tests/regression/d3q19-short-gpu/serial-chol-n02.inp deleted file mode 120000 index 2661dff45..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n02.log b/tests/regression/d3q19-short-gpu/serial-chol-n02.log deleted file mode 120000 index 81ef2fb69..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n02.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n02.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n03.inp b/tests/regression/d3q19-short-gpu/serial-chol-n03.inp deleted file mode 120000 index b36ec5698..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n03.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n03.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n03.log b/tests/regression/d3q19-short-gpu/serial-chol-n03.log deleted file mode 120000 index 626397c24..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n03.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n03.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n04.inp b/tests/regression/d3q19-short-gpu/serial-chol-n04.inp deleted file mode 120000 index 6eb1e89ea..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n04.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n04.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-n04.log b/tests/regression/d3q19-short-gpu/serial-chol-n04.log deleted file mode 120000 index bd58eb9e7..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-n04.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-n04.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-p01.inp b/tests/regression/d3q19-short-gpu/serial-chol-p01.inp deleted file mode 120000 index 677dd25c4..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-p01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-p01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-p01.log b/tests/regression/d3q19-short-gpu/serial-chol-p01.log deleted file mode 120000 index c39fe6c95..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-p01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-p01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-st1.inp b/tests/regression/d3q19-short-gpu/serial-chol-st1.inp deleted file mode 120000 index 86bbad41a..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-st1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-st1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-st1.log b/tests/regression/d3q19-short-gpu/serial-chol-st1.log deleted file mode 100644 index 50dca6a0f..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-st1.log +++ /dev/null @@ -1,222 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 51 user parameters from serial-chol-st1.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0857143e+00 -Pitch wavevector q0 = 9.8174770e-02 -... gives pitch length = 6.4000000e+01 -Elastic constant kappa0 = 1.8971957e-02 -Elastic constant kappa1 = 1.8971957e-02 -Amplitude (uniaxial) order = 1.0000000e-04 -Effective aspect ratio xi = 0.0000000e+00 -Chirality = 7.9999999e-01 -Reduced temperature = -2.5000000e-01 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = normal -Anchoring type (walls): = normal -Surface free energy (colloid)w1: = 1.8971957e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 1.8971957e-03 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 1.0000000e-01 -Ratio (wall) w1/kappa0: = 1.0000000e-01 -Computed surface order f(gamma) = 3.5092360e-01 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-02 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.30000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 2 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_isfixedr 1 -colloid_one inactive -colloid_one_a0 2.3000000e+00 -colloid_one_ah 2.3000000e+00 -colloid_one_r 1.6250000e+01 1.5000000e+01 1.5000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -Requested second colloid via input: -colloid_two inactive -colloid_two_a0 2.3000000e+00 -colloid_two_ah 2.3000000e+00 -colloid_two_r 2.1305000e+01 1.5000000e+01 1.5000000e+01 -colloid_two_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 2 colloids - -Soft sphere potential -epsilon: 0.0000000e+00 -sigma: 1.0000000e-01 -exponent nu: 1.0000000e+00 -cut off (surface-surface) 2.5000000e-01 - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Hydrodynamic radius maximum: 2.3000000e+00 -Surface-surface interaction: 2.5000000e-01 -Centre-centre interaction: 0.0000000e+00 -Final cell list: 6 6 6 -Final cell lengths: 5.3333333e+00 5.3333333e+00 5.3333333e+00 - -Sedimentation force on: yes -Sedimentation force: -1.0000000e-02 0.0000000e+00 0.0000000e+00 - -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab randomly -Initial conditions. - -Scalars - total mean variance min max -[rho] 32663.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 1.1604113e-03 3.5526783e-08 2.0055948e-09 -5.0000000e-05 9.9999628e-05 -[phi] 1.0906567e-02 3.3391199e-07 1.5029505e-09 -7.4986395e-05 7.4987285e-05 -[phi] -1.6557474e-02 -5.0691836e-07 1.4928613e-09 -7.4994285e-05 7.4987352e-05 -[phi] -9.1437873e-03 -2.7994328e-07 1.9647331e-09 -5.0000000e-05 9.9995019e-05 -[phi] 2.1448907e-03 6.5667290e-08 1.5181251e-09 -7.4997452e-05 7.4998120e-05 - -Momentum - x y z -[total ] 4.5329018e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5329018e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: -Pair potential minimum h is: 4.4042689e-01 -Pair potential energy is: 0.0000000e+00 - -Colloid velocities - x y z -[minimum ] -1.4093227e-03 -3.1709857e-08 -4.1768345e-08 -[maximum ] -1.3941845e-03 6.7453707e-08 -9.4553996e-09 - -Scalars - total mean variance min max -[rho] 32662.00 1.00000000000 9.8038444e-10 0.99950225520 1.00032483656 -[phi] -2.3253103e-01 -7.1193140e-06 7.2047424e-08 -8.7209250e-03 9.7276954e-03 -[phi] 1.0763449e-02 3.2954043e-07 9.2035557e-08 -1.0627204e-02 1.0556469e-02 -[phi] -1.6512964e-02 -5.0557112e-07 9.2101818e-08 -1.0591286e-02 1.0606404e-02 -[phi] 1.0771971e-01 3.2980132e-06 1.0113391e-07 -5.8549799e-03 1.3610596e-02 -[phi] 2.1670320e-03 6.6347194e-08 1.3270983e-07 -1.3455774e-02 1.3464588e-02 - -Free energies - timestep f v f/v f_s a f_s/a -[fe] 20 8.5627643742e-04 3.2662000000e+04 2.6216289187e-08 3.5558486805e-02 2.1800000000e+02 1.6311232479e-04 - -Momentum - x y z -[total ] 4.4575454e-13 9.4860105e-15 1.7486868e-14 -[fluid ] 1.4903502e-01 -1.8996811e-06 2.5588599e-06 -[colloids] -1.4903502e-01 1.8996811e-06 -2.5588599e-06 - -Velocity - x y z -[minimum ] -1.4081449e-03 -5.8972384e-04 -5.8953478e-04 -[maximum ] 2.8948305e-04 5.8955723e-04 5.8949392e-04 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.950 0.950 0.950 0.950000 (1 call) - Time step loop: 0.020 0.040 0.590 0.029500 (20 calls) - Propagation: 0.000 0.010 0.050 0.002500 (20 calls) - Propagtn (krnl) : 0.000 0.010 0.030 0.001500 (20 calls) - Collision: 0.000 0.010 0.010 0.000500 (20 calls) - Collision (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Lattice halos: 0.000 0.010 0.110 0.002750 (40 calls) - phi gradients: 0.000 0.010 0.020 0.001000 (20 calls) - phi halos: 0.000 0.000 0.000 0.000000 (20 calls) - Forces: 0.000 0.010 0.010 0.000500 (20 calls) - Rebuild: 0.000 0.010 0.030 0.001500 (20 calls) - BBL: 0.000 0.010 0.070 0.003500 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.010 0.090 0.004500 (20 calls) - Phi force (krnl) : 0.000 0.010 0.070 0.003500 (20 calls) - phi update: 0.000 0.010 0.070 0.003500 (20 calls) - Velocity Halo : 0.000 0.010 0.010 0.000500 (20 calls) -BE mol field (krnl) : 0.000 0.010 0.030 0.001500 (20 calls) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Advectn (krnl) : 0.000 0.010 0.030 0.001500 (20 calls) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Free1: 0.000 0.070 0.070 0.001167 (60 calls) - Free3: 0.000 0.010 0.060 0.003000 (20 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-chol-st2.inp b/tests/regression/d3q19-short-gpu/serial-chol-st2.inp deleted file mode 120000 index a47aed794..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-st2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-st2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-st2.log b/tests/regression/d3q19-short-gpu/serial-chol-st2.log deleted file mode 100644 index 756b77fb3..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-st2.log +++ /dev/null @@ -1,222 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 45 user parameters from serial-chol-st2.inp - -System details --------------- -System size: 16 32 32 -Decomposition: 1 1 1 -Local domain: 16 32 32 -Periodic: 0 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0857143e+00 -Pitch wavevector q0 = 9.8174770e-02 -... gives pitch length = 6.4000000e+01 -Elastic constant kappa0 = 1.8971957e-02 -Elastic constant kappa1 = 1.8971957e-02 -Amplitude (uniaxial) order = 1.0000000e-04 -Effective aspect ratio xi = 0.0000000e+00 -Chirality = 7.9999999e-01 -Reduced temperature = -2.5000000e-01 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = normal -Anchoring type (walls): = normal -Surface free energy (colloid)w1: = 1.8971957e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 1.8971957e-03 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 1.0000000e-01 -Ratio (wall) w1/kappa0: = 1.0000000e-01 -Computed surface order f(gamma) = 3.5092360e-01 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-02 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.30000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 2 - -Boundary walls --------------- -Boundary walls: X - - -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 10240 -Memory (total, bytes): 163840 -Boundary shear initialise: 0 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one inactive -colloid_one_a0 2.3000000e+00 -colloid_one_ah 2.3000000e+00 -colloid_one_r 3.3100000e+00 1.2000000e+01 1.2000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Soft sphere potential -epsilon: 0.0000000e+00 -sigma: 1.0000000e-01 -exponent nu: 1.0000000e+00 -cut off (surface-surface) 2.5000000e-01 - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 4 8 8 -Final cell lengths: 4.0000000e+00 4.0000000e+00 4.0000000e+00 - -Sedimentation force on: yes -Sedimentation force: -1.0000000e-02 0.0000000e+00 0.0000000e+00 - -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab randomly -Initial conditions. - -Scalars - total mean variance min max -[rho] 16332.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 1.0145331e-04 6.2119344e-09 1.9970849e-09 -5.0000000e-05 9.9927698e-05 -[phi] 8.0005280e-03 4.8986824e-07 1.5016377e-09 -7.4981012e-05 7.4987285e-05 -[phi] -1.0191371e-02 -6.2401243e-07 1.5009586e-09 -7.4994285e-05 7.4987352e-05 -[phi] -5.1697246e-03 -3.1653959e-07 1.9621852e-09 -5.0000000e-05 9.9979055e-05 -[phi] -2.4078974e-04 -1.4743433e-08 1.5200098e-09 -7.4985154e-05 7.4998120e-05 - -Momentum - x y z -[total ] 2.2665203e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 2.2665203e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] -9.6693121e-04 -4.8028195e-08 2.2216962e-09 -[maximum ] -9.6693121e-04 -4.8028195e-08 2.2216962e-09 - -Scalars - total mean variance min max -[rho] 16331.00 1.00000000000 8.0200890e-10 0.99975796761 1.00102806657 -[phi] 1.3299377e+01 8.1436389e-04 4.0028897e-06 -8.7498846e-03 6.1220572e-03 -[phi] 7.9857001e-03 4.8899027e-07 8.8733714e-08 -1.0744226e-02 1.0750290e-02 -[phi] -1.0219360e-02 -6.2576451e-07 8.8608923e-08 -1.0785523e-02 1.0775357e-02 -[phi] -6.6548322e+00 -4.0749692e-04 1.0848011e-06 -6.0884448e-03 1.3677595e-02 -[phi] -2.2652574e-04 -1.3870905e-08 1.3305503e-07 -1.3459337e-02 1.3460328e-02 - -Free energies - timestep f v f/v f_s1 fs_s2 redshift -[fe] 20 1.2196018159e-02 1.6331000000e+04 7.4680167526e-07 1.7334752024e-01 1.7329399846e-01 1.0000000000e+00 - -Momentum - x y z -[total ] 2.2110785e-13 5.4803066e-15 -2.2906685e-15 -[fluid ] 6.1909599e-02 2.7831568e-05 1.9283245e-05 -[colloids] -5.1560548e-02 -2.4101223e-06 1.4674669e-07 -[walls ] -1.0349051e-02 -2.5421446e-05 -1.9429991e-05 - -Velocity - x y z -[minimum ] -8.7007094e-04 -7.5762425e-04 -7.5765804e-04 -[maximum ] 3.3640164e-04 7.5765567e-04 7.5767464e-04 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.670 0.670 0.670 0.670000 (1 call) - Time step loop: 0.010 0.030 0.370 0.018500 (20 calls) - Propagation: 0.000 0.010 0.030 0.001500 (20 calls) - Propagtn (krnl) : 0.000 0.010 0.030 0.001500 (20 calls) - Collision: 0.000 0.010 0.010 0.000500 (20 calls) - Collision (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Lattice halos: 0.000 0.010 0.070 0.001750 (40 calls) - phi gradients: 0.000 0.010 0.060 0.003000 (20 calls) - phi halos: 0.000 0.010 0.030 0.001500 (20 calls) - Forces: 0.000 0.010 0.010 0.000500 (20 calls) - Rebuild: 0.000 0.010 0.010 0.000500 (20 calls) - BBL: 0.000 0.010 0.040 0.002000 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.010 0.020 0.001000 (20 calls) - Phi force (krnl) : 0.000 0.010 0.020 0.001000 (20 calls) - phi update: 0.000 0.010 0.060 0.003000 (20 calls) - Velocity Halo : 0.000 0.010 0.010 0.000500 (20 calls) -BE mol field (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) -BP BE update (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Advectn BCS (krnl) : 0.000 0.010 0.020 0.001000 (20 calls) - Free1: 0.000 0.040 0.040 0.000667 (60 calls) - Free3: 0.000 0.010 0.010 0.000500 (20 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w01.inp b/tests/regression/d3q19-short-gpu/serial-chol-w01.inp deleted file mode 120000 index b073ca859..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w01.log b/tests/regression/d3q19-short-gpu/serial-chol-w01.log deleted file mode 120000 index a6cc9479d..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w02.inp b/tests/regression/d3q19-short-gpu/serial-chol-w02.inp deleted file mode 120000 index bc90cd8ef..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w02.log b/tests/regression/d3q19-short-gpu/serial-chol-w02.log deleted file mode 120000 index fbb2d3782..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w02.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w02.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w03.inp b/tests/regression/d3q19-short-gpu/serial-chol-w03.inp deleted file mode 120000 index e345dba5e..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w03.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w03.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w03.log b/tests/regression/d3q19-short-gpu/serial-chol-w03.log deleted file mode 120000 index 2cd145398..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w03.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w03.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w04.inp b/tests/regression/d3q19-short-gpu/serial-chol-w04.inp deleted file mode 120000 index 14f7da486..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w04.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w04.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w04.log b/tests/regression/d3q19-short-gpu/serial-chol-w04.log deleted file mode 100644 index 5cfe6cfaa..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w04.log +++ /dev/null @@ -1,175 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 30 user parameters from serial-chol-w04.inp - -System details --------------- -System size: 32 32 64 -Decomposition: 1 1 1 -Local domain: 32 32 64 -Periodic: 1 1 0 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9635000e-01 -... gives pitch length = 3.1999925e+01 -Elastic constant kappa0 = 6.4845600e-04 -Elastic constant kappa1 = 6.4845600e-04 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 3.0000080e-01 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = none -Anchoring type (walls): = fixed -Surface free energy (colloid)w1: = 2.5938240e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 2.5938240e-03 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 4.0000000e+00 -Ratio (wall) w1/kappa0: = 4.0000000e+00 -Computed surface order f(gamma) = 3.3333333e-01 -Wall fixed anchoring orientation = 0.0000000e+00 1.0000000e+00 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e+00 -Bulk viscosity 1.00000e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 3.50000e+00 -Bulk relaxation time: 3.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 - -Boundary walls --------------- -Boundary walls: - - Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 10240 -Memory (total, bytes): 163840 -Boundary shear initialise: 0 -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab to nematic -Director: 1.0000000e+00 1.0000000e+00 1.0000000e+00 -Initial conditions. - -Scalars - total mean variance min max -[rho] 65536.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 2.4253192e-12 3.7007434e-17 2.7119367e-45 3.7007434e-17 3.7007434e-17 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 -[phi] 2.4253192e-12 3.7007434e-17 2.7119367e-45 3.7007434e-17 3.7007434e-17 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 - -Momentum - x y z -[total ] 9.0949470e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 9.0949470e-13 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 65536.00 1.00000000000 1.6640631e-09 0.99979643442 1.00012987303 -[phi] -8.5752738e-01 -1.3084829e-05 7.4456802e-09 -6.5882372e-04 1.5676158e-05 -[phi] 1.0920738e+04 1.6663723e-01 7.6430207e-09 1.6596498e-01 1.6666188e-01 -[phi] 1.0920712e+04 1.6663684e-01 6.3756764e-09 1.6609743e-01 1.6666405e-01 -[phi] 1.7670244e+00 2.6962653e-05 2.4030180e-08 -5.4789149e-06 1.0804739e-03 -[phi] 1.0920691e+04 1.6663652e-01 6.0137023e-09 1.6610763e-01 1.6665448e-01 - -Free energies - timestep f v f/v f_s1 fs_s2 redshift -[fe] 2 -3.1280977443e+00 6.5536000000e+04 -4.7730983648e-05 4.4039622513e-01 4.4027826070e-01 1.0000000000e+00 - -Momentum - x y z -[total ] -7.7354789e-14 -1.4843682e-13 4.0800696e-14 -[fluid ] 1.8393996e-01 -4.9146224e-01 2.2597105e-02 -[walls ] -1.8393996e-01 4.9146224e-01 -2.2597105e-02 - -Velocity - x y z -[minimum ] -1.5693345e-04 -1.5769796e-04 -1.0547557e-04 -[maximum ] 2.4032376e-04 1.1754944e-38 1.2393198e-04 - -Completed cycle 2 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.530 0.530 0.530 0.530000 (1 call) - Time step loop: 0.020 0.030 0.050 0.025000 (2 calls) - Propagation: 0.000 0.010 0.010 0.005000 (2 calls) - Propagtn (krnl) : 0.000 0.010 0.010 0.005000 (2 calls) - Collision: 0.000 0.010 0.010 0.005000 (2 calls) - Collision (krnl) : 0.000 0.010 0.010 0.005000 (2 calls) - Lattice halos: 0.000 0.000 0.000 0.000000 (2 calls) - phi gradients: 0.000 0.020 0.020 0.010000 (2 calls) - phi halos: 0.000 0.000 0.000 0.000000 (2 calls) - BBL: 0.000 0.000 0.000 0.000000 (2 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (2 calls) - phi update: 0.000 0.010 0.010 0.005000 (2 calls) - Velocity Halo : 0.000 0.010 0.010 0.005000 (2 calls) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Free1: 0.000 0.120 0.120 0.060000 (2 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w05.inp b/tests/regression/d3q19-short-gpu/serial-chol-w05.inp deleted file mode 120000 index 7a10d8e0d..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w05.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-chol-w05.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-chol-w05.log b/tests/regression/d3q19-short-gpu/serial-chol-w05.log deleted file mode 100644 index 2251e107c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-chol-w05.log +++ /dev/null @@ -1,175 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 31 user parameters from serial-chol-w05.inp - -System details --------------- -System size: 32 32 64 -Decomposition: 1 1 1 -Local domain: 32 32 64 -Periodic: 1 1 0 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9635000e-01 -... gives pitch length = 3.1999925e+01 -Elastic constant kappa0 = 6.4845600e-04 -Elastic constant kappa1 = 6.4845600e-04 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 3.0000080e-01 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = none -Anchoring type (walls): = fixed -Surface free energy (colloid)w1: = 2.5938240e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 2.5938240e-03 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 4.0000000e+00 -Ratio (wall) w1/kappa0: = 4.0000000e+00 -Computed surface order f(gamma) = 3.3333333e-01 -Wall fixed anchoring orientation = 1.0000000e+00 0.0000000e+00 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e+00 -Bulk viscosity 1.00000e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 3.50000e+00 -Bulk relaxation time: 3.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 - -Boundary walls --------------- -Boundary walls: - - Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 10240 -Memory (total, bytes): 163840 -Boundary shear initialise: 0 -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab to nematic -Director: 1.0000000e+00 1.0000000e+00 1.0000000e+00 -Initial conditions. - -Scalars - total mean variance min max -[rho] 65536.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 2.4253192e-12 3.7007434e-17 2.7119367e-45 3.7007434e-17 3.7007434e-17 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 -[phi] 2.4253192e-12 3.7007434e-17 2.7119367e-45 3.7007434e-17 3.7007434e-17 -[phi] 1.0922667e+04 1.6666667e-01 5.5004612e-14 1.6666667e-01 1.6666667e-01 - -Momentum - x y z -[total ] 9.0949470e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 9.0949470e-13 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 65536.00 1.00000000000 1.6640631e-09 0.99979643442 1.00012987303 -[phi] 1.7670244e+00 2.6962653e-05 2.4030180e-08 -5.4789149e-06 1.0804739e-03 -[phi] 1.0920738e+04 1.6663723e-01 7.6430207e-09 1.6596498e-01 1.6666188e-01 -[phi] 1.0920691e+04 1.6663652e-01 6.0137023e-09 1.6610763e-01 1.6665448e-01 -[phi] -8.5752738e-01 -1.3084829e-05 7.4456802e-09 -6.5882372e-04 1.5676158e-05 -[phi] 1.0920712e+04 1.6663684e-01 6.3756764e-09 1.6609743e-01 1.6666405e-01 - -Free energies - timestep f v f/v f_s1 fs_s2 redshift -[fe] 2 -3.1280977443e+00 6.5536000000e+04 -4.7730983648e-05 4.4027826070e-01 4.4039622513e-01 1.0000000000e+00 - -Momentum - x y z -[total ] -8.9928065e-14 -1.0891288e-13 -3.3625880e-14 -[fluid ] 4.9146224e-01 -1.8393996e-01 -2.2597105e-02 -[walls ] -4.9146224e-01 1.8393996e-01 2.2597105e-02 - -Velocity - x y z -[minimum ] 0.0000000e+00 -2.4032376e-04 -1.2393198e-04 -[maximum ] 1.5769796e-04 1.5693345e-04 1.0547557e-04 - -Completed cycle 2 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.540 0.540 0.540 0.540000 (1 call) - Time step loop: 0.020 0.020 0.040 0.020000 (2 calls) - Propagation: 0.000 0.000 0.000 0.000000 (2 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Collision: 0.000 0.000 0.000 0.000000 (2 calls) - Collision (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Lattice halos: 0.000 0.000 0.000 0.000000 (2 calls) - phi gradients: 0.000 0.010 0.010 0.005000 (2 calls) - phi halos: 0.000 0.000 0.000 0.000000 (2 calls) - BBL: 0.000 0.000 0.000 0.000000 (2 calls) - Force calculation: 0.010 0.020 0.030 0.015000 (2 calls) - phi update: 0.000 0.000 0.000 0.000000 (2 calls) - Velocity Halo : 0.000 0.000 0.000 0.000000 (2 calls) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (2 calls) - Free1: 0.000 0.120 0.120 0.060000 (2 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-coll-st1.inp b/tests/regression/d3q19-short-gpu/serial-coll-st1.inp deleted file mode 120000 index 36f82596c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-coll-st1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-coll-st1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-coll-st1.log b/tests/regression/d3q19-short-gpu/serial-coll-st1.log deleted file mode 100644 index 1b4341f78..000000000 --- a/tests/regression/d3q19-short-gpu/serial-coll-st1.log +++ /dev/null @@ -1,138 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 14 user parameters from serial-coll-st1.inp - -No free energy selected - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -colloid_random_a0 2.3000000e+00 -colloid_random_ah 2.3000000e+00 -Requested 1 colloid at random -Colloid radius a0 = 2.300000e+00 -Hydrodyn radius ah = 2.300000e+00 -Colloid charges q0 = 0.000000e+00 q1 = 0.000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 11 11 11 -Final cell lengths: 2.9090909e+00 2.9090909e+00 2.9090909e+00 - -Sedimentation force on: yes -Sedimentation force: 0.0000000e+00 0.0000000e+00 -1.0000000e-05 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 32718.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 4.5405346e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5405346e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] 8.8866954e-09 -5.7795120e-09 -5.1676690e-07 -[maximum ] 8.8866954e-09 -5.7795120e-09 -5.1676690e-07 - -Scalars - total mean variance min max -[rho] 32718.00 1.00000000000 3.5527137e-15 0.99999964124 1.00000033908 - -Momentum - x y z -[total ] 5.2439179e-13 1.4822799e-13 -5.2011744e-12 -[fluid ] -4.7854236e-07 3.1177143e-07 2.7927615e-05 -[colloids] 4.7854289e-07 -3.1177128e-07 -2.7927620e-05 - -Velocity - x y z -[minimum ] -1.7382307e-07 -1.7743807e-07 -4.8115887e-07 -[maximum ] 1.7926114e-07 1.7704097e-07 4.2934228e-08 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.450 0.450 0.450 0.450000 (1 call) - Time step loop: 0.010 0.030 0.200 0.020000 (10 calls) - Propagation: 0.000 0.010 0.010 0.001000 (10 calls) - Propagtn (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Collision: 0.000 0.020 0.030 0.003000 (10 calls) - Collision (krnl) : 0.000 0.020 0.030 0.003000 (10 calls) - Lattice halos: 0.000 0.010 0.070 0.003500 (20 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - Forces: 0.000 0.010 0.010 0.001000 (10 calls) - Rebuild: 0.000 0.010 0.010 0.001000 (10 calls) - BBL: 0.000 0.010 0.040 0.004000 (10 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.030 0.030 0.001000 (30 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-dist-1dp.inp b/tests/regression/d3q19-short-gpu/serial-dist-1dp.inp deleted file mode 120000 index 9e67cf114..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-1dp.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-dist-1dp.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-dist-1dp.log b/tests/regression/d3q19-short-gpu/serial-dist-1dp.log deleted file mode 100644 index 4df16aa07..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-1dp.log +++ /dev/null @@ -1,102 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 17 user parameters from serial-dist-1dp.inp - -No free energy selected - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: reduced -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Initial distribution: 1d Poiseuille profile -Density: 1.0000000e+00 -Velocity (max): 1.0000000e-03 0.0000000e+00 0.0000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 0.0000000e+00 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 2.1856000e+01 7.1054274e-15 0.0000000e+00 -[fluid ] 2.1856000e+01 7.1054274e-15 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.9282755e-07 0.99932343093 1.00067708627 - -Momentum - x y z -[total ] 2.1856000e+01 -3.9079850e-14 0.0000000e+00 -[fluid ] 2.1856000e+01 -3.9079850e-14 0.0000000e+00 - -Velocity - x y z -[minimum ] 5.0228587e-04 -6.9430415e-18 0.0000000e+00 -[maximum ] 8.7868636e-04 6.9433192e-18 1.1754944e-38 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.370 0.370 0.370 0.370000 (1 call) - Time step loop: 0.000 0.020 0.050 0.005000 (10 calls) - Propagation: 0.000 0.000 0.000 0.000000 (10 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Collision: 0.000 0.010 0.030 0.003000 (10 calls) - Collision (krnl) : 0.000 0.010 0.030 0.003000 (10 calls) - Lattice halos: 0.000 0.010 0.010 0.001000 (10 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.030 0.030 0.003000 (10 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-dist-2kh.inp b/tests/regression/d3q19-short-gpu/serial-dist-2kh.inp deleted file mode 120000 index 62de18233..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-2kh.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-dist-2kh.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-dist-2kh.log b/tests/regression/d3q19-short-gpu/serial-dist-2kh.log deleted file mode 120000 index c9216bb81..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-2kh.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-dist-2kh.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-dist-2sw.inp b/tests/regression/d3q19-short-gpu/serial-dist-2sw.inp deleted file mode 120000 index 78041f072..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-2sw.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-dist-2sw.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-dist-2sw.log b/tests/regression/d3q19-short-gpu/serial-dist-2sw.log deleted file mode 100644 index 875acc98e..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-2sw.log +++ /dev/null @@ -1,102 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 16 user parameters from serial-dist-2sw.inp - -No free energy selected - -System details --------------- -System size: 64 64 1 -Decomposition: 1 1 1 -Local domain: 64 64 1 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: reduced -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Initial distribution: 2d shear wave -Velocity magnitude: 4.0000000e-02 -Shear layer kappa: 6.2831853e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 0.0000000e+00 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 1.1102230e-16 7.1054274e-15 0.0000000e+00 -[fluid ] 1.1102230e-16 7.1054274e-15 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 1.1102230e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] -2.7755576e-17 7.3274720e-15 0.0000000e+00 -[fluid ] -2.7755576e-17 7.3274720e-15 0.0000000e+00 - -Velocity - x y z -[minimum ] -3.9586358e-02 -2.7755576e-16 0.0000000e+00 -[maximum ] 3.9586358e-02 2.8449465e-16 1.1754944e-38 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.240 0.240 0.240 0.240000 (1 call) - Time step loop: 0.000 0.010 0.030 0.003000 (10 calls) - Propagation: 0.000 0.000 0.000 0.000000 (10 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Collision: 0.000 0.010 0.010 0.001000 (10 calls) - Collision (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Lattice halos: 0.000 0.010 0.010 0.001000 (10 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.010 0.010 0.001000 (10 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-dist-3du.inp b/tests/regression/d3q19-short-gpu/serial-dist-3du.inp deleted file mode 120000 index 762e7019a..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-3du.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-dist-3du.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-dist-3du.log b/tests/regression/d3q19-short-gpu/serial-dist-3du.log deleted file mode 100644 index 446ef085a..000000000 --- a/tests/regression/d3q19-short-gpu/serial-dist-3du.log +++ /dev/null @@ -1,102 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 17 user parameters from serial-dist-3du.inp - -No free energy selected - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: reduced -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Initial distribution: 3d uniform desnity/velocity -Density: 1.0000000e+00 -Velocity: 2.0000000e-03 3.0000000e-03 4.0000000e-03 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.1102230e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 6.5536000e+01 9.8304000e+01 1.3107200e+02 -[fluid ] 6.5536000e+01 9.8304000e+01 1.3107200e+02 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.1102230e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 6.5536000e+01 9.8304000e+01 1.3107200e+02 -[fluid ] 6.5536000e+01 9.8304000e+01 1.3107200e+02 - -Velocity - x y z -[minimum ] 2.0000000e-03 3.0000000e-03 4.0000000e-03 -[maximum ] 2.0000000e-03 3.0000000e-03 4.0000000e-03 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.340 0.340 0.340 0.340000 (1 call) - Time step loop: 0.000 0.010 0.040 0.004000 (10 calls) - Propagation: 0.000 0.010 0.030 0.003000 (10 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Collision: 0.000 0.010 0.010 0.001000 (10 calls) - Collision (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Lattice halos: 0.000 0.000 0.000 0.000000 (10 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.030 0.030 0.003000 (10 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-ewld-s01.inp b/tests/regression/d3q19-short-gpu/serial-ewld-s01.inp deleted file mode 120000 index 391ca1d3d..000000000 --- a/tests/regression/d3q19-short-gpu/serial-ewld-s01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-ewld-s01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-ewld-s01.log b/tests/regression/d3q19-short-gpu/serial-ewld-s01.log deleted file mode 120000 index 7cb7685e4..000000000 --- a/tests/regression/d3q19-short-gpu/serial-ewld-s01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-ewld-s01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st1.inp b/tests/regression/d3q19-short-gpu/serial-fene-st1.inp deleted file mode 120000 index 93f85a072..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-fene-st1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st1.log b/tests/regression/d3q19-short-gpu/serial-fene-st1.log deleted file mode 100644 index a5089c53a..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st1.log +++ /dev/null @@ -1,150 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 28 user parameters from serial-fene-st1.inp - -No free energy selected - -System details --------------- -System size: 16 16 16 -Decomposition: 1 1 1 -Local domain: 16 16 16 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e-01 -Bulk viscosity 1.66667e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 1.00000e+00 -Bulk relaxation time: 1.00000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_nbonds 1 -colloid_one_bond1 2 -colloid_one_a0 1.2500000e+00 -colloid_one_ah 1.2500000e+00 -colloid_one_r 6.0000000e+00 6.0000000e+00 6.0000000e+00 -Requested second colloid via input: -colloid_two_nbonds 1 -colloid_two_bond1 1 -colloid_two_a0 1.2500000e+00 -colloid_two_ah 1.2500000e+00 -colloid_two_r 6.0000000e+00 6.0000000e+00 3.1000000e+00 - -Initialised 2 colloids -FENE bond -Spring constant: 1.0000000e-04 -Equilibrium separation: 3.0000000e+00 - -Colloid cell list information ------------------------------ -Input radius maximum: 1.2500000e+00 -Hydrodynamic radius maximum: 1.2500000e+00 -Surface-surface interaction: 0.0000000e+00 -Centre-centre interaction: 3.0000000e+00 -Final cell list: 5 5 5 -Final cell lengths: 3.2000000e+00 3.2000000e+00 3.2000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 4082.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 5.6649130e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6649130e-14 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: -Bond potential minimum r is: 2.8803878e+00 -Bond potential maximum r is: 2.8803878e+00 -Bond potential energy is: 1.1470962e-03 - -Colloid velocities - x y z -[minimum ] -4.1979680e-17 -1.5299828e-17 -5.6265944e-04 -[maximum ] 7.7378782e-18 -1.3872741e-17 5.6265944e-04 - -Scalars - total mean variance min max -[rho] 4082.00 1.00000000000 9.1522212e-10 0.99983898521 1.00045298042 - -Momentum - x y z -[total ] -9.0893578e-15 -1.2091476e-14 -4.0150175e-15 -[fluid ] -8.7881091e-15 -1.2097962e-14 -3.9829251e-15 -[colloids] -3.0124868e-16 6.4853818e-18 -3.2092384e-17 - -Velocity - x y z -[minimum ] -2.6798262e-04 -2.6798262e-04 -3.2938376e-04 -[maximum ] 2.6798262e-04 2.6798262e-04 3.2938376e-04 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.300 0.300 0.300 0.300000 (1 call) - Time step loop: 0.000 0.020 0.120 0.006000 (20 calls) - Propagation: 0.000 0.000 0.000 0.000000 (20 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Collision: 0.000 0.000 0.000 0.000000 (20 calls) - Collision (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Lattice halos: 0.000 0.010 0.050 0.001250 (40 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (20 calls) - Forces: 0.000 0.000 0.000 0.000000 (20 calls) - Rebuild: 0.000 0.010 0.010 0.000500 (20 calls) - BBL: 0.000 0.010 0.050 0.002500 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (20 calls) - phi update: 0.000 0.000 0.000 0.000000 (20 calls) - Free1: 0.000 0.000 0.000 0.000000 (60 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st2.inp b/tests/regression/d3q19-short-gpu/serial-fene-st2.inp deleted file mode 120000 index 63b5c16a6..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-fene-st2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st2.log b/tests/regression/d3q19-short-gpu/serial-fene-st2.log deleted file mode 100644 index 16092123c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st2.log +++ /dev/null @@ -1,157 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 34 user parameters from serial-fene-st2.inp - -No free energy selected - -System details --------------- -System size: 16 16 16 -Decomposition: 1 1 1 -Local domain: 16 16 16 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e-01 -Bulk viscosity 1.66667e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 1.00000e+00 -Bulk relaxation time: 1.00000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_nbonds 2 -colloid_one_bond1 2 -colloid_one_bond2 3 -colloid_one_a0 1.2500000e+00 -colloid_one_ah 1.2500000e+00 -colloid_one_r 6.0000000e+00 6.0000000e+00 6.0000000e+00 -Requested second colloid via input: -colloid_two_nbonds 1 -colloid_two_bond1 1 -colloid_two_a0 1.2500000e+00 -colloid_two_ah 1.2500000e+00 -colloid_two_r 6.0000000e+00 6.0000000e+00 3.1000000e+00 -Requested third colloid via input: -colloid_three_nbonds 1 -colloid_three_bond1 1 -colloid_three_a0 1.2500000e+00 -colloid_three_ah 1.2500000e+00 -colloid_three_r 6.0000000e+00 6.0000000e+00 8.8000000e+00 - -Initialised 3 colloids -FENE bond -Spring constant: 1.0000000e-04 -Equilibrium separation: 3.0000000e+00 - -Colloid cell list information ------------------------------ -Input radius maximum: 1.2500000e+00 -Hydrodynamic radius maximum: 1.2500000e+00 -Surface-surface interaction: 0.0000000e+00 -Centre-centre interaction: 3.0000000e+00 -Final cell list: 5 5 5 -Final cell lengths: 3.2000000e+00 3.2000000e+00 3.2000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 4075.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 5.6551985e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6551985e-14 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: -Bond potential minimum r is: 2.7978894e+00 -Bond potential maximum r is: 2.8844019e+00 -Bond potential energy is: 2.0795518e-03 - -Colloid velocities - x y z -[minimum ] -2.0102564e-17 -4.6470065e-18 -4.5333287e-04 -[maximum ] 1.2026575e-17 2.4518641e-17 6.5386471e-04 - -Scalars - total mean variance min max -[rho] 4075.00 1.00000000000 8.2043838e-10 0.99980752780 1.00038387746 - -Momentum - x y z -[total ] -3.7183111e-16 -4.4611858e-15 -1.0039278e-14 -[fluid ] -1.9428903e-16 -4.4755866e-15 4.4820719e-04 -[colloids] -1.7754208e-16 1.4400740e-17 -4.4820719e-04 - -Velocity - x y z -[minimum ] -2.3483297e-04 -2.3483297e-04 -2.9402069e-04 -[maximum ] 2.3483297e-04 2.3483297e-04 3.8753162e-04 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.310 0.310 0.310 0.310000 (1 call) - Time step loop: 0.000 0.020 0.110 0.005500 (20 calls) - Propagation: 0.000 0.010 0.010 0.000500 (20 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Collision: 0.000 0.010 0.010 0.000500 (20 calls) - Collision (krnl) : 0.000 0.010 0.010 0.000500 (20 calls) - Lattice halos: 0.000 0.010 0.050 0.001250 (40 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (20 calls) - Forces: 0.000 0.000 0.000 0.000000 (20 calls) - Rebuild: 0.000 0.000 0.000 0.000000 (20 calls) - BBL: 0.000 0.010 0.030 0.001500 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (20 calls) - phi update: 0.000 0.000 0.000 0.000000 (20 calls) - Free1: 0.000 0.000 0.000 0.000000 (60 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st3.inp b/tests/regression/d3q19-short-gpu/serial-fene-st3.inp deleted file mode 120000 index 13cbe9aab..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st3.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-fene-st3.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-fene-st3.log b/tests/regression/d3q19-short-gpu/serial-fene-st3.log deleted file mode 100644 index 27d10b42e..000000000 --- a/tests/regression/d3q19-short-gpu/serial-fene-st3.log +++ /dev/null @@ -1,164 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 37 user parameters from serial-fene-st3.inp - -No free energy selected - -System details --------------- -System size: 16 16 16 -Decomposition: 1 1 1 -Local domain: 16 16 16 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e-01 -Bulk viscosity 1.66667e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 1.00000e+00 -Bulk relaxation time: 1.00000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_nbonds 2 -colloid_one_bond1 2 -colloid_one_bond2 3 -colloid_one_nangles 1 -colloid_one_a0 1.2500000e+00 -colloid_one_ah 1.2500000e+00 -colloid_one_r 6.0000000e+00 6.0000000e+00 6.0000000e+00 -Requested second colloid via input: -colloid_two_nbonds 1 -colloid_two_bond1 1 -colloid_two_a0 1.2500000e+00 -colloid_two_ah 1.2500000e+00 -colloid_two_r 6.0000000e+00 6.0000000e+00 3.1000000e+00 -Requested third colloid via input: -colloid_three_nbonds 1 -colloid_three_bond1 1 -colloid_three_a0 1.2500000e+00 -colloid_three_ah 1.2500000e+00 -colloid_three_r 6.0000000e+00 6.1000000e+00 8.7000000e+00 - -Initialised 3 colloids -FENE bond -Spring constant: 0.0000000e+00 -Equilibrium separation: 3.0000000e+00 -Bond angle -Type: cosine -kappa: 1.0000000e-04 - -Colloid cell list information ------------------------------ -Input radius maximum: 1.2500000e+00 -Hydrodynamic radius maximum: 1.2500000e+00 -Surface-surface interaction: 0.0000000e+00 -Centre-centre interaction: 3.0000000e+00 -Final cell list: 5 5 5 -Final cell lengths: 3.2000000e+00 3.2000000e+00 3.2000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 4073.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 5.6524230e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6524230e-14 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: -Bond potential minimum r is: 2.7018511e+00 -Bond potential maximum r is: 2.8999999e+00 -Bond potential energy is: 0.0000000e+00 -Angle minimum angle is: 3.1045803e+00 -Angle maximum angle is: 3.1045803e+00 -Angle potential energy is: -9.9931512e-05 - -Colloid velocities - x y z -[minimum ] -6.3372133e-18 -2.1664316e-07 -6.3221377e-09 -[maximum ] 3.2530625e-17 4.9795195e-07 1.4472466e-08 - -Scalars - total mean variance min max -[rho] 4073.00 1.00000000000 1.5543122e-15 0.99999988001 1.00000011983 - -Momentum - x y z -[total ] -6.2532851e-15 1.0710847e-14 2.8839642e-15 -[fluid ] -6.1409211e-15 -7.6831400e-07 -5.0993563e-08 -[colloids] -1.1236401e-16 7.6831401e-07 5.0993566e-08 - -Velocity - x y z -[minimum ] -8.7313739e-08 -1.5178858e-07 -1.3516609e-07 -[maximum ] 8.7313739e-08 3.0085562e-07 1.3361380e-07 - -Completed cycle 20 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.320 0.320 0.320 0.320000 (1 call) - Time step loop: 0.000 0.010 0.110 0.005500 (20 calls) - Propagation: 0.000 0.010 0.010 0.000500 (20 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (20 calls) - Collision: 0.000 0.010 0.020 0.001000 (20 calls) - Collision (krnl) : 0.000 0.010 0.020 0.001000 (20 calls) - Lattice halos: 0.000 0.010 0.040 0.001000 (40 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (20 calls) - Forces: 0.000 0.000 0.000 0.000000 (20 calls) - Rebuild: 0.000 0.000 0.000 0.000000 (20 calls) - BBL: 0.000 0.010 0.040 0.002000 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (20 calls) - phi update: 0.000 0.000 0.000 0.000000 (20 calls) - Free1: 0.000 0.010 0.010 0.000167 (60 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-init-bp1.inp b/tests/regression/d3q19-short-gpu/serial-init-bp1.inp deleted file mode 120000 index 591f452f1..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-bp1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-init-bp1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-init-bp1.log b/tests/regression/d3q19-short-gpu/serial-init-bp1.log deleted file mode 100644 index 7642e497b..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-bp1.log +++ /dev/null @@ -1,151 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 23 user parameters from serial-init-bp1.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.4384711e-02 -Magnitude of order gamma = 3.1764706e+00 -Pitch wavevector q0 = 2.7768018e-01 -... gives pitch length = 2.2627417e+01 -Elastic constant kappa0 = 1.0000000e-02 -Elastic constant kappa1 = 1.0000000e-02 -Amplitude (uniaxial) order = -2.0000000e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 1.3500000e+00 -Reduced temperature = -5.0000003e-01 -Initial redshift = 8.3000000e-01 -Dynamic redshift update = no -Liquid crystal activity No - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e+00 -Bulk viscosity 1.66667e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.50000e+00 -Bulk relaxation time: 5.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab using O8M (BPI) -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 1.0103030e-14 3.0831999e-19 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.3725132e-12 -4.1885779e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -1.2522761e-12 -3.8216433e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -3.2682190e-14 -9.9738130e-19 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.4969692e-12 -4.5683875e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.3705446e-05 0.99574253388 1.01118305550 -[phi] -3.2807109e-14 -1.0011935e-18 5.9699031e-02 -4.4806579e-01 4.4927991e-01 -[phi] 6.9706192e-08 2.1272642e-12 4.9622512e-02 -5.9696088e-01 5.9696088e-01 -[phi] 6.9706022e-08 2.1272590e-12 4.9622512e-02 -5.9696088e-01 5.9696088e-01 -[phi] -1.2080616e-13 -3.6867115e-18 5.9699031e-02 -4.4806579e-01 4.4927991e-01 -[phi] 6.9706087e-08 2.1272610e-12 4.9622512e-02 -5.9696088e-01 5.9696088e-01 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 1 1.3519678062e+02 3.2768000000e+04 4.1258783149e-03 4.0997520325e-03 2.6126282398e-05 8.3000000000e-01 - -Momentum - x y z -[total ] 4.4997686e-13 2.8588243e-15 -2.4633073e-16 -[fluid ] 4.4997686e-13 2.8588243e-15 -2.4633073e-16 - -Velocity - x y z -[minimum ] -5.7778663e-03 -5.7778663e-03 -5.7778663e-03 -[maximum ] 5.7778662e-03 5.7778662e-03 5.7778662e-03 - -Completed cycle 1 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.420 0.420 0.420 0.420000 (1 call) - Time step loop: 0.030 0.030 0.030 0.030000 (1 call) - Propagation: 0.010 0.010 0.010 0.010000 (1 call) - Propagtn (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - Collision: 0.010 0.010 0.010 0.010000 (1 call) - Collision (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - Lattice halos: 0.000 0.000 0.000 0.000000 (1 call) - phi gradients: 0.000 0.000 0.000 0.000000 (1 call) - phi grad (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi halos: 0.000 0.000 0.000 0.000000 (1 call) - BBL: 0.000 0.000 0.000 0.000000 (1 call) - Force calculation: 0.010 0.010 0.010 0.010000 (1 call) - Phi force (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi update: 0.000 0.000 0.000 0.000000 (1 call) - Velocity Halo : 0.000 0.000 0.000 0.000000 (1 call) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (1 call) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Free1: 0.100 0.100 0.100 0.100000 (1 call) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-init-bp2.inp b/tests/regression/d3q19-short-gpu/serial-init-bp2.inp deleted file mode 120000 index c76e80425..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-bp2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-init-bp2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-init-bp2.log b/tests/regression/d3q19-short-gpu/serial-init-bp2.log deleted file mode 100644 index 40a285d6c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-bp2.log +++ /dev/null @@ -1,151 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 23 user parameters from serial-init-bp2.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 6.9000000e-03 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9634950e-01 -... gives pitch length = 3.2000007e+01 -Elastic constant kappa0 = 2.0000000e-02 -Elastic constant kappa1 = 2.0000000e-02 -Amplitude (uniaxial) order = 3.0000000e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 2.0057255e+00 -Reduced temperature = 0.0000000e+00 -Initial redshift = 9.1000000e-01 -Dynamic redshift update = no -Liquid crystal activity No - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e+00 -Bulk viscosity 1.66667e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.50000e+00 -Bulk relaxation time: 5.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab using O2 (BPII) -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 2.6610658e-15 8.1209284e-20 8.9999982e-02 -6.0000000e-01 6.0000000e-01 -[phi] -4.0156293e-04 -1.2254728e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 -[phi] -4.0156294e-04 -1.2254728e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 -[phi] -8.9217488e-12 -2.7227016e-16 8.9999982e-02 -6.0000000e-01 6.0000000e-01 -[phi] -4.0156287e-04 -1.2254726e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 5.5946818e-07 0.99868639745 1.00197940975 -[phi] -2.7166810e-13 -8.2906526e-18 8.9762988e-02 -5.9884923e-01 5.9934603e-01 -[phi] -4.0099021e-04 -1.2237250e-08 4.4898274e-02 -2.9996132e-01 2.9996132e-01 -[phi] -4.0099021e-04 -1.2237250e-08 4.4898274e-02 -2.9996132e-01 2.9996132e-01 -[phi] 3.3705191e-12 1.0286008e-16 8.9762988e-02 -5.9884923e-01 5.9934603e-01 -[phi] -4.0099021e-04 -1.2237250e-08 4.4898274e-02 -2.9996132e-01 2.9996132e-01 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 1 5.3564492642e+01 3.2768000000e+04 1.6346585889e-03 1.6242150891e-03 1.0443499818e-05 9.1000000000e-01 - -Momentum - x y z -[total ] 4.4921358e-13 -5.4470317e-16 2.0330959e-15 -[fluid ] 4.4921358e-13 -5.4470317e-16 2.0330959e-15 - -Velocity - x y z -[minimum ] -1.0199563e-03 -1.0199563e-03 -1.0199563e-03 -[maximum ] 1.0199566e-03 1.0199566e-03 1.0199566e-03 - -Completed cycle 1 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.410 0.410 0.410 0.410000 (1 call) - Time step loop: 0.020 0.020 0.020 0.020000 (1 call) - Propagation: 0.000 0.000 0.000 0.000000 (1 call) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Collision: 0.010 0.010 0.010 0.010000 (1 call) - Collision (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - Lattice halos: 0.000 0.000 0.000 0.000000 (1 call) - phi gradients: 0.010 0.010 0.010 0.010000 (1 call) - phi grad (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - phi halos: 0.000 0.000 0.000 0.000000 (1 call) - BBL: 0.000 0.000 0.000 0.000000 (1 call) - Force calculation: 0.000 0.000 0.000 0.000000 (1 call) - Phi force (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi update: 0.000 0.000 0.000 0.000000 (1 call) - Velocity Halo : 0.000 0.000 0.000 0.000000 (1 call) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (1 call) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Free1: 0.120 0.120 0.120 0.120000 (1 call) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-init-lcb.inp b/tests/regression/d3q19-short-gpu/serial-init-lcb.inp deleted file mode 120000 index 477c3c364..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-lcb.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-init-lcb.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-init-lcb.log b/tests/regression/d3q19-short-gpu/serial-init-lcb.log deleted file mode 100644 index b0d75182f..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-lcb.log +++ /dev/null @@ -1,153 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 24 user parameters from serial-init-lcb.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.4384711e-02 -Magnitude of order gamma = 3.1764706e+00 -Pitch wavevector q0 = 2.7768018e-01 -... gives pitch length = 2.2627417e+01 -Elastic constant kappa0 = 1.0000000e-02 -Elastic constant kappa1 = 1.0000000e-02 -Amplitude (uniaxial) order = 1.0000000e-02 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 1.3500000e+00 -Reduced temperature = -5.0000003e-01 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab to cholesteric -Helical axis X -Superposing random rectangle -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -1.6380994e+02 -4.9990827e-03 7.6716937e-09 -5.0000000e-03 7.2901099e-03 -[phi] 3.1569884e-03 9.6343639e-08 3.7001596e-09 -7.4718555e-03 5.7471922e-03 -[phi] -9.0544414e-04 -2.7631962e-08 2.3862226e-09 -4.2434745e-03 6.7002147e-03 -[phi] 6.8054311e+01 2.0768528e-03 2.6666083e-05 -4.9989978e-03 9.8864636e-03 -[phi] 3.7123537e+00 1.1329204e-04 2.9388328e-05 -7.4853149e-03 7.4766459e-03 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.5625279e-12 0.99995282288 1.00006654458 -[phi] -1.6377691e+02 -4.9980747e-03 7.5904297e-09 -4.9993263e-03 7.2203522e-03 -[phi] 3.1563518e-03 9.6324211e-08 3.6524547e-09 -7.4158262e-03 5.7118511e-03 -[phi] -9.0526156e-04 -2.7626390e-08 2.3541212e-09 -4.2102191e-03 6.6545195e-03 -[phi] 6.8040588e+01 2.0764340e-03 2.6671410e-05 -5.0006325e-03 9.8865755e-03 -[phi] 3.7116051e+00 1.1326920e-04 2.9387778e-05 -7.4859391e-03 7.4772695e-03 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 1 -2.3543485060e-04 3.2768000000e+04 -7.1849014467e-09 -7.4624859211e-08 6.7439957764e-08 1.0000000000e+00 - -Momentum - x y z -[total ] 1.4293428e-13 -1.6945820e-13 8.3266727e-17 -[fluid ] 1.4293428e-13 -1.6945820e-13 8.3266727e-17 - -Velocity - x y z -[minimum ] -8.1287669e-05 -6.3942213e-05 -1.1596297e-04 -[maximum ] 9.2957001e-05 7.1603576e-05 9.3502859e-05 - -Completed cycle 1 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.390 0.390 0.390 0.390000 (1 call) - Time step loop: 0.030 0.030 0.030 0.030000 (1 call) - Propagation: 0.000 0.000 0.000 0.000000 (1 call) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Collision: 0.010 0.010 0.010 0.010000 (1 call) - Collision (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - Lattice halos: 0.000 0.000 0.000 0.000000 (1 call) - phi gradients: 0.010 0.010 0.010 0.010000 (1 call) - phi grad (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - phi halos: 0.000 0.000 0.000 0.000000 (1 call) - BBL: 0.000 0.000 0.000 0.000000 (1 call) - Force calculation: 0.010 0.010 0.010 0.010000 (1 call) - Phi force (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi update: 0.000 0.000 0.000 0.000000 (1 call) - Velocity Halo : 0.000 0.000 0.000 0.000000 (1 call) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (1 call) -BP BE update (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Free1: 0.110 0.110 0.110 0.110000 (1 call) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-init-lcr.inp b/tests/regression/d3q19-short-gpu/serial-init-lcr.inp deleted file mode 120000 index ef5d2a95c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-lcr.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-init-lcr.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-init-lcr.log b/tests/regression/d3q19-short-gpu/serial-init-lcr.log deleted file mode 100644 index 5ccb64d7e..000000000 --- a/tests/regression/d3q19-short-gpu/serial-init-lcr.log +++ /dev/null @@ -1,151 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 22 user parameters from serial-init-lcr.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.4384711e-02 -Magnitude of order gamma = 3.1764706e+00 -Pitch wavevector q0 = 2.7768018e-01 -... gives pitch length = 2.2627417e+01 -Elastic constant kappa0 = 1.0000000e-02 -Elastic constant kappa1 = 1.0000000e-02 -Amplitude (uniaxial) order = 1.0000000e-02 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 1.3500000e+00 -Reduced temperature = -5.0000003e-01 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -Liquid crystal activity No - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab randomly -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 9.6824908e-02 2.9548617e-06 2.0059123e-05 -5.0000000e-03 9.9999628e-03 -[phi] 1.1240589e+00 3.4303554e-05 1.5019305e-05 -7.4986395e-03 7.4987285e-03 -[phi] -1.6546171e+00 -5.0494907e-05 1.4932612e-05 -7.4994285e-03 7.4987352e-03 -[phi] -9.4761747e-01 -2.8918990e-05 1.9648064e-05 -5.0000000e-03 9.9995019e-03 -[phi] 1.8663767e-01 5.6957296e-06 1.5185990e-05 -7.4997452e-03 7.4998120e-03 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 5.1500393e-09 0.99965653573 1.00027956635 -[phi] 9.6805383e-02 2.9542659e-06 1.9810249e-05 -4.9950524e-03 9.9626879e-03 -[phi] 1.1238322e+00 3.4296637e-05 1.4833672e-05 -7.4600000e-03 7.4838634e-03 -[phi] -1.6542835e+00 -5.0484725e-05 1.4747918e-05 -7.4689141e-03 7.4748002e-03 -[phi] -9.4742638e-01 -2.8913159e-05 1.9405274e-05 -4.9953337e-03 9.9515476e-03 -[phi] 1.8660003e-01 5.6945811e-06 1.4999371e-05 -7.4666375e-03 7.4628443e-03 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 1 4.1939266308e-02 3.2768000000e+04 1.2798848361e-06 -7.3638579886e-08 1.3535234160e-06 1.0000000000e+00 - -Momentum - x y z -[total ] 4.5026136e-13 -4.4859949e-15 3.0392355e-15 -[fluid ] 4.5026136e-13 -4.4859949e-15 3.0392355e-15 - -Velocity - x y z -[minimum ] -2.9064502e-04 -3.3315770e-04 -2.8173294e-04 -[maximum ] 3.0977855e-04 2.7796968e-04 2.9457001e-04 - -Completed cycle 1 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.410 0.410 0.410 0.410000 (1 call) - Time step loop: 0.020 0.020 0.020 0.020000 (1 call) - Propagation: 0.000 0.000 0.000 0.000000 (1 call) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Collision: 0.000 0.000 0.000 0.000000 (1 call) - Collision (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Lattice halos: 0.000 0.000 0.000 0.000000 (1 call) - phi gradients: 0.000 0.000 0.000 0.000000 (1 call) - phi grad (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi halos: 0.000 0.000 0.000 0.000000 (1 call) - BBL: 0.000 0.000 0.000 0.000000 (1 call) - Force calculation: 0.010 0.010 0.010 0.010000 (1 call) - Phi force (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - phi update: 0.010 0.010 0.010 0.010000 (1 call) - Velocity Halo : 0.000 0.000 0.000 0.000000 (1 call) -BE mol field (krnl) : 0.000 0.000 0.000 0.000000 (1 call) -BP BE update (krnl) : 0.010 0.010 0.010 0.010000 (1 call) - Advectn (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Advectn BCS (krnl) : 0.000 0.000 0.000 0.000000 (1 call) - Free1: 0.120 0.120 0.120 0.120000 (1 call) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-relx-bp1.inp b/tests/regression/d3q19-short-gpu/serial-relx-bp1.inp deleted file mode 120000 index 1a984d166..000000000 --- a/tests/regression/d3q19-short-gpu/serial-relx-bp1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-relx-bp1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-relx-bp1.log b/tests/regression/d3q19-short-gpu/serial-relx-bp1.log deleted file mode 100644 index c6e6046ee..000000000 --- a/tests/regression/d3q19-short-gpu/serial-relx-bp1.log +++ /dev/null @@ -1,137 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 23 user parameters from serial-relx-bp1.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.4384711e-02 -Magnitude of order gamma = 3.1764706e+00 -Pitch wavevector q0 = 2.7768018e-01 -... gives pitch length = 2.2627417e+01 -Elastic constant kappa0 = 1.0000000e-02 -Elastic constant kappa1 = 1.0000000e-02 -Amplitude (uniaxial) order = -2.0000000e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 1.3500000e+00 -Reduced temperature = -5.0000003e-01 -Initial redshift = 8.3000000e-01 -Dynamic redshift update = no -Liquid crystal activity No - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e-01 -Bulk viscosity 1.66667e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 1.00000e+00 -Bulk relaxation time: 1.00000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: off - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab using O8M (BPI) -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 1.0103030e-14 3.0831999e-19 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.3725132e-12 -4.1885779e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -1.2522761e-12 -3.8216433e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -3.2682190e-14 -9.9738130e-19 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.4969692e-12 -4.5683875e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 5.9486157e-14 1.8153734e-18 4.2061932e-02 -3.3730903e-01 4.2727217e-01 -[phi] 4.1711698e-06 1.2729400e-10 2.9266368e-02 -4.2308335e-01 4.2308335e-01 -[phi] 4.1711701e-06 1.2729401e-10 2.9266368e-02 -4.2308335e-01 4.2308335e-01 -[phi] 4.0478905e-14 1.2353181e-18 4.2061932e-02 -3.3730903e-01 4.2727217e-01 -[phi] 4.1711696e-06 1.2729399e-10 2.9266368e-02 -4.2308335e-01 4.2308335e-01 - -Free energies - timestep f v f/v f_bulk/v f_grad/v redshift -[fe] 100 4.0689349779e+01 3.2768000000e+04 1.2417404107e-03 1.2227885274e-03 1.8951883289e-05 8.3000000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Completed cycle 100 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.770 0.770 0.770 0.770000 (1 call) - Time step loop: 0.000 0.020 0.400 0.004000 (100 calls) - phi gradients: 0.000 0.020 0.280 0.002800 (100 calls) - phi grad (krnl) : 0.000 0.010 0.210 0.002100 (100 calls) - phi halos: 0.000 0.010 0.070 0.000700 (100 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (100 calls) - phi update: 0.000 0.010 0.120 0.001200 (100 calls) -BE mol field (krnl) : 0.000 0.010 0.080 0.000800 (100 calls) -BP BE update (krnl) : 0.000 0.010 0.040 0.000400 (100 calls) - Free1: 0.000 0.110 0.110 0.001100 (100 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-rest-c01.inp b/tests/regression/d3q19-short-gpu/serial-rest-c01.inp deleted file mode 120000 index c6d8f6b96..000000000 --- a/tests/regression/d3q19-short-gpu/serial-rest-c01.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-rest-c01.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-rest-c01.log b/tests/regression/d3q19-short-gpu/serial-rest-c01.log deleted file mode 120000 index 8195ed407..000000000 --- a/tests/regression/d3q19-short-gpu/serial-rest-c01.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-rest-c01.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-rest-c02.inp b/tests/regression/d3q19-short-gpu/serial-rest-c02.inp deleted file mode 120000 index df3b69044..000000000 --- a/tests/regression/d3q19-short-gpu/serial-rest-c02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-rest-c02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-rest-c02.log b/tests/regression/d3q19-short-gpu/serial-rest-c02.log deleted file mode 100644 index b81bf13c0..000000000 --- a/tests/regression/d3q19-short-gpu/serial-rest-c02.log +++ /dev/null @@ -1,134 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 22 user parameters from serial-rest-c02.inp - -No free energy selected - -System details --------------- -System size: 64 64 64 -Decomposition: 1 1 1 -Local domain: 64 64 64 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -colloid_io_read: reading from config.cds00000020.001-001 etc -Read a total of 1 colloids from file - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 22 22 22 -Final cell lengths: 2.9090909e+00 2.9090909e+00 2.9090909e+00 - -Re-starting simulation at step 20 with data read from config -file(s) dist-00000020 -hydro files(s) vel-00000020 -Initial conditions. - -Scalars - total mean variance min max -[rho] 262094.00 1.00000000000 2.6522509e-08 0.99854657671 1.00149980641 - -Momentum - x y z -[total ] 2.2158700e+00 1.5289503e+00 1.5289503e+00 -[fluid ] 2.0018133e+00 1.3801259e+00 1.3801259e+00 -[colloids] 2.1405671e-01 1.4882439e-01 1.4882439e-01 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] 2.2741253e-03 1.5762029e-03 1.5762029e-03 -[maximum ] 2.2741253e-03 1.5762029e-03 1.5762029e-03 - -Scalars - total mean variance min max -[rho] 262094.00 1.00000000000 1.2529717e-08 0.99956353524 1.00044500185 - -Momentum - x y z -[total ] 2.2158700e+00 1.5289503e+00 1.5289503e+00 -[fluid ] 2.1022039e+00 1.4504822e+00 1.4504822e+00 -[colloids] 1.1366612e-01 7.8468162e-02 7.8468162e-02 - -Velocity - x y z -[minimum ] -3.0980319e-04 -3.9164577e-04 -3.9164577e-04 -[maximum ] 2.2973258e-03 1.6632562e-03 1.6632562e-03 - -Completed cycle 40 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 3.070 3.070 3.070 3.070000 (1 call) - Time step loop: 0.090 0.110 1.990 0.099500 (20 calls) - Propagation: 0.000 0.020 0.180 0.009000 (20 calls) - Propagtn (krnl) : 0.000 0.020 0.180 0.009000 (20 calls) - Collision: 0.000 0.020 0.120 0.006000 (20 calls) - Collision (krnl) : 0.000 0.020 0.120 0.006000 (20 calls) - Lattice halos: 0.000 0.030 0.550 0.013750 (40 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (20 calls) - Forces: 0.000 0.000 0.000 0.000000 (20 calls) - Rebuild: 0.010 0.010 0.200 0.010000 (20 calls) - BBL: 0.020 0.030 0.460 0.023000 (20 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (20 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (20 calls) - phi update: 0.000 0.000 0.000 0.000000 (20 calls) - Free1: 0.000 0.280 0.280 0.004667 (60 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-spin-c02.inp b/tests/regression/d3q19-short-gpu/serial-spin-c02.inp deleted file mode 120000 index cc0cbbcdb..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-c02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-c02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-c02.log b/tests/regression/d3q19-short-gpu/serial-spin-c02.log deleted file mode 120000 index 8ba12cbab..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-c02.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-c02.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-fd1.inp b/tests/regression/d3q19-short-gpu/serial-spin-fd1.inp deleted file mode 120000 index 97171694f..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-fd1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-fd1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-fd1.log b/tests/regression/d3q19-short-gpu/serial-spin-fd1.log deleted file mode 120000 index a8fe64f7d..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-fd1.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-fd1.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-fd2.inp b/tests/regression/d3q19-short-gpu/serial-spin-fd2.inp deleted file mode 120000 index 4865b5ddc..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-fd2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-fd2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-fd2.log b/tests/regression/d3q19-short-gpu/serial-spin-fd2.log deleted file mode 120000 index 8adef8fe6..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-fd2.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-fd2.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-lb1.inp b/tests/regression/d3q19-short-gpu/serial-spin-lb1.inp deleted file mode 120000 index 49f49a076..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-lb1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-lb1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-lb1.log b/tests/regression/d3q19-short-gpu/serial-spin-lb1.log deleted file mode 120000 index 85af9309c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-lb1.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-lb1.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-lb2.inp b/tests/regression/d3q19-short-gpu/serial-spin-lb2.inp deleted file mode 120000 index 6e6b35606..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-lb2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-lb2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-lb2.log b/tests/regression/d3q19-short-gpu/serial-spin-lb2.log deleted file mode 100644 index 864881f24..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-lb2.log +++ /dev/null @@ -1,133 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 22 user parameters from serial-spin-lb2.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 0 0 0 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-03 -Bulk parameter B = 6.25000e-03 -Surface penalty kappa = 4.00000e-03 -Surface tension = 4.71405e-03 -Interfacial width = 1.13137e+00 - -Using full lattice Boltzmann solver for Cahn-Hilliard: -Mobility M = 3.75000e+00 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 6.25000e-03 -Bulk viscosity 6.25000e-03 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 2 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 5.18750e-01 -Bulk relaxation time: 5.18750e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 -Initialising phi for spinodal - -Boundary walls --------------- -Boundary walls: X Y Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 30336 -Memory (total, bytes): 485376 -Boundary shear initialise: 0 -Gradient calculation: 3d_27pt_solid -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -5.9892076e+00 -1.8277611e-04 8.3100414e-04 -4.9989121e-02 4.9997941e-02 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 8.3601348e-11 0.99996729891 1.00002317848 -[phi] -5.9892076e+00 -1.8277611e-04 4.8107467e-04 -5.4252546e-02 5.3888958e-02 - -Free energies - timestep f v f/v f_s1 fs_s2 -[fe] 40 -4.1390835011e-02 3.2768000000e+04 -1.2631480411e-06 0.0000000000e+00 0.0000000000e+00 - -Momentum - x y z -[total ] 4.0609877e-14 1.8093166e-14 1.8329088e-14 -[fluid ] 1.1410526e-04 -9.7604906e-04 -1.7379322e-04 -[walls ] -1.1410526e-04 9.7604906e-04 1.7379322e-04 - -Velocity - x y z -[minimum ] -1.5629928e-05 -1.4460037e-05 -1.5091671e-05 -[maximum ] 1.8897739e-05 1.4357452e-05 1.3674644e-05 - -Completed cycle 40 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.770 0.770 0.770 0.770000 (1 call) - Time step loop: 0.000 0.020 0.430 0.010750 (40 calls) - Propagation: 0.000 0.010 0.150 0.003750 (40 calls) - Propagtn (krnl) : 0.000 0.010 0.150 0.003750 (40 calls) - Collision: 0.000 0.020 0.100 0.002500 (40 calls) - Collision (krnl) : 0.000 0.020 0.100 0.002500 (40 calls) - Lattice halos: 0.000 0.010 0.060 0.001500 (40 calls) - phi gradients: 0.000 0.010 0.090 0.002250 (40 calls) - phi halos: 0.000 0.010 0.060 0.001500 (40 calls) - BBL: 0.000 0.010 0.030 0.000750 (40 calls) - Free1: 0.000 0.040 0.040 0.001000 (40 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-spin-n02.inp b/tests/regression/d3q19-short-gpu/serial-spin-n02.inp deleted file mode 120000 index 204cc9924..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-n02.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-n02.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-spin-n02.log b/tests/regression/d3q19-short-gpu/serial-spin-n02.log deleted file mode 120000 index cf83306bc..000000000 --- a/tests/regression/d3q19-short-gpu/serial-spin-n02.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-spin-n02.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-sqmr-st1.inp b/tests/regression/d3q19-short-gpu/serial-sqmr-st1.inp deleted file mode 120000 index 3a47bbef0..000000000 --- a/tests/regression/d3q19-short-gpu/serial-sqmr-st1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-sqmr-st1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-sqmr-st1.log b/tests/regression/d3q19-short-gpu/serial-sqmr-st1.log deleted file mode 100644 index f74e619b1..000000000 --- a/tests/regression/d3q19-short-gpu/serial-sqmr-st1.log +++ /dev/null @@ -1,138 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 24 user parameters from serial-sqmr-st1.inp - -No free energy selected - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one active -colloid_one_a0 7.2500000e+00 -colloid_one_ah 7.2500000e+00 -colloid_one_r 3.2000000e+01 3.2000000e+01 3.2000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_m 1.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_b1 5.0000000e-02 -colloid_one_b2 5.0000000e-02 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 7.2500000e+00 -Final cell list: 4 4 4 -Final cell lengths: 8.0000000e+00 8.0000000e+00 8.0000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 31193.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 4.3288984e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.3288984e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] 2.1404693e-02 1.0524297e-17 -1.4035598e-17 -[maximum ] 2.1404693e-02 1.0524297e-17 -1.4035598e-17 - -Scalars - total mean variance min max -[rho] 31173.00 1.00000000000 5.0838964e-07 0.99225554160 1.00513736852 - -Momentum - x y z -[total ] 4.9737992e-13 -2.1905157e-14 -1.0582290e-13 -[fluid ] -3.4373444e+01 -4.0786818e-14 -8.2513857e-14 -[colloids] 3.4373444e+01 1.8881662e-14 -2.3309044e-14 - -Velocity - x y z -[minimum ] -3.4235679e-02 -3.4140000e-02 -3.4140000e-02 -[maximum ] 2.1216647e-02 3.4140000e-02 3.4140000e-02 - -Completed cycle 50 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 1.240 1.240 1.240 1.240000 (1 call) - Time step loop: 0.010 0.030 0.960 0.019200 (50 calls) - Propagation: 0.000 0.020 0.090 0.001800 (50 calls) - Propagtn (krnl) : 0.000 0.020 0.090 0.001800 (50 calls) - Collision: 0.000 0.010 0.040 0.000800 (50 calls) - Collision (krnl) : 0.000 0.010 0.040 0.000800 (50 calls) - Lattice halos: 0.000 0.010 0.330 0.003300 (100 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (50 calls) - Forces: 0.000 0.000 0.000 0.000000 (50 calls) - Rebuild: 0.000 0.010 0.130 0.002600 (50 calls) - BBL: 0.000 0.020 0.190 0.003800 (50 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (50 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (50 calls) - phi update: 0.000 0.000 0.000 0.000000 (50 calls) - Free1: 0.000 0.030 0.030 0.000200 (150 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-sqmr-st2.inp b/tests/regression/d3q19-short-gpu/serial-sqmr-st2.inp deleted file mode 120000 index c8237a4e0..000000000 --- a/tests/regression/d3q19-short-gpu/serial-sqmr-st2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-sqmr-st2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-sqmr-st2.log b/tests/regression/d3q19-short-gpu/serial-sqmr-st2.log deleted file mode 100644 index 8949c2e0d..000000000 --- a/tests/regression/d3q19-short-gpu/serial-sqmr-st2.log +++ /dev/null @@ -1,150 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 32 user parameters from serial-sqmr-st2.inp - -No free energy selected - -System details --------------- -System size: 32 32 32 -Decomposition: 1 1 1 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one active -colloid_one_a0 7.2500000e+00 -colloid_one_ah 7.2500000e+00 -colloid_one_r 3.2000000e+01 3.2000000e+01 3.2000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_m 1.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_b1 5.0000000e-02 -colloid_one_b2 5.0000000e-02 -Requested second colloid via input: -colloid_two active -colloid_two_a0 7.2500000e+00 -colloid_two_ah 7.2500000e+00 -colloid_two_r 1.7000000e+01 3.2000000e+01 3.2000000e+01 -colloid_two_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_two_m 0.0000000e+00 1.0000000e+00 0.0000000e+00 -colloid_two_b1 5.0000000e-02 -colloid_two_b2 5.0000000e-02 - -Initialised 2 colloids - -Colloid cell list information ------------------------------ -Input radius maximum: 7.2500000e+00 -Hydrodynamic radius maximum: 7.2500000e+00 -Surface-surface interaction: 0.0000000e+00 -Centre-centre interaction: 0.0000000e+00 -Final cell list: 2 2 2 -Final cell lengths: 1.6000000e+01 1.6000000e+01 1.6000000e+01 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 29618.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 4.1103232e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.1103232e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] 1.9170351e-03 -2.1423744e-03 -1.7311286e-17 -[maximum ] 1.9945901e-02 2.1104863e-02 -3.2404066e-18 - -Scalars - total mean variance min max -[rho] 29568.00 1.00000000000 2.0606893e-06 0.93753747592 1.00661818770 - -Momentum - x y z -[total ] 6.3948846e-13 -1.1723955e-12 -1.3123123e-13 -[fluid ] -3.5021545e+01 -3.0448926e+01 -8.8470897e-14 -[colloids] 3.5021545e+01 3.0448926e+01 -4.2760337e-14 - -Velocity - x y z -[minimum ] -3.5809332e-02 -3.5133902e-02 -3.3966129e-02 -[maximum ] 3.4926089e-02 3.2330916e-02 3.3966129e-02 - -Completed cycle 50 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 1.390 1.390 1.390 1.390000 (1 call) - Time step loop: 0.010 0.030 1.110 0.022200 (50 calls) - Propagation: 0.000 0.010 0.100 0.002000 (50 calls) - Propagtn (krnl) : 0.000 0.010 0.080 0.001600 (50 calls) - Collision: 0.000 0.010 0.060 0.001200 (50 calls) - Collision (krnl) : 0.000 0.010 0.060 0.001200 (50 calls) - Lattice halos: 0.000 0.010 0.180 0.001800 (100 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (50 calls) - Forces: 0.000 0.000 0.000 0.000000 (50 calls) - Rebuild: 0.000 0.010 0.290 0.005800 (50 calls) - BBL: 0.000 0.010 0.270 0.005400 (50 calls) - Particle halos: 0.000 0.010 0.020 0.000400 (50 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (50 calls) - phi update: 0.000 0.000 0.000 0.000000 (50 calls) - Free1: 0.000 0.030 0.030 0.000200 (150 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-symm-dr1.inp b/tests/regression/d3q19-short-gpu/serial-symm-dr1.inp deleted file mode 120000 index 68ff393e2..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-dr1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-dr1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-symm-dr1.log b/tests/regression/d3q19-short-gpu/serial-symm-dr1.log deleted file mode 120000 index d32388ccc..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-dr1.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-dr1.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-symm-dr2.inp b/tests/regression/d3q19-short-gpu/serial-symm-dr2.inp deleted file mode 120000 index 93d988ed7..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-dr2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-dr2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-symm-dr2.log b/tests/regression/d3q19-short-gpu/serial-symm-dr2.log deleted file mode 120000 index 922479cd5..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-dr2.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-dr2.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-symm-pat.inp b/tests/regression/d3q19-short-gpu/serial-symm-pat.inp deleted file mode 120000 index d4b4922de..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-pat.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-pat.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-symm-pat.log b/tests/regression/d3q19-short-gpu/serial-symm-pat.log deleted file mode 120000 index b8ca2ad89..000000000 --- a/tests/regression/d3q19-short-gpu/serial-symm-pat.log +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-symm-pat.log \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st1.inp b/tests/regression/d3q19-short-gpu/serial-wall-st1.inp deleted file mode 120000 index b2b253246..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st1.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-wall-st1.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st1.log b/tests/regression/d3q19-short-gpu/serial-wall-st1.log deleted file mode 100644 index 8238af49c..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st1.log +++ /dev/null @@ -1,113 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 15 user parameters from serial-wall-st1.inp - -No free energy selected - -System details --------------- -System size: 24 24 24 -Decomposition: 1 1 1 -Local domain: 24 24 24 -Periodic: 0 0 0 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 1.00000e-07 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: on -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Boundary walls --------------- -Boundary walls: X Y Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 16992 -Memory (total, bytes): 271872 -Boundary shear initialise: 0 -Initial conditions. - -Scalars - total mean variance min max -[rho] 13824.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 1.9184654e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 1.9184654e-13 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 13824.00 1.00000000000 2.9767417e-07 0.99812427185 1.00227280424 - -Momentum - x y z -[total ] -4.7080395e-15 -1.4155344e-15 -7.0221606e-15 -[fluid ] 1.3781559e-03 2.4415999e-02 -1.3165805e-02 -[walls ] -1.3781559e-03 -2.4415999e-02 1.3165805e-02 - -Velocity - x y z -[minimum ] -1.2176050e-03 -1.1927868e-03 -1.1565780e-03 -[maximum ] 1.1621641e-03 1.0926301e-03 1.1467945e-03 - -Isothermal fluctuations -[eqipart.] 9.9226772e-08 9.6966649e-08 9.9668026e-08 -[measd/kT] 2.9586145e-07 3.0000000e-07 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.290 0.290 0.290 0.290000 (1 call) - Time step loop: 0.000 0.010 0.030 0.003000 (10 calls) - Propagation: 0.000 0.010 0.010 0.001000 (10 calls) - Propagtn (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Collision: 0.000 0.010 0.010 0.001000 (10 calls) - Collision (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Lattice halos: 0.000 0.000 0.000 0.000000 (10 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.020 0.020 0.002000 (10 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st2.inp b/tests/regression/d3q19-short-gpu/serial-wall-st2.inp deleted file mode 120000 index c25845edc..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st2.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-wall-st2.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st2.log b/tests/regression/d3q19-short-gpu/serial-wall-st2.log deleted file mode 100644 index 1bef975ac..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st2.log +++ /dev/null @@ -1,149 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 21 user parameters from serial-wall-st2.inp - -No free energy selected - -System details --------------- -System size: 24 24 24 -Decomposition: 1 1 1 -Local domain: 24 24 24 -Periodic: 0 0 0 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Boundary walls --------------- -Boundary walls: X Y Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 16992 -Memory (total, bytes): 271872 -Boundary shear initialise: 0 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_a0 2.3000000e+00 -colloid_one_ah 2.3000000e+00 -colloid_one_r 1.3300000e+01 1.2500000e+01 1.2500000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 8 8 8 -Final cell lengths: 3.0000000e+00 3.0000000e+00 3.0000000e+00 - -Sedimentation force on: yes -Sedimentation force: -1.0000000e-03 0.0000000e+00 0.0000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] -5.1131227e-05 1.5187583e-18 1.0083681e-17 -[maximum ] -5.1131227e-05 1.5187583e-18 1.0083681e-17 - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 9.0167873e-12 0.99997031972 1.00003543274 - -Momentum - x y z -[total ] 3.1990036e-13 3.3135589e-14 1.8808250e-14 -[fluid ] -9.3711996e-04 -1.3772317e-13 8.2052420e-14 -[colloids] -2.7626320e-03 -1.5722410e-16 4.8957052e-16 -[walls ] 3.6997519e-03 1.7101598e-13 -6.3733741e-14 - -Velocity - x y z -[minimum ] -4.6827710e-05 -1.7425166e-05 -1.7425166e-05 -[maximum ] 5.0213322e-06 1.7425166e-05 1.7425166e-05 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.350 0.350 0.350 0.350000 (1 call) - Time step loop: 0.010 0.020 0.120 0.012000 (10 calls) - Propagation: 0.000 0.010 0.010 0.001000 (10 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Collision: 0.000 0.010 0.010 0.001000 (10 calls) - Collision (krnl) : 0.000 0.010 0.010 0.001000 (10 calls) - Lattice halos: 0.000 0.010 0.050 0.002500 (20 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - Forces: 0.000 0.010 0.010 0.001000 (10 calls) - Rebuild: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.010 0.030 0.003000 (10 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.010 0.010 0.000333 (30 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st3.inp b/tests/regression/d3q19-short-gpu/serial-wall-st3.inp deleted file mode 120000 index 0c834f9f9..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st3.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-wall-st3.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st3.log b/tests/regression/d3q19-short-gpu/serial-wall-st3.log deleted file mode 100644 index 8664eae41..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st3.log +++ /dev/null @@ -1,149 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 21 user parameters from serial-wall-st3.inp - -No free energy selected - -System details --------------- -System size: 24 24 24 -Decomposition: 1 1 1 -Local domain: 24 24 24 -Periodic: 0 0 0 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Boundary walls --------------- -Boundary walls: X Y Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 0.0000000e+00 -Wall boundary links allocated: 16992 -Memory (total, bytes): 271872 -Boundary shear initialise: 0 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_a0 2.3000000e+00 -colloid_one_ah 2.3000000e+00 -colloid_one_r 3.0000000e+00 1.2500000e+01 1.2500000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 8 8 8 -Final cell lengths: 3.0000000e+00 3.0000000e+00 3.0000000e+00 - -Sedimentation force on: yes -Sedimentation force: -1.0000000e-03 0.0000000e+00 0.0000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] -4.5243068e-05 2.9439244e-18 7.1875746e-18 -[maximum ] -4.5243068e-05 2.9439244e-18 7.1875746e-18 - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 1.2677637e-11 0.99997921616 1.00009468367 - -Momentum - x y z -[total ] 3.7835794e-13 4.5483304e-14 1.3710263e-14 -[fluid ] 4.3961413e-03 -1.2550724e-13 7.7000906e-14 -[colloids] -2.3679093e-03 4.7416840e-16 3.0432001e-16 -[walls ] -2.0282320e-03 1.7051638e-13 -6.3594963e-14 - -Velocity - x y z -[minimum ] -3.2297546e-05 -2.2266791e-05 -2.2266791e-05 -[maximum ] 6.9411580e-06 2.2266791e-05 2.2266791e-05 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.350 0.350 0.350 0.350000 (1 call) - Time step loop: 0.010 0.020 0.110 0.011000 (10 calls) - Propagation: 0.000 0.010 0.030 0.003000 (10 calls) - Propagtn (krnl) : 0.000 0.010 0.030 0.003000 (10 calls) - Collision: 0.000 0.010 0.020 0.002000 (10 calls) - Collision (krnl) : 0.000 0.010 0.020 0.002000 (10 calls) - Lattice halos: 0.000 0.010 0.030 0.001500 (20 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - Forces: 0.000 0.000 0.000 0.000000 (10 calls) - Rebuild: 0.000 0.010 0.010 0.001000 (10 calls) - BBL: 0.000 0.010 0.010 0.001000 (10 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.010 0.010 0.000333 (30 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st4.inp b/tests/regression/d3q19-short-gpu/serial-wall-st4.inp deleted file mode 120000 index 7680378bc..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st4.inp +++ /dev/null @@ -1 +0,0 @@ -../d3q19-short/serial-wall-st4.inp \ No newline at end of file diff --git a/tests/regression/d3q19-short-gpu/serial-wall-st4.log b/tests/regression/d3q19-short-gpu/serial-wall-st4.log deleted file mode 100644 index 9197f2bda..000000000 --- a/tests/regression/d3q19-short-gpu/serial-wall-st4.log +++ /dev/null @@ -1,149 +0,0 @@ -Welcome to Ludwig v0.9.0 (Serial version running on 1 process) - -Note assertions via standard C assert() are on. - -Target thread model: CUDA. -Default threads per block: 128; max. threads per block: 1024. - -Read 22 user parameters from serial-wall-st4.inp - -No free energy selected - -System details --------------- -System size: 24 24 24 -Decomposition: 1 1 1 -Local domain: 24 24 24 -Periodic: 0 0 0 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Boundary walls --------------- -Boundary walls: X Y Z -Boundary speed u_x (bottom): 0.0000000e+00 -Boundary speed u_x (top): 0.0000000e+00 -Boundary normal lubrication rc: 5.0000000e-01 -Wall boundary links allocated: 16992 -Memory (total, bytes): 271872 -Boundary shear initialise: 0 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_a0 2.3000000e+00 -colloid_one_ah 2.3000000e+00 -colloid_one_r 3.0000000e+00 1.2500000e+01 1.2500000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 2.3000000e+00 -Final cell list: 8 8 8 -Final cell lengths: 3.0000000e+00 3.0000000e+00 3.0000000e+00 - -Sedimentation force on: yes -Sedimentation force: -1.0000000e-03 0.0000000e+00 0.0000000e+00 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 1.9118040e-13 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] -1.9724296e-05 -8.0183047e-18 -6.6380695e-18 -[maximum ] -1.9724296e-05 -8.0183047e-18 -6.6380695e-18 - -Scalars - total mean variance min max -[rho] 13776.00 1.00000000000 2.4840130e-12 0.99999236720 1.00004102191 - -Momentum - x y z -[total ] 3.8308332e-13 4.4049230e-14 1.1373041e-14 -[fluid ] 5.5265535e-03 -1.2761667e-13 7.5797008e-14 -[colloids] -1.0153572e-03 1.1539929e-17 -3.8491513e-16 -[walls ] -4.5111962e-03 1.7165436e-13 -6.4039052e-14 - -Velocity - x y z -[minimum ] -1.4160144e-05 -1.0388853e-05 -1.0388853e-05 -[maximum ] 3.7650664e-06 1.0388853e-05 1.0388853e-05 - -Completed cycle 10 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 0.350 0.350 0.350 0.350000 (1 call) - Time step loop: 0.000 0.020 0.110 0.011000 (10 calls) - Propagation: 0.000 0.000 0.000 0.000000 (10 calls) - Propagtn (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Collision: 0.000 0.010 0.010 0.001000 (10 calls) - Collision (krnl) : 0.000 0.000 0.000 0.000000 (10 calls) - Lattice halos: 0.000 0.010 0.050 0.002500 (20 calls) - phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) - Forces: 0.000 0.000 0.000 0.000000 (10 calls) - Rebuild: 0.000 0.000 0.000 0.000000 (10 calls) - BBL: 0.000 0.010 0.040 0.004000 (10 calls) - Particle halos: 0.000 0.000 0.000 0.000000 (10 calls) - Force calculation: 0.000 0.000 0.000 0.000000 (10 calls) - phi update: 0.000 0.000 0.000 0.000000 (10 calls) - Free1: 0.000 0.010 0.010 0.000333 (30 calls) -Ludwig finished normally. From aa78c4eee85173a2d4b2cb8dc2489e2e6c9b687c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 16 May 2022 16:45:19 +0100 Subject: [PATCH 03/79] Remove unused key --- tests/regression/d3q19-extra/serial-auto-c02.inp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/regression/d3q19-extra/serial-auto-c02.inp b/tests/regression/d3q19-extra/serial-auto-c02.inp index f25f4d0cb..756771c7b 100644 --- a/tests/regression/d3q19-extra/serial-auto-c02.inp +++ b/tests/regression/d3q19-extra/serial-auto-c02.inp @@ -13,7 +13,6 @@ N_cycles 40 ############################################################################## size 64_64_64 -reduced_halo no ############################################################################## # From 41690ecd011a4704961fa4f8fbd18c1c509a0950 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 16 May 2022 16:46:01 +0100 Subject: [PATCH 04/79] Cosmetic update related to full halo --- tests/regression/d3q19-extra/serial-auto-c01.log | 2 +- tests/regression/d3q19-extra/serial-auto-c02.log | 2 +- tests/regression/d3q19-extra/serial-auto-c03.log | 2 +- tests/regression/d3q19-extra/serial-auto-c04.log | 2 +- tests/regression/d3q19-extra/serial-spin-lb3.log | 2 +- tests/regression/d3q19-extra/serial-spin-lb4.log | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/regression/d3q19-extra/serial-auto-c01.log b/tests/regression/d3q19-extra/serial-auto-c01.log index 229876b5d..8665fd8f5 100644 --- a/tests/regression/d3q19-extra/serial-auto-c01.log +++ b/tests/regression/d3q19-extra/serial-auto-c01.log @@ -33,7 +33,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 1 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 diff --git a/tests/regression/d3q19-extra/serial-auto-c02.log b/tests/regression/d3q19-extra/serial-auto-c02.log index 88cce079d..7e50eb5f2 100644 --- a/tests/regression/d3q19-extra/serial-auto-c02.log +++ b/tests/regression/d3q19-extra/serial-auto-c02.log @@ -33,7 +33,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 1 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 diff --git a/tests/regression/d3q19-extra/serial-auto-c03.log b/tests/regression/d3q19-extra/serial-auto-c03.log index bb81efa51..320b84702 100644 --- a/tests/regression/d3q19-extra/serial-auto-c03.log +++ b/tests/regression/d3q19-extra/serial-auto-c03.log @@ -32,7 +32,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 1 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 diff --git a/tests/regression/d3q19-extra/serial-auto-c04.log b/tests/regression/d3q19-extra/serial-auto-c04.log index 190993d1d..75de51874 100644 --- a/tests/regression/d3q19-extra/serial-auto-c04.log +++ b/tests/regression/d3q19-extra/serial-auto-c04.log @@ -32,7 +32,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 1 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 diff --git a/tests/regression/d3q19-extra/serial-spin-lb3.log b/tests/regression/d3q19-extra/serial-spin-lb3.log index 0ed8119b8..ba9692705 100644 --- a/tests/regression/d3q19-extra/serial-spin-lb3.log +++ b/tests/regression/d3q19-extra/serial-spin-lb3.log @@ -53,7 +53,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 2 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 diff --git a/tests/regression/d3q19-extra/serial-spin-lb4.log b/tests/regression/d3q19-extra/serial-spin-lb4.log index 2125b996e..02616f61d 100644 --- a/tests/regression/d3q19-extra/serial-spin-lb4.log +++ b/tests/regression/d3q19-extra/serial-spin-lb4.log @@ -53,7 +53,7 @@ Lattice Boltzmann distributions Model: d3q19 SIMD vector len: 1 Number of sets: 2 -Halo type: full +Halo type: lb_halo_target (full halo) Input format: binary Output format: binary I/O grid: 1 1 1 From 38e8e2027f67124932c4fe18d0441f23dd0a43f4 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 16 May 2022 17:05:18 +0100 Subject: [PATCH 05/79] Re-combine extra tests with short tests --- tests/regression/{d3q19-extra => d3q19-short}/serial-ah01-125.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-ah01-125.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c01.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c01.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c02.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c02.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c03.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c03.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c04.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c04.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb3.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb3.log | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb4.inp | 0 tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb4.log | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename tests/regression/{d3q19-extra => d3q19-short}/serial-ah01-125.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-ah01-125.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c01.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c01.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c02.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c02.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c03.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c03.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c04.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-auto-c04.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb3.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb3.log (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb4.inp (100%) rename tests/regression/{d3q19-extra => d3q19-short}/serial-spin-lb4.log (100%) diff --git a/tests/regression/d3q19-extra/serial-ah01-125.inp b/tests/regression/d3q19-short/serial-ah01-125.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-ah01-125.inp rename to tests/regression/d3q19-short/serial-ah01-125.inp diff --git a/tests/regression/d3q19-extra/serial-ah01-125.log b/tests/regression/d3q19-short/serial-ah01-125.log similarity index 100% rename from tests/regression/d3q19-extra/serial-ah01-125.log rename to tests/regression/d3q19-short/serial-ah01-125.log diff --git a/tests/regression/d3q19-extra/serial-auto-c01.inp b/tests/regression/d3q19-short/serial-auto-c01.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c01.inp rename to tests/regression/d3q19-short/serial-auto-c01.inp diff --git a/tests/regression/d3q19-extra/serial-auto-c01.log b/tests/regression/d3q19-short/serial-auto-c01.log similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c01.log rename to tests/regression/d3q19-short/serial-auto-c01.log diff --git a/tests/regression/d3q19-extra/serial-auto-c02.inp b/tests/regression/d3q19-short/serial-auto-c02.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c02.inp rename to tests/regression/d3q19-short/serial-auto-c02.inp diff --git a/tests/regression/d3q19-extra/serial-auto-c02.log b/tests/regression/d3q19-short/serial-auto-c02.log similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c02.log rename to tests/regression/d3q19-short/serial-auto-c02.log diff --git a/tests/regression/d3q19-extra/serial-auto-c03.inp b/tests/regression/d3q19-short/serial-auto-c03.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c03.inp rename to tests/regression/d3q19-short/serial-auto-c03.inp diff --git a/tests/regression/d3q19-extra/serial-auto-c03.log b/tests/regression/d3q19-short/serial-auto-c03.log similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c03.log rename to tests/regression/d3q19-short/serial-auto-c03.log diff --git a/tests/regression/d3q19-extra/serial-auto-c04.inp b/tests/regression/d3q19-short/serial-auto-c04.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c04.inp rename to tests/regression/d3q19-short/serial-auto-c04.inp diff --git a/tests/regression/d3q19-extra/serial-auto-c04.log b/tests/regression/d3q19-short/serial-auto-c04.log similarity index 100% rename from tests/regression/d3q19-extra/serial-auto-c04.log rename to tests/regression/d3q19-short/serial-auto-c04.log diff --git a/tests/regression/d3q19-extra/serial-spin-lb3.inp b/tests/regression/d3q19-short/serial-spin-lb3.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-spin-lb3.inp rename to tests/regression/d3q19-short/serial-spin-lb3.inp diff --git a/tests/regression/d3q19-extra/serial-spin-lb3.log b/tests/regression/d3q19-short/serial-spin-lb3.log similarity index 100% rename from tests/regression/d3q19-extra/serial-spin-lb3.log rename to tests/regression/d3q19-short/serial-spin-lb3.log diff --git a/tests/regression/d3q19-extra/serial-spin-lb4.inp b/tests/regression/d3q19-short/serial-spin-lb4.inp similarity index 100% rename from tests/regression/d3q19-extra/serial-spin-lb4.inp rename to tests/regression/d3q19-short/serial-spin-lb4.inp diff --git a/tests/regression/d3q19-extra/serial-spin-lb4.log b/tests/regression/d3q19-short/serial-spin-lb4.log similarity index 100% rename from tests/regression/d3q19-extra/serial-spin-lb4.log rename to tests/regression/d3q19-short/serial-spin-lb4.log From 7943dcfc72e421df12ef50534a61b041063e00af Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 16 May 2022 17:06:11 +0100 Subject: [PATCH 06/79] Remove unused directory --- tests/regression/d3q19-extra/Makefile | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 tests/regression/d3q19-extra/Makefile diff --git a/tests/regression/d3q19-extra/Makefile b/tests/regression/d3q19-extra/Makefile deleted file mode 100644 index 56b4e3b51..000000000 --- a/tests/regression/d3q19-extra/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################### -# -# Makefile -# -# d3q19-extra. -# -# These tersts are too long to be considered "short". -# -############################################################################### - -include ../../../Makefile.mk - -ifeq (${BUILD},parallel) -MPIRUN_NTASKS=1 -endif - -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPIRUN_CMD} ${MPIRUN_NTASK_FLAG} ${MPIRUN_NTASKS} - - -test: - @echo "TEST --> regression tests serial" - inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "${SER}" "${PAR}"; done - -clean: - rm -f *new test-diff* From 28526456db5414043f6431961791b01cf2b437b8 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 14 Jul 2022 09:12:09 +0100 Subject: [PATCH 07/79] Remove old directories --- tests/Makefile | 6 +----- tests/regression/Makefile | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 888b55ec8..a576b09b1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,7 +7,6 @@ # default: builds unit tests # test: runs unit tests and d3q19-short (default test) # d3q19-short a batch of shorter tests -# d3q19-extra a extra batch of longer tests # d3q19-io a batch of tests with file I/O # d3q19-elec a batch of tests for electrokinetics # @@ -16,7 +15,7 @@ # Edinburgh Soft Matter and Statistical Physics Group and # Edinburgh Parallel Computing Centre # -# (c) 2015-2019 The University of Edinburgh +# (c) 2015-2022 The University of Edinburgh # Contributing authors: # Kevin Stratford (kevinAepcc.ed.ac.uk) # @@ -44,9 +43,6 @@ verbose: d3q19-short: $(MAKE) -C regression/d3q19-short -d3q19-extra: - $(MAKE) -C regression/d3q19-extra - d3q19-io: $(MAKE) -C regression/d3q19-io diff --git a/tests/regression/Makefile b/tests/regression/Makefile index 74f6e8b30..0af4889bf 100644 --- a/tests/regression/Makefile +++ b/tests/regression/Makefile @@ -10,9 +10,7 @@ clean: $(MAKE) -C d2q9 clean $(MAKE) -C d3q15 clean $(MAKE) -C d3q19-short clean - $(MAKE) -C d3q19-extra clean $(MAKE) -C d3q19-elec clean - $(MAKE) -C d3q19-short-gpu clean test-clean: $(MAKE) clean From 9b62ab726b2904b60e195df40b0c4480d9a7bef7 Mon Sep 17 00:00:00 2001 From: not populated Date: Fri, 15 Jul 2022 16:41:22 +0100 Subject: [PATCH 08/79] Add first touch option for lb data --- src/distribution_rt.c | 4 +++ src/field.c | 83 ++++++++++++++++++++++++++++++++++++++----- src/field_options.c | 1 + src/field_options.h | 1 + src/lb_data_options.c | 1 + src/lb_data_options.h | 1 + src/ludwig.c | 9 +++++ src/model.c | 70 ++++++++++++++++++++++++++++++++++-- 8 files changed, 158 insertions(+), 12 deletions(-) diff --git a/src/distribution_rt.c b/src/distribution_rt.c index e6de2b750..09d3edbe4 100644 --- a/src/distribution_rt.c +++ b/src/distribution_rt.c @@ -198,6 +198,7 @@ int lb_run_time_prev(pe_t * pe, cs_t * cs, rt_t * rt, lb_t ** lb) { } options.reportimbalance = rt_switch(rt, "lb_halo_report_imbalance"); + options.usefirsttouch = rt_switch(rt, "lb_data_use_first_touch"); if (lb_data_options_valid(&options) == 0) { pe_fatal(pe, "lb_data_options are invalid. Please check halo.\n"); @@ -237,6 +238,9 @@ int lb_run_time_prev(pe_t * pe, cs_t * cs, rt_t * rt, lb_t ** lb) { if (options.reportimbalance) { pe_info(pe, "Imbalance time: %s\n", "reported"); } + if (options.usefirsttouch) { + pe_info(pe, "First touch: %s\n", "yes"); + } if (strcmp("BINARY_SERIAL", string) == 0) { pe_info(pe, "Input format: binary single serial file\n"); diff --git a/src/field.c b/src/field.c index 5c517f8a7..69da65c30 100644 --- a/src/field.c +++ b/src/field.c @@ -18,7 +18,7 @@ * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) - * Aln Gray (alang@epcc.ed.ac.uk) + * Alan Gray (alang@epcc.ed.ac.uk) * *****************************************************************************/ @@ -41,6 +41,7 @@ static int field_write(FILE * fp, int index, void * self); static int field_write_ascii(FILE * fp, int index, void * self); static int field_read(FILE * fp, int index, void * self); static int field_read_ascii(FILE * fp, int index, void * self); +static int field_data_touch(field_t * field); static int field_leesedwards_parallel(field_t * obj); @@ -94,9 +95,10 @@ __host__ int field_create(pe_t * pe, cs_t * cs, lees_edw_t * le, pe_retain(pe); cs_retain(cs); + obj->opts = *opts; + field_init(obj, opts->nhcomm, le); field_halo_create(obj, &obj->h); - obj->opts = *opts; if (obj->opts.haloverbose) field_halo_info(obj); @@ -174,13 +176,16 @@ __host__ int field_init(field_t * obj, int nhcomm, lees_edw_t * le) { obj->nsites = nsites; nfsz = (size_t) obj->nf*nsites; -#ifndef OLD_DATA - obj->data = (double *) calloc(nfsz, sizeof(double)); - if (obj->data == NULL) pe_fatal(obj->pe, "calloc(obj->data) failed\n"); -#else - obj->data = (double *) mem_aligned_malloc(MEM_PAGESIZE, nfsz*sizeof(double)); - if (obj->data == NULL) pe_fatal(obj->pe, "calloc(obj->data) failed\n"); -#endif + if (obj->opts.usefirsttouch) { + + obj->data = (double *) mem_aligned_malloc(MEM_PAGESIZE, nfsz*sizeof(double)); + if (obj->data == NULL) pe_fatal(obj->pe, "calloc(obj->data) failed\n"); + field_data_touch(obj); + } + else { + obj->data = (double *) calloc(nfsz, sizeof(double)); + if (obj->data == NULL) pe_fatal(obj->pe, "calloc(obj->data) failed\n"); + } /* Allocate target copy of structure (or alias) */ @@ -329,6 +334,66 @@ __host__ int field_io_info(field_t * obj, io_info_t ** info) { return 0; } + +/***************************************************************************** + * + * field_data_touch + * + *****************************************************************************/ + +__host__ void field_data_touch_kernel(cs_limits_t lim, field_t * f) { + + int nx = 1 + lim.imax - lim.imin; + int ny = 1 + lim.jmax - lim.jmin; + int nz = 1 + lim.kmax - lim.kmin; + + int strz = 1; + int stry = strz*nz; + int strx = stry*ny; + + #pragma omp for nowait + for (int ik = 0; ik < nx*ny*nz; ik++) { + int ic = lim.imin + (ik )/strx; + int jc = lim.jmin + (ik % strx)/stry; + int kc = lim.kmin + (ik % stry)/strz; + int index = cs_index(f->cs, ic, jc, kc); + for (int n = 0; n < f->nf; n++) { + int laddr = addr_rank1(f->nsite, f->nf, index, n); + f->data[laddr] = 0.0; + } + } + + return; +} + +/***************************************************************************** + * + * field_data_touch + * + * Run only for OpenMP on the host. + * + *****************************************************************************/ + +__host__ int field_data_touch(field_t * field) { + + int nlocal[3] = {0}; + + assert(field); + + cs_nlocal(field->cs, nlocal); + + { + cs_limits_t lim = {1, nlocal[X], 1, nlocal[Y], 1, nlocal[Z]}; + + #pragma omp parallel + { + field_data_touch_kernel(lim, field); + } + } + + return 0; +} + /***************************************************************************** * * field_halo diff --git a/src/field_options.c b/src/field_options.c index 0247ac0e4..a1370f445 100644 --- a/src/field_options.c +++ b/src/field_options.c @@ -30,6 +30,7 @@ field_options_t field_options_default(void) { .nhcomm = 0, .haloscheme = FIELD_HALO_TARGET, .haloverbose = 0, + .usefirsttouch = 0, .iodata = io_info_args_default()}; return opts; } diff --git a/src/field_options.h b/src/field_options.h index 82478fcfd..005f91d84 100644 --- a/src/field_options.h +++ b/src/field_options.h @@ -31,6 +31,7 @@ struct field_options_s { field_halo_enum_t haloscheme; /* Halo swap method */ int haloverbose; /* Halo information level */ + int usefirsttouch; /* First touch for data? */ io_info_args_t iodata; /* I/O information */ }; diff --git a/src/lb_data_options.c b/src/lb_data_options.c index cec709b21..4fada0176 100644 --- a/src/lb_data_options.c +++ b/src/lb_data_options.c @@ -31,6 +31,7 @@ lb_data_options_t lb_data_options_default(void) { .nrelax = LB_RELAXATION_M10, .halo = LB_HALO_TARGET, .reportimbalance = 0, + .usefirsttouch = 0, .data = io_info_args_default(), .rho = io_info_args_default()}; diff --git a/src/lb_data_options.h b/src/lb_data_options.h index 2b8496e04..9b792a5f2 100644 --- a/src/lb_data_options.h +++ b/src/lb_data_options.h @@ -35,6 +35,7 @@ struct lb_data_options_s { lb_relaxation_enum_t nrelax; lb_halo_enum_t halo; int reportimbalance; + int usefirsttouch; io_info_args_t data; io_info_args_t rho; diff --git a/src/ludwig.c b/src/ludwig.c index cb09e5652..1b448609f 100644 --- a/src/ludwig.c +++ b/src/ludwig.c @@ -1604,6 +1604,9 @@ int free_energy_init_rt(ludwig_t * ludwig) { opts.haloscheme = FIELD_HALO_OPENMP; opts.haloverbose = rt_switch(rt, "field_halo_verbose"); } + if (rt_switch(rt, "field_data_use_first_touch")) { + opts.usefirsttouch = 1; + } field_create(pe, cs, le, "q", &opts, &ludwig->q); field_grad_create(pe, ludwig->q, ngrad, &ludwig->q_grad); } @@ -1711,6 +1714,9 @@ int free_energy_init_rt(ludwig_t * ludwig) { opts.haloscheme = FIELD_HALO_OPENMP; opts.haloverbose = rt_switch(rt, "field_halo_verbose"); } + if (rt_switch(rt, "field_data_use_first_touch")) { + opts.usefirsttouch = 1; + } field_create(pe, cs, le, "phi", &opts, &ludwig->phi); field_grad_create(pe, ludwig->phi, ngrad, &ludwig->phi_grad); phi_ch_create(pe, cs, le, &ch_options, &ludwig->pch); @@ -1749,6 +1755,9 @@ int free_energy_init_rt(ludwig_t * ludwig) { opts.haloscheme = FIELD_HALO_OPENMP; opts.haloverbose = rt_switch(rt, "field_halo_verbose"); } + if (rt_switch(rt, "field_data_use_first_touch")) { + opts.usefirsttouch = 1; + } field_create(pe, cs, le, "q", &opts, &ludwig->q); field_grad_create(pe, ludwig->q, ngrad, &ludwig->q_grad); } diff --git a/src/model.c b/src/model.c index dee9ebc5c..244275c6f 100644 --- a/src/model.c +++ b/src/model.c @@ -42,6 +42,7 @@ static int lb_rho_write(FILE *, int index, void * self); static int lb_rho_write_ascii(FILE *, int index, void * self); static int lb_model_param_init(lb_t * lb); static int lb_init(lb_t * lb); +static int lb_data_touch(lb_t * lb); int lb_halo_dequeue_recv(lb_t * lb, const lb_halo_t * h, int irreq); int lb_halo_enqueue_send(const lb_t * lb, lb_halo_t * h, int irreq); @@ -82,6 +83,10 @@ int lb_data_create(pe_t * pe, cs_t * cs, const lb_data_options_t * options, obj->nrelax = options->nrelax; obj->haloscheme = options->halo; + /* Note there is some duplication of options/parameters */ + /* ... which should really be rationalised. */ + obj->opts = *options; + lb_model_create(obj->nvel, &obj->model); /* Storage */ @@ -108,8 +113,13 @@ int lb_data_create(pe_t * pe, cs_t * cs, const lb_data_options_t * options, assert(obj->fprime); if (obj->f == NULL) pe_fatal(pe, "malloc(lb->f) failed\n"); if (obj->fprime == NULL) pe_fatal(pe, "malloc(lb->fprime) failed\n"); - memset(obj->f, 0, sz); - memset(obj->fprime, 0, sz); + if (options->usefirsttouch) { + lb_data_touch(obj); + } + else { + memset(obj->f, 0, sz); + memset(obj->fprime, 0, sz); + } } } @@ -123,7 +133,6 @@ int lb_data_create(pe_t * pe, cs_t * cs, const lb_data_options_t * options, lb_halo_create(obj, &obj->h, obj->haloscheme); lb_init(obj); - obj->opts = *options; *lb = obj; return 0; @@ -493,6 +502,61 @@ __host__ int lb_io_info(lb_t * lb, io_info_t ** io_info) { return 0; } +/***************************************************************************** + * + * lb_data_touch + * + * Kernel driver to initialise data. + * A conscious choice to use limits which are the standard domain. + * + *****************************************************************************/ + +__host__ void lb_data_touch_kernel(cs_limits_t lim, lb_t * lb) { + + int nx = 1 + lim.imax - lim.imin; + int ny = 1 + lim.jmax - lim.jmin; + int nz = 1 + lim.kmax - lim.kmin; + + int strz = 1; + int stry = strz*nz; + int strx = stry*ny; + + #pragma omp for nowait + for (int ik = 0; ik < nx*ny*nz; ik++) { + int ic = lim.imin + (ik )/strx; + int jc = lim.jmin + (ik % strx)/stry; + int kc = lim.kmin + (ik % stry)/strz; + int index = cs_index(lb->cs, ic, jc, kc); + for (int p = 0; p < lb->nvel; p++) { + int lindex = LB_ADDR(lb->nsites, lb->ndist, lb->nvel, index, 1, p); + lb->f[lindex] = 0.0; + lb->fprime[lindex] = 0.0; + } + } + + return; +} + +__host__ int lb_data_touch(lb_t * lb) { + + int nlocal[3] = {0}; + + assert(lb); + + cs_nlocal(lb->cs, nlocal); + + { + cs_limits_t lim = {1, nlocal[X], 1, nlocal[Y], 1, nlocal[Z]}; + + #pragma omp parallel + { + lb_data_touch_kernel(lim, lb); + } + } + + return 0; +} + /***************************************************************************** * * lb_halo From 107858b184d175d75af4fb42ecc611a09cb16192 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 15 Jul 2022 16:54:40 +0100 Subject: [PATCH 09/79] First touch for data --- src/field.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field.c b/src/field.c index 69da65c30..731d0447c 100644 --- a/src/field.c +++ b/src/field.c @@ -358,7 +358,7 @@ __host__ void field_data_touch_kernel(cs_limits_t lim, field_t * f) { int kc = lim.kmin + (ik % stry)/strz; int index = cs_index(f->cs, ic, jc, kc); for (int n = 0; n < f->nf; n++) { - int laddr = addr_rank1(f->nsite, f->nf, index, n); + int laddr = addr_rank1(f->nsites, f->nf, index, n); f->data[laddr] = 0.0; } } From e2e7d22815bc8c5fab74a8af7251d71e88c513c1 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 15 Jul 2022 16:54:49 +0100 Subject: [PATCH 10/79] First touch for data --- src/model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model.c b/src/model.c index 244275c6f..1bf842b0f 100644 --- a/src/model.c +++ b/src/model.c @@ -528,7 +528,7 @@ __host__ void lb_data_touch_kernel(cs_limits_t lim, lb_t * lb) { int kc = lim.kmin + (ik % stry)/strz; int index = cs_index(lb->cs, ic, jc, kc); for (int p = 0; p < lb->nvel; p++) { - int lindex = LB_ADDR(lb->nsites, lb->ndist, lb->nvel, index, 1, p); + int lindex = LB_ADDR(lb->nsite, lb->ndist, lb->nvel, index, 1, p); lb->f[lindex] = 0.0; lb->fprime[lindex] = 0.0; } From 1b738360123660ca057021adf7e23b620fd4dcb7 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 11:28:34 +0100 Subject: [PATCH 11/79] Flow must be x-direction in parallel --- tests/unit/test_lb_bc_outflow_rhou.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/unit/test_lb_bc_outflow_rhou.c b/tests/unit/test_lb_bc_outflow_rhou.c index e557aa9e3..f093b8375 100644 --- a/tests/unit/test_lb_bc_outflow_rhou.c +++ b/tests/unit/test_lb_bc_outflow_rhou.c @@ -147,6 +147,9 @@ __host__ int test_lb_bc_outflow_rhou_update(pe_t * pe, cs_t * cs, int nvel) { * * test_lb_bc_outflow_rhou_impose * + * This involves a halo swap for which the flow must be in the x-direction + * at the moment. + * *****************************************************************************/ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { @@ -158,7 +161,7 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { int noffset[3] = {0}; lb_bc_outflow_opts_t options = {.nvel = nvel, - .flow = {0, 0, 1}, + .flow = {1, 0, 0}, .rho0 = 3.0}; lb_bc_outflow_rhou_t * outflow = NULL; lb_t * lb = NULL; @@ -166,7 +169,7 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { hydro_options_t hopts = hydro_options_default(); hydro_t * hydro = NULL; - double u0[3] = {0.0, 0.0, 0.01}; /* Domain outflow in z-direction */ + double u0[3] = {0.01, 0.0, 0.0}; /* Domain outflow in x-direction */ assert(pe); assert(cs); @@ -188,9 +191,9 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { cs_nlocal(cs, nlocal); cs_nlocal_offset(cs, noffset); - if (noffset[Z] + nlocal[Z] == ntotal[Z]) { + if (noffset[X] + nlocal[X] == ntotal[X]) { - cs_limits_t limits = {1, nlocal[X], 1, nlocal[Y], nlocal[Z], nlocal[Z]}; + cs_limits_t limits = {nlocal[X], nlocal[X], 1, nlocal[Y], 1, nlocal[Z]}; for (int ic = limits.imin; ic <= limits.imax; ic++) { for (int jc = limits.jmin; jc <= limits.jmax; jc++) { @@ -208,10 +211,10 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { lb_bc_outflow_rhou_update(outflow, hydro); lb_bc_outflow_rhou_impose(outflow, hydro, lb); - if (noffset[Z] + nlocal[Z] == ntotal[Z]) { + if (noffset[X] + nlocal[X] == ntotal[X]) { - int kcbound = nlocal[Z] + 1; - cs_limits_t limits = {1, nlocal[X], 1, nlocal[Y], kcbound, kcbound}; + int icbound = nlocal[X] + 1; + cs_limits_t limits = {icbound, icbound, 1, nlocal[Y], 1, nlocal[Z]}; for (int ic = limits.imin; ic <= limits.imax; ic++) { for (int jc = limits.jmin; jc <= limits.jmax; jc++) { @@ -223,18 +226,18 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { double f = 0.0; - if (lb->model.cv[p][Z] != -1) continue; - if (noffset[X] + ic + lb->model.cv[p][X] < 1) continue; + if (lb->model.cv[p][X] != -1) continue; if (noffset[Y] + jc + lb->model.cv[p][Y] < 1) continue; - if (noffset[X] + ic + lb->model.cv[p][X] > ntotal[X]) continue; + if (noffset[Z] + kc + lb->model.cv[p][Z] < 1) continue; if (noffset[Y] + jc + lb->model.cv[p][Y] > ntotal[Y]) continue; + if (noffset[Z] + kc + lb->model.cv[p][Z] > ntotal[Z]) continue; lb_f(lb, index, p, LB_RHO, &f); { - double uz = u0[Z]; + double ux = u0[X]; double rho0 = outflow->options.rho0; - double fp = lb->model.wv[p]*rho0*(1.0 - 3.0*uz + 3.0*uz*uz); + double fp = lb->model.wv[p]*rho0*(1.0 - 3.0*ux + 3.0*ux*ux); assert(fabs(f - fp) < DBL_EPSILON); if (fabs(f - fp) > DBL_EPSILON) ierr += 1; } From b694525591bc139a273f961a58e083ba5638861a Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 11:30:03 +0100 Subject: [PATCH 12/79] Avoid warning --- util/polarizer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/polarizer.c b/util/polarizer.c index 420f30d75..fcc890025 100644 --- a/util/polarizer.c +++ b/util/polarizer.c @@ -156,10 +156,15 @@ int main(int argc, char* argv[]){ for (int skip = 0; skip < 4; skip++) { pl = fgets(line, BUFSIZ, dirinput); assert(pl); + if (skip == 1) printf("Director input: %s\n", pl); } nread = fscanf(dirinput, "%s %d %d %d", dummy, &sys.Lx, &sys.Ly, &sys.Lz); assert(nread == 4); + if (nread != 4) { + printf("File %s: unexpected format\n", filename); + } + for (int skip = 5; skip < 10; skip++) { pl = fgets(line, BUFSIZ, dirinput); From 554e8ebddf04eea8f4a12645b8da3e3e6de7df86 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 11:31:28 +0100 Subject: [PATCH 13/79] Cosmetic update --- src/interaction.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/interaction.c b/src/interaction.c index 3a8cfdcb5..0f4ed4573 100644 --- a/src/interaction.c +++ b/src/interaction.c @@ -499,7 +499,7 @@ int colloids_update_forces_fluid_gravity(colloids_info_t * cinfo, *****************************************************************************/ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, - map_t * map) { + map_t * map) { int nc; int ia; @@ -507,7 +507,6 @@ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, double rvolume; int periodic[3]; double fd[3], f[3]; - /* double fw[3]; */ physics_t * phys = NULL; return 0; /* This routine needs an MOT before use. */ @@ -521,7 +520,11 @@ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, if (is_driven()) { + double fw[3]; + assert(map); + + cs_periodic(map->cs, periodic); map_volume_allreduce(map, MAP_FLUID, &nsfluid); rvolume = 1.0/nsfluid; @@ -530,7 +533,7 @@ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, for (ia = 0; ia < 3; ia++) { f[ia] = -1.0*fd[ia]*rvolume*periodic[ia]; - /* fw[ia] = -1.0*fd[ia]*(1.0 - periodic[ia])/(1.0*pe_size());*/ + fw[ia] = -1.0*fd[ia]*(1.0 - periodic[ia])/(1.0*pe_mpi_size(map->pe)); } physics_fbody_set(phys, f); From 2ad6554de012ea4199dd29bb861402508b39783f Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 11:40:45 +0100 Subject: [PATCH 14/79] Another cosmetic adjustment --- src/interaction.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/interaction.c b/src/interaction.c index 0f4ed4573..d872d65b5 100644 --- a/src/interaction.c +++ b/src/interaction.c @@ -520,8 +520,6 @@ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, if (is_driven()) { - double fw[3]; - assert(map); cs_periodic(map->cs, periodic); @@ -533,7 +531,7 @@ int colloids_update_forces_fluid_driven(colloids_info_t * cinfo, for (ia = 0; ia < 3; ia++) { f[ia] = -1.0*fd[ia]*rvolume*periodic[ia]; - fw[ia] = -1.0*fd[ia]*(1.0 - periodic[ia])/(1.0*pe_mpi_size(map->pe)); + /* Wall accounting adjustment should be -fd (1 - periodic) / nprocs */ } physics_fbody_set(phys, f); From d979cf48496785c7630ec2999057f7a5c078f5d5 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:31:41 +0100 Subject: [PATCH 15/79] Correction for tests --- src/io_harness.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io_harness.c b/src/io_harness.c index 6fca4f170..de271fca7 100644 --- a/src/io_harness.c +++ b/src/io_harness.c @@ -20,7 +20,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2007-2020 The University of Edinburgh + * (c) 2007-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -607,6 +607,7 @@ int io_info_format_in_set(io_info_t * obj, int form_in) { case IO_FORMAT_ASCII_SERIAL: obj->read_data = obj->read_ascii; obj->processor_independent = 1; + obj->single_file_read = 1; break; case IO_FORMAT_BINARY_SERIAL: obj->read_data = obj->read_binary; From dc515f8e1c6c735bafadd2044e28cc0b5d1bd39d Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:34:06 +0100 Subject: [PATCH 16/79] Correct i/o test --- tests/unit/test_map.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/tests/unit/test_map.c b/tests/unit/test_map.c index a9c376999..98d43a4fd 100644 --- a/tests/unit/test_map.c +++ b/tests/unit/test_map.c @@ -7,7 +7,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2012-2021 The University of Edinburgh + * (c) 2012-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -30,7 +30,7 @@ static int do_test1(pe_t * pe); static int do_test2(pe_t * pe); static int do_test_halo(pe_t * pe, int ndata); -static int do_test_io(pe_t * pe, int ndata, int io_format); +static int do_test_io(pe_t * pe, int ndata, int io_form_in, int io_form_out); /***************************************************************************** * @@ -49,10 +49,10 @@ int test_map_suite(void) { do_test_halo(pe, 1); do_test_halo(pe, 2); - do_test_io(pe, 0, IO_FORMAT_BINARY); - do_test_io(pe, 0, IO_FORMAT_ASCII); - do_test_io(pe, 2, IO_FORMAT_BINARY); - do_test_io(pe, 2, IO_FORMAT_ASCII); + do_test_io(pe, 0, IO_FORMAT_BINARY_SERIAL, IO_FORMAT_BINARY); + do_test_io(pe, 0, IO_FORMAT_ASCII_SERIAL, IO_FORMAT_ASCII); + do_test_io(pe, 2, IO_FORMAT_BINARY_SERIAL, IO_FORMAT_BINARY); + do_test_io(pe, 2, IO_FORMAT_ASCII_SERIAL, IO_FORMAT_ASCII); pe_info(pe, "PASS ./unit/test_map\n"); pe_free(pe); @@ -230,7 +230,7 @@ int do_test_halo(pe_t * pe, int ndata) { * *****************************************************************************/ -static int do_test_io(pe_t * pe, int ndata, int io_format) { +static int do_test_io(pe_t * pe, int ndata, int io_form_in, int io_form_out) { int grid[3]; const char * filename = "map-io-test"; @@ -248,18 +248,12 @@ static int do_test_io(pe_t * pe, int ndata, int io_format) { grid[Y] = 1; grid[Z] = 1; - if (pe_mpi_size(pe) == 8) { - grid[X] = 2; - grid[Y] = 2; - grid[Z] = 2; - } - cs_create(pe, &cs); cs_init(cs); map_create(pe, cs, ndata, &map); assert(map); - map_init_io_info(map, grid, io_format, io_format); + map_init_io_info(map, grid, io_form_in, io_form_out); map_io_info(map, &iohandler); assert(iohandler); @@ -277,10 +271,13 @@ static int do_test_io(pe_t * pe, int ndata, int io_format) { map_create(pe, cs, ndata, &map); assert(map); - map_init_io_info(map, grid, io_format, io_format); + map_init_io_info(map, grid, io_form_in, io_form_out); map_io_info(map, &iohandler); assert(iohandler); + /* Must set this explicitly at the moment */ + io_info_set_processor_independent(iohandler); + io_read_data(iohandler, filename, map); test_coords_field_check(cs, 0, 1, map->status, MPI_CHAR, test_ref_char1); test_coords_field_check(cs, 0, ndata, map->data, MPI_DOUBLE, test_ref_double1); From 1d35bd336c54c2ed069a594015898b4260ac5ad6 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:34:26 +0100 Subject: [PATCH 17/79] Correct parallel result --- tests/unit/test_lb_bc_inflow_rhou.c | 8 ++++---- tests/unit/test_lb_bc_outflow_rhou.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/test_lb_bc_inflow_rhou.c b/tests/unit/test_lb_bc_inflow_rhou.c index 20441030e..78775ae67 100644 --- a/tests/unit/test_lb_bc_inflow_rhou.c +++ b/tests/unit/test_lb_bc_inflow_rhou.c @@ -254,10 +254,10 @@ __host__ int test_lb_bc_inflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { /* Only distributions ending in the local domain ... */ if (lb->model.cv[p][X] != +1) continue; - if (noffset[Y] + jc + lb->model.cv[p][Y] < 1) continue; - if (noffset[Z] + kc + lb->model.cv[p][Z] < 1) continue; - if (noffset[Y] + jc + lb->model.cv[p][Y] > ntotal[Y]) continue; - if (noffset[Z] + kc + lb->model.cv[p][Z] > ntotal[Z]) continue; + if (jc + lb->model.cv[p][Y] < 1) continue; + if (kc + lb->model.cv[p][Z] < 1) continue; + if (jc + lb->model.cv[p][Y] > nlocal[Y]) continue; + if (kc + lb->model.cv[p][Z] > nlocal[Z]) continue; lb_f(lb, index, p, LB_RHO, &f); { diff --git a/tests/unit/test_lb_bc_outflow_rhou.c b/tests/unit/test_lb_bc_outflow_rhou.c index f093b8375..30063daa3 100644 --- a/tests/unit/test_lb_bc_outflow_rhou.c +++ b/tests/unit/test_lb_bc_outflow_rhou.c @@ -227,10 +227,10 @@ __host__ int test_lb_bc_outflow_rhou_impose(pe_t * pe, cs_t * cs, int nvel) { double f = 0.0; if (lb->model.cv[p][X] != -1) continue; - if (noffset[Y] + jc + lb->model.cv[p][Y] < 1) continue; - if (noffset[Z] + kc + lb->model.cv[p][Z] < 1) continue; - if (noffset[Y] + jc + lb->model.cv[p][Y] > ntotal[Y]) continue; - if (noffset[Z] + kc + lb->model.cv[p][Z] > ntotal[Z]) continue; + if (jc + lb->model.cv[p][Y] < 1) continue; + if (kc + lb->model.cv[p][Z] < 1) continue; + if (jc + lb->model.cv[p][Y] > nlocal[Y]) continue; + if (kc + lb->model.cv[p][Z] > nlocal[Z]) continue; lb_f(lb, index, p, LB_RHO, &f); From 889f1df38f66c1dfdab47f35ca3f2f8225b2945c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:35:28 +0100 Subject: [PATCH 18/79] Correct format --- tests/unit/test_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/test_io.c b/tests/unit/test_io.c index 3cbe9dd8a..449d6fc93 100644 --- a/tests/unit/test_io.c +++ b/tests/unit/test_io.c @@ -101,6 +101,7 @@ int do_test_io_info_struct(pe_t * pe, cs_t * cs) { io_write_data(io_info, stubp, &data); MPI_Barrier(MPI_COMM_WORLD); + io_info_format_in_set(io_info, IO_FORMAT_BINARY_SERIAL); io_read_data(io_info, stubp, &data); MPI_Barrier(MPI_COMM_WORLD); @@ -116,6 +117,7 @@ int do_test_io_info_struct(pe_t * pe, cs_t * cs) { io_write_data(io_info, stubp, &data); MPI_Barrier(MPI_COMM_WORLD); + io_info_format_in_set(io_info, IO_FORMAT_ASCII_SERIAL); io_read_data(io_info, stubp, &data); MPI_Barrier(MPI_COMM_WORLD); From 8af72cc257d38285dec5270b2dd603c4e747f83c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:37:07 +0100 Subject: [PATCH 19/79] Correct i/o formats --- tests/unit/test_field.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/unit/test_field.c b/tests/unit/test_field.c index 6660cb62c..2b405556d 100644 --- a/tests/unit/test_field.c +++ b/tests/unit/test_field.c @@ -32,7 +32,7 @@ static int do_test0(pe_t * pe); static int do_test1(pe_t * pe); static int do_test3(pe_t * pe); static int do_test5(pe_t * pe); -static int do_test_io(pe_t * pe, int nf, int io_format); +static int do_test_io(pe_t * pe, int nf, int io_format_in, int io_format_out); static int test_field_halo(cs_t * cs, field_t * phi); int do_test_device1(pe_t * pe); @@ -58,10 +58,10 @@ int test_field_suite(void) { do_test5(pe); do_test_device1(pe); - do_test_io(pe, 1, IO_FORMAT_ASCII); - do_test_io(pe, 1, IO_FORMAT_BINARY); - do_test_io(pe, 5, IO_FORMAT_ASCII); - do_test_io(pe, 5, IO_FORMAT_BINARY); + do_test_io(pe, 1, IO_FORMAT_ASCII_SERIAL, IO_FORMAT_ASCII); + do_test_io(pe, 1, IO_FORMAT_BINARY_SERIAL, IO_FORMAT_BINARY); + do_test_io(pe, 5, IO_FORMAT_ASCII_SERIAL, IO_FORMAT_ASCII); + do_test_io(pe, 5, IO_FORMAT_BINARY_SERIAL, IO_FORMAT_BINARY); test_field_halo_create(pe); @@ -380,8 +380,9 @@ static int test_field_halo(cs_t * cs, field_t * phi) { * *****************************************************************************/ -static int do_test_io(pe_t * pe, int nf, int io_format) { +static int do_test_io(pe_t * pe, int nf, int io_format_in, int io_format_out) { + int ntotal[3] = {16, 16, 8}; int grid[3] = {1, 1, 1}; int nhalo; const char * filename = "phi-test-io"; @@ -396,23 +397,19 @@ static int do_test_io(pe_t * pe, int nf, int io_format) { assert(pe); cs_create(pe, &cs); + cs_ntotal_set(cs, ntotal); cs_init(cs); cs_nhalo(cs, &nhalo); cs_cart_comm(cs, &comm); - if (pe_mpi_size(pe) == 8) { - grid[X] = 2; - grid[Y] = 2; - grid[Z] = 2; - } - opts.ndata = nf; opts.nhcomm = nhalo; field_create(pe, cs, NULL, "phi-test", &opts, &phi); - field_init_io_info(phi, grid, io_format, io_format); + field_init_io_info(phi, grid, io_format_in, io_format_out); test_coords_field_set(cs, nf, phi->data, MPI_DOUBLE, test_ref_double1); + field_io_info(phi, &iohandler); assert(iohandler); @@ -422,16 +419,22 @@ static int do_test_io(pe_t * pe, int nf, int io_format) { MPI_Barrier(comm); field_create(pe, cs, NULL, "phi-test", &opts,&phi); - field_init_io_info(phi, grid, io_format, io_format); + field_init_io_info(phi, grid, io_format_in, io_format_out); field_io_info(phi, &iohandler); assert(iohandler); + + /* Make sure the input format is handled correctly. */ + io_info_format_in_set(iohandler, io_format_in); + io_info_single_file_set(iohandler); + io_read_data(iohandler, filename, phi); field_halo(phi); test_coords_field_check(cs, 0, nf, phi->data, MPI_DOUBLE, test_ref_double1); MPI_Barrier(comm); + io_remove(filename, iohandler); io_remove_metadata(iohandler, "phi-test"); From e813ffaf41a3a9210069286f50a62b3834536535 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:37:49 +0100 Subject: [PATCH 20/79] Add option for number of tasks --- tests/unit/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/Makefile b/tests/unit/Makefile index ee1a3fbd4..5805fcb75 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile @@ -12,7 +12,7 @@ # Edinburgh Soft Matter and Statistical Physics Group and # Edinburgh Parallel Computing Centre # -# (c) 2010-2020 The University of Edinburgh +# (c) 2010-2022 The University of Edinburgh # # Contributing authors: # Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -22,7 +22,8 @@ include ../../Makefile.mk ifeq (${BUILD},parallel) -MPIRUN_NTASKS=1 +MPIRUN_NTASK_UNIT ?= 1 +MPIRUN_NTASKS=$(MPIRUN_NTASK_UNIT) endif #------------------------------------------------------------------------------ From 4b7cca16cdf08c057707292842fdf9c731ccc5da Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 19 Jul 2022 15:39:05 +0100 Subject: [PATCH 21/79] Add separate target for unit tests --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0c6a5d3f2..79bbbf99f 100644 --- a/Makefile +++ b/Makefile @@ -30,9 +30,12 @@ test: $(MAKE) -C target test $(MAKE) -C tests test +unit: + $(MAKE) -C tests/unit test + clean: $(MAKE) -C mpi_s clean $(MAKE) -C target clean $(MAKE) -C src clean $(MAKE) -C tests clean - $(MAKE) -C util clean \ No newline at end of file + $(MAKE) -C util clean From 1b63b63c34ba759a2e3a4b42fe393595e0ef5498 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 08:10:54 +0100 Subject: [PATCH 22/79] Draft script --- .travis.yml | 5 +++++ config/build-mpi.sh | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 config/build-mpi.sh diff --git a/.travis.yml b/.travis.yml index 7c59ea523..f8a72c6c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ language: c +cache: + - directories: + - mpi +before_install: + - sh ./config/build-mpi.sh script: - cp config/travis-gcc.mk ./config.mk - make serial diff --git a/config/build-mpi.sh b/config/build-mpi.sh new file mode 100644 index 000000000..a458a6380 --- /dev/null +++ b/config/build-mpi.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +which bash +which mpicc From 7916376b83fe68bec48676bd074e9856998aeba3 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 08:14:47 +0100 Subject: [PATCH 23/79] Draft script --- .travis.yml | 2 +- config/build-mpi.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8a72c6c2..4fe989559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ cache: - directories: - mpi before_install: - - sh ./config/build-mpi.sh + - bash ./config/build-mpi.sh script: - cp config/travis-gcc.mk ./config.mk - make serial diff --git a/config/build-mpi.sh b/config/build-mpi.sh index a458a6380..6dfc3435a 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -1,4 +1,3 @@ -#!/bin/sh +#!/bin/bash -which bash -which mpicc +printf "Installation script at %s\n" "$(date)" From ab0a715ccba987f028234ddc98bc057e965aa285 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 08:28:49 +0100 Subject: [PATCH 24/79] Active mpi installation script --- config/build-mpi.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/config/build-mpi.sh b/config/build-mpi.sh index 6dfc3435a..ad96cebd5 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -1,3 +1,25 @@ #!/bin/bash -printf "Installation script at %s\n" "$(date)" +printf "MPI installation script at %s\n" "$(date)" + +my_prefix=$(pwd)/mpi + +if [ -d mpi ]; then + export PATH=${my_prefix}/bin:${PATH} + printf "Added existing local mpi to path:\n" + printf "PATH is %s\n" "${PATH}" +else + printf "%s\n" "Install MPI to prefix %s\n" "${my_prefix}" + wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.\ +gz + tar xf openmpi-4.1.4.tar.gz + cd openmpi-4.1.4 + ./configure CC=gcc-11 CXX=g++-11 \ + --enable-mpi-fortran=no \ + --prefix=${my_prefix} + make -j 2 + make install + cd - + rm -rf openmpi-4.1.4.tar.gz + rm -rf openmpi-4.1.4 +fi From 34fc35da58ee21f3ed5af38b41043d4f3bf71195 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 08:41:56 +0100 Subject: [PATCH 25/79] MPI install --- .travis.yml | 1 - config/build-mpi.sh | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4fe989559..66f621f9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: c cache: - directories: - - mpi before_install: - bash ./config/build-mpi.sh script: diff --git a/config/build-mpi.sh b/config/build-mpi.sh index ad96cebd5..76bc61b87 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -1,6 +1,9 @@ #!/bin/bash +set -e + printf "MPI installation script at %s\n" "$(date)" +ls my_prefix=$(pwd)/mpi @@ -8,10 +11,10 @@ if [ -d mpi ]; then export PATH=${my_prefix}/bin:${PATH} printf "Added existing local mpi to path:\n" printf "PATH is %s\n" "${PATH}" + which mpicc else - printf "%s\n" "Install MPI to prefix %s\n" "${my_prefix}" - wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.\ -gz + printf "%s %s\n" "Install MPI to prefix" "${my_prefix}" + wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz tar xf openmpi-4.1.4.tar.gz cd openmpi-4.1.4 ./configure CC=gcc-11 CXX=g++-11 \ From e9167f37927c24774d1f965b24424c67865a6b81 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 08:44:09 +0100 Subject: [PATCH 26/79] Use correct compiler... --- config/build-mpi.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/build-mpi.sh b/config/build-mpi.sh index 76bc61b87..f90da45c9 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -3,7 +3,6 @@ set -e printf "MPI installation script at %s\n" "$(date)" -ls my_prefix=$(pwd)/mpi @@ -17,7 +16,7 @@ else wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz tar xf openmpi-4.1.4.tar.gz cd openmpi-4.1.4 - ./configure CC=gcc-11 CXX=g++-11 \ + ./configure CC=gcc CXX=g++ \ --enable-mpi-fortran=no \ --prefix=${my_prefix} make -j 2 From abecf9946f2051b0978d1c21a4e3e2921f687d60 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 09:26:15 +0100 Subject: [PATCH 27/79] Restore mpi cache directory --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 66f621f9d..4fe989559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: c cache: - directories: + - mpi before_install: - bash ./config/build-mpi.sh script: From 79fa573f78e5bd66b2cc35058cd94e8bce077e70 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 09:37:13 +0100 Subject: [PATCH 28/79] List current mpi directory content --- config/build-mpi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build-mpi.sh b/config/build-mpi.sh index f90da45c9..0df65b572 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -10,7 +10,7 @@ if [ -d mpi ]; then export PATH=${my_prefix}/bin:${PATH} printf "Added existing local mpi to path:\n" printf "PATH is %s\n" "${PATH}" - which mpicc + ls -R mpi else printf "%s %s\n" "Install MPI to prefix" "${my_prefix}" wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz From 925ed7953fb76b6e1d3dfe8e446b672bdc031a9c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 10:47:10 +0100 Subject: [PATCH 29/79] Try again --- config/build-mpi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/build-mpi.sh b/config/build-mpi.sh index 0df65b572..9f95cc4c9 100644 --- a/config/build-mpi.sh +++ b/config/build-mpi.sh @@ -6,11 +6,11 @@ printf "MPI installation script at %s\n" "$(date)" my_prefix=$(pwd)/mpi -if [ -d mpi ]; then +if [ -f mpi/bin/mpicc ]; then export PATH=${my_prefix}/bin:${PATH} printf "Added existing local mpi to path:\n" printf "PATH is %s\n" "${PATH}" - ls -R mpi + which mpicc else printf "%s %s\n" "Install MPI to prefix" "${my_prefix}" wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz From edbd3674c89a4321999517952c30d19759aa9854 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 12:57:41 +0100 Subject: [PATCH 30/79] Add travis mpi config --- config/travis-mpicc.mk | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/travis-mpicc.mk diff --git a/config/travis-mpicc.mk b/config/travis-mpicc.mk new file mode 100644 index 000000000..e26a1eb13 --- /dev/null +++ b/config/travis-mpicc.mk @@ -0,0 +1,25 @@ +############################################################################## +# +# travis-mpicc.mk +# +# Parallel unit tests +# +############################################################################## + +BUILD = parallel +MODEL = -D_D3Q19_ + +CC = mpicc -fopenmp +CFLAGS = -O2 -g -Wall -Werror + +AR = ar +ARFLAGS = -cru +LDFLAGS = + +LAUNCH_SERIAL_CMD = +LAUNCH_MPIRUN_CMD = mpirun +MPIRUN_NTASK_FLAG = -np + +# Unit tests only +MPIRUN_NTASK_UNIT = 4 + From 0990a6032fb9f74451c0f3605a25544bb4decb11 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 12:58:07 +0100 Subject: [PATCH 31/79] Add mpi unit tests --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4fe989559..f0e85d8e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,3 +10,7 @@ script: - make - export OMP_NUM_THREADS=1 - make test + - make clean + - cp config/travis-mpicc.mk ./config.mk + - make + - make unit From b783d66ae6c0ecdea189a307bb7f97432b62cef1 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 13:12:27 +0100 Subject: [PATCH 32/79] Add correct PATH for MPI --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f0e85d8e8..6958a8268 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ script: - export OMP_NUM_THREADS=1 - make test - make clean + - export PATH=$(pwd)/mpi/bin:${PATH} - cp config/travis-mpicc.mk ./config.mk - make - make unit From e11b82a5949f66be67e1baa8aef00a447eed6ed0 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 13:53:40 +0100 Subject: [PATCH 33/79] Updated mpirun --- config/travis-mpicc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/travis-mpicc.mk b/config/travis-mpicc.mk index e26a1eb13..9a9fb11d0 100644 --- a/config/travis-mpicc.mk +++ b/config/travis-mpicc.mk @@ -17,7 +17,7 @@ ARFLAGS = -cru LDFLAGS = LAUNCH_SERIAL_CMD = -LAUNCH_MPIRUN_CMD = mpirun +LAUNCH_MPIRUN_CMD = mpirun --oversubscribe MPIRUN_NTASK_FLAG = -np # Unit tests only From f8b7d60f3005f2d7be8e04f83c3061f8afda5c15 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:08:42 +0100 Subject: [PATCH 34/79] Remove dependencies on global objects --- src/psi_sor.c | 33 +++++++++++++-------------------- src/psi_sor.h | 14 ++++++-------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/psi_sor.c b/src/psi_sor.c index b11fb4033..7ffb45398 100644 --- a/src/psi_sor.c +++ b/src/psi_sor.c @@ -12,12 +12,11 @@ * where psi is the potential, rho_elec is the free charge density, and * epsilon is a permeability. * - * $Id$ * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2013-2017 The University of Edinburgh + * (c) 2013-2022 The University of Edinburgh * * Contributing Authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -32,10 +31,8 @@ #include "pe.h" #include "coords.h" -#include "physics.h" #include "psi_s.h" #include "psi_sor.h" -#include "control.h" #include "util.h" /***************************************************************************** @@ -47,12 +44,12 @@ * *****************************************************************************/ -int psi_sor_solve(psi_t * obj, fe_t * fe, f_vare_t fepsilon) { +int psi_sor_solve(psi_t * obj, fe_t * fe, f_vare_t fepsilon, int its) { assert(obj); - if (fepsilon == NULL) psi_sor_poisson(obj); - if (fepsilon != NULL) psi_sor_vare_poisson(obj, (fe_es_t *) fe, fepsilon); + if (fepsilon == NULL) psi_sor_poisson(obj, its); + if (fepsilon != NULL) psi_sor_vare_poisson(obj, (fe_es_t *) fe, fepsilon, its); return 0; } @@ -87,11 +84,13 @@ int psi_sor_solve(psi_t * obj, fe_t * fe, f_vare_t fepsilon) { * of the iteration. If neither criterion is met, the iteration will * finish after 'niteration' iterations. * + * "its" is the time step for statistics purposes. + * * See, e.g., Press et al. Chapter 19. * *****************************************************************************/ -int psi_sor_poisson(psi_t * obj) { +int psi_sor_poisson(psi_t * obj, int its) { int niteration = 1000; /* Maximum number of iterations */ const int ncheck = 5; /* Check global residual every n iterations */ @@ -116,12 +115,9 @@ int psi_sor_poisson(psi_t * obj) { double tol_abs; /* Absolute tolerance */ double eunit, beta; double ltot[3]; - physics_t * phys = NULL; MPI_Comm comm; /* Cartesian communicator */ - physics_ref(&phys); - cs_ltot(obj->cs, ltot); cs_nhalo(obj->cs, &nhalo); cs_nsites(obj->cs, &nsites); @@ -241,7 +237,7 @@ int psi_sor_poisson(psi_t * obj) { if (rnorm[1] < tol_abs) { - if (physics_control_timestep(phys) % obj->nfreq == 0) { + if (its % obj->nfreq == 0) { pe_info(obj->pe, "\n"); pe_info(obj->pe, "SOR solver converged to absolute tolerance\n"); pe_info(obj->pe, "SOR residual per site %14.7e at %d iterations\n", @@ -252,7 +248,7 @@ int psi_sor_poisson(psi_t * obj) { if (rnorm[1] < tol_abs || rnorm[1] < tol_rel*rnorm[0]) { - if (physics_control_timestep(phys) % obj->nfreq == 0) { + if (its % obj->nfreq == 0) { pe_info(obj->pe, "\n"); pe_info(obj->pe, "SOR solver converged to relative tolerance\n"); pe_info(obj->pe, "SOR residual per site %14.7e at %d iterations\n", @@ -285,7 +281,7 @@ int psi_sor_poisson(psi_t * obj) { * ****************************************************************************/ -int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon) { +int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon, int its) { int niteration = 2000; /* Maximum number of iterations */ const int ncheck = 1; /* Check global residual every n iterations */ @@ -315,14 +311,11 @@ int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon) { double ltot[3]; double eunit, beta; - physics_t * phys = NULL; MPI_Comm comm; /* Cartesian communicator */ assert(obj); assert(fepsilon); - physics_ref(&phys); - cs_ltot(obj->cs, ltot); cs_nlocal(obj->cs, nlocal); cs_nsites(obj->cs, &nsites); @@ -338,7 +331,7 @@ int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon) { /* Compute initial norm of the residual */ - radius = 1.0 - 0.5*pow(4.0*atan(1.0)/imax(ltot[X],ltot[Z]), 2); + radius = 1.0 - 0.5*pow(4.0*atan(1.0)/dmax(ltot[X],ltot[Z]), 2); psi_reltol(obj, &tol_rel); psi_abstol(obj, &tol_abs); @@ -486,7 +479,7 @@ int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon) { if (rnorm[1] < tol_abs) { - if (physics_control_timestep(phys) % obj->nfreq == 0) { + if (its % obj->nfreq == 0) { pe_info(obj->pe, "\n"); pe_info(obj->pe, "SOR (heterogeneous) solver converged to absolute tolerance\n"); pe_info(obj->pe, "SOR residual per site %14.7e at %d iterations\n", @@ -497,7 +490,7 @@ int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon) { if (rnorm[1] < tol_rel*rnorm[0]) { - if (physics_control_timestep(phys) % obj->nfreq == 0) { + if (its % obj->nfreq == 0) { pe_info(obj->pe, "\n"); pe_info(obj->pe, "SOR (heterogeneous) solver converged to relative tolerance\n"); pe_info(obj->pe, "SOR residual per site %14.7e at %d iterations\n", diff --git a/src/psi_sor.h b/src/psi_sor.h index 3dbfce275..d8025b08d 100644 --- a/src/psi_sor.h +++ b/src/psi_sor.h @@ -2,8 +2,6 @@ * * psi_sor.h * - * $Id$ - * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * @@ -11,18 +9,18 @@ * Kevin Stratford (kevin@epcc.ed.ac.uk) * Ignacio Pagonabarraga (ipagonabarraga@ub.edu) * - * (c) 2012-2016 The University of Edinburgh + * (c) 2012-2022 The University of Edinburgh * *****************************************************************************/ -#ifndef PSI_SOR_H -#define PSI_SOR_H +#ifndef LUDWIG_PSI_SOR_H +#define LUDWIG_PSI_SOR_H #include "psi.h" #include "fe_electro_symmetric.h" -int psi_sor_solve(psi_t * obj, fe_t * fe, f_vare_t fepsilon); -int psi_sor_poisson(psi_t * obj); -int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon); +int psi_sor_solve(psi_t * obj, fe_t * fe, f_vare_t fepsilon, int its); +int psi_sor_poisson(psi_t * obj, int its); +int psi_sor_vare_poisson(psi_t * obj, fe_es_t * fe, f_vare_t fepsilon, int its); #endif From b9540cce21dca2f41c8ac48d92843054deb94401 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:09:17 +0100 Subject: [PATCH 35/79] Add external electric field component --- src/psi_s.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/psi_s.h b/src/psi_s.h index ff8663263..e073e9f17 100644 --- a/src/psi_s.h +++ b/src/psi_s.h @@ -2,8 +2,6 @@ * * psi_s.h * - * $Id$ - * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * @@ -14,8 +12,8 @@ * *****************************************************************************/ -#ifndef PSI_S_H -#define PSI_S_H +#ifndef LUDWIG_PSI_S_H +#define LUDWIG_PSI_S_H #include #include "io_harness.h" @@ -59,6 +57,7 @@ struct psi_s { int nfreq_io; /* Field output */ int nfreq; /* Residual statisics output */ double diffacc; /* Number of substeps in charge dynamics */ + double e0[3]; /* External electric field */ MPI_Datatype psihalo[3]; /* psi field halo */ MPI_Datatype rhohalo[3]; /* charge densities halo */ io_info_t * info; /* I/O informtation */ From ad9ae89b2c182b4ef14079920cbff6c44606b6ed Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:09:45 +0100 Subject: [PATCH 36/79] Remove global objects --- src/psi.c | 52 ++++++++++++++++++++++++++++++++-------------------- src/psi.h | 14 ++++++++------ src/psi_rt.c | 10 +++++++++- 3 files changed, 49 insertions(+), 27 deletions(-) diff --git a/src/psi.c b/src/psi.c index 978cb5927..ebb25b18d 100644 --- a/src/psi.c +++ b/src/psi.c @@ -33,7 +33,6 @@ #include "map.h" #include "psi_s.h" #include "psi_gradients.h" -#include "physics.h" static const double e_unit_default = 1.0; /* Default unit charge */ static const double reltol_default = FLT_EPSILON; /* Solver tolerance */ @@ -100,6 +99,7 @@ int psi_create(pe_t * pe, cs_t * cs, int nk, psi_t ** pobj) { psi->nfreq_io = INT_MAX; psi->nfreq = INT_MAX; + psi->beta = 1.0; /* Not zero default */ coords_field_init_mpi_indexed(cs, nhalo, 1, MPI_DOUBLE, psi->psihalo); coords_field_init_mpi_indexed(cs, nhalo, psi->nk, MPI_DOUBLE, psi->rhohalo); @@ -242,6 +242,25 @@ int psi_diffusivity(psi_t * obj, int n, double * diff) { return 0; } +/***************************************************************************** + * + * psi_e0_set + * + * Set external electric field. + * + *****************************************************************************/ + +int psi_e0_set(psi_t * psi, const double e0[3]) { + + assert(psi); + + psi->e0[X] = e0[X]; + psi->e0[Y] = e0[Y]; + psi->e0[Z] = e0[Z]; + + return 0; +} + /***************************************************************************** * * psi_init_io_info @@ -1117,10 +1136,8 @@ int psi_halo_psijump(psi_t * psi) { int mpi_cartsz[3]; int mpicoords[3]; int periodic[3]; - double e0[3]; double eps; double beta; - physics_t * phys = NULL; assert(psi); @@ -1132,8 +1149,6 @@ int psi_halo_psijump(psi_t * psi) { cs_cart_coords(psi->cs, mpicoords); cs_periodic(psi->cs, periodic); - physics_ref(&phys); - physics_e0(phys, e0); psi_epsilon(psi, &eps); psi_beta(psi, &beta); @@ -1146,7 +1161,7 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, 0 - nh, jc, kc); if (periodic[X]) { - psi->psi[addr_rank0(psi->nsites, index)] += e0[X]*ntotal[X]; + psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[X]*ntotal[X]; } else{ index1 = cs_index(psi->cs, 1, jc, kc); @@ -1168,7 +1183,7 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, nlocal[0] + 1 + nh, jc, kc); if (periodic[X]) { - psi->psi[addr_rank0(psi->nsites, index)] -= e0[X]*ntotal[X]; + psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[X]*ntotal[X]; } else { index1 = cs_index(psi->cs, nlocal[0], jc, kc); @@ -1189,9 +1204,9 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, 0 - nh, kc); if (periodic[Y]) { - psi->psi[addr_rank0(psi->nsites, index)] += e0[Y]*ntotal[Y]; + psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[Y]*ntotal[Y]; } - else{ + else { index1 = cs_index(psi->cs, ic, 1, kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; @@ -1208,13 +1223,13 @@ int psi_halo_psijump(psi_t * psi) { for (ic = 1 - nhalo; ic <= nlocal[X] + nhalo; ic++) { for (kc = 1 - nhalo; kc <= nlocal[Z] + nhalo; kc++) { - index = cs_index(psi->cs, ic, nlocal[1] + 1 + nh, kc); + index = cs_index(psi->cs, ic, nlocal[Y] + 1 + nh, kc); if (periodic[Y]) { - psi->psi[addr_rank0(psi->nsites, index)] -= e0[Y]*ntotal[Y]; + psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[Y]*ntotal[Y]; } else { - index1 = cs_index(psi->cs, ic, nlocal[1], kc); + index1 = cs_index(psi->cs, ic, nlocal[Y], kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; } @@ -1233,7 +1248,7 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, jc, 0 - nh); if (periodic[Z]) { - psi->psi[addr_rank0(psi->nsites, index)] += e0[Z]*ntotal[Z]; + psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[Z]*ntotal[Z]; } else { index1 = cs_index(psi->cs, ic, jc, 1); @@ -1252,10 +1267,10 @@ int psi_halo_psijump(psi_t * psi) { for (ic = 1 - nhalo; ic <= nlocal[X] + nhalo; ic++) { for (jc = 1 - nhalo; jc <= nlocal[Y] + nhalo; jc++) { - index = cs_index(psi->cs, ic, jc, nlocal[2] + 1 + nh); + index = cs_index(psi->cs, ic, jc, nlocal[Z] + 1 + nh); if (periodic[Z]) { - psi->psi[addr_rank0(psi->nsites, index)] -= e0[Z]*ntotal[Z]; + psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[Z]*ntotal[Z]; } else{ index1 = cs_index(psi->cs, ic, jc, nlocal[2]); @@ -1323,14 +1338,11 @@ int psi_nfreq_set(psi_t * psi, int nfreq) { * *****************************************************************************/ -int psi_output_step(psi_t * psi) { - - physics_t * phys = NULL; +int psi_output_step(psi_t * psi, int its) { assert(psi); - physics_ref(&phys); - return (physics_control_timestep(phys) % psi->nfreq_io == 0); + return (its % psi->nfreq_io == 0); } /***************************************************************************** diff --git a/src/psi.h b/src/psi.h index e5590ef24..55ffe13ba 100644 --- a/src/psi.h +++ b/src/psi.h @@ -2,18 +2,17 @@ * * psi.h * - * $Id$ - * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * + * (c) 2012-2022 The University of Edinburgh + * * Kevin Stratford (kevin@epcc.ed.ac.uk) - * (c) 2012 The University of Edinburgh * *****************************************************************************/ -#ifndef PSI_H -#define PSI_H +#ifndef LUDWIG_PSI_H +#define LUDWIG_PSI_H #include "pe.h" #include "coords.h" @@ -38,6 +37,7 @@ typedef struct psi_s psi_t; /* f_vare_t describes the signature of the function expected * to return the permittivity as a function of position index. */ + typedef int (* f_vare_t)(void * fe, int index, double * epsilon); int psi_create(pe_t * pe, cs_t * cs, int nk, psi_t ** pobj); @@ -50,6 +50,7 @@ int psi_valency(psi_t * obj, int n, int * iv); int psi_valency_set(psi_t * obj, int n, int iv); int psi_diffusivity(psi_t * obj, int n, double * diff); int psi_diffusivity_set(psi_t * obj, int n, double diff); +int psi_e0_set(psi_t * psi, const double e0[3]); int psi_halo_psi(psi_t * obj); int psi_halo_psijump(psi_t * obj); int psi_halo_rho(psi_t * obj); @@ -81,7 +82,7 @@ int psi_reltol_set(psi_t * obj, double reltol); int psi_abstol_set(psi_t * obj, double abstol); int psi_maxits_set(psi_t * obj, int maxits); int psi_nfreq_set(psi_t * psi, int nfreq); -int psi_output_step(psi_t * psi); +int psi_output_step(psi_t * psi, int its); int psi_multisteps(psi_t * obj, int * multisteps); int psi_multisteps_set(psi_t * obj, int multisteps); @@ -95,4 +96,5 @@ int psi_force_method(psi_t * obj, int * flag); int psi_force_method_set(psi_t * obj, int flag); int psi_electroneutral(psi_t * obj, map_t * map); + #endif diff --git a/src/psi_rt.c b/src/psi_rt.c index c96df81fa..2c0e14a4e 100644 --- a/src/psi_rt.c +++ b/src/psi_rt.c @@ -10,7 +10,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2012-2018 The University of Edinburgh + * (c) 2012-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -135,6 +135,14 @@ int psi_rt_init_param(pe_t * pe, rt_t * rt, psi_t * obj) { psi_maxits(obj, &niteration); pe_info(pe, "Max. no. of iterations: %16d\n", niteration); + /* External electric field */ + + { + double e0[3] = {0}; + rt_double_parameter_vector(rt, "electric_e0", e0); + psi_e0_set(obj, e0); + } + /* Output */ n = 0; From 90fa32f5ba22237310749a884f816ab09f196f23 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:10:21 +0100 Subject: [PATCH 37/79] Update psi_sor_solve() interface --- src/ludwig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ludwig.c b/src/ludwig.c index cb09e5652..8b0771ea5 100644 --- a/src/ludwig.c +++ b/src/ludwig.c @@ -633,7 +633,7 @@ void ludwig_run(const char * inputfile) { #ifdef PETSC psi_petsc_solve(ludwig->psi, ludwig->fe, ludwig->epsilon); #else - psi_sor_solve(ludwig->psi, ludwig->fe, ludwig->epsilon); + psi_sor_solve(ludwig->psi, ludwig->fe, ludwig->epsilon, step); #endif TIMER_stop(TIMER_ELECTRO_POISSON); } From 532abfe1020a99b5dbff1a10b2cce004d74ff893 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:11:01 +0100 Subject: [PATCH 38/79] Update psi_sor_solve() interface --- tests/unit/test_nernst_planck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_nernst_planck.c b/tests/unit/test_nernst_planck.c index e8e9a660d..63377d025 100644 --- a/tests/unit/test_nernst_planck.c +++ b/tests/unit/test_nernst_planck.c @@ -7,7 +7,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2012-2017 The University of Edinburgh + * (c) 2012-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -222,7 +222,7 @@ static int do_test_gouy_chapman(pe_t * pe) { for (tstep = 1; tstep <= tmax; tstep++) { psi_halo_psi(psi); - psi_sor_poisson(psi); + psi_sor_poisson(psi, tstep); psi_halo_rho(psi); /* The test is run with no hydrodynamics, hence NULL here. */ nernst_planck_driver(psi, (fe_t *) fe, NULL, map); From 4ec6365e6d611c2b0aeb47cf1c767761a3a0080a Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Wed, 20 Jul 2022 15:11:35 +0100 Subject: [PATCH 39/79] Repair psi_sor test --- tests/unit/test_psi_sor.c | 173 ++++++++++++++++++++++---------------- tests/unit/tests.c | 1 + 2 files changed, 103 insertions(+), 71 deletions(-) diff --git a/tests/unit/test_psi_sor.c b/tests/unit/test_psi_sor.c index 310cd0a67..11e146f82 100644 --- a/tests/unit/test_psi_sor.c +++ b/tests/unit/test_psi_sor.c @@ -7,7 +7,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2012-2020 The University of Edinburgh + * (c) 2012-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -22,7 +22,6 @@ #include "pe.h" #include "coords.h" -#include "physics.h" #include "control.h" #include "psi_s.h" #include "psi_sor.h" @@ -33,13 +32,14 @@ #define fe_fake_t void -static int do_test_sor1(pe_t * pe); +int test_psi_sor_poisson(pe_t * pe); +int test_psi_sor_vare_poisson(pe_t * pe); + static int test_charge1_set(psi_t * psi); static int test_charge1_exact(psi_t * obj, f_vare_t fepsilon); #define REF_PERMEATIVITY 1.0 static int fepsilon_constant(fe_fake_t * fe, int index, double * epsilon); -static int fepsilon_sinz(fe_fake_t * fe, int index, double * epsilon); /***************************************************************************** * @@ -50,12 +50,11 @@ static int fepsilon_sinz(fe_fake_t * fe, int index, double * epsilon); int test_psi_sor_suite(void) { pe_t * pe = NULL; - physics_t * phys = NULL; pe_create(MPI_COMM_WORLD, PE_QUIET, &pe); - physics_ref(&phys); - do_test_sor1(pe); + test_psi_sor_poisson(pe); + test_psi_sor_vare_poisson(pe); pe_info(pe, "PASS ./unit/test_psi_sor\n"); pe_free(pe); @@ -65,7 +64,7 @@ int test_psi_sor_suite(void) { /***************************************************************************** * - * do_test_sor1 + * test_psi_sor_poisson * * Set rho(z = 1) = + (1/2NxNy) * rho(z = Lz) = + (1/2NxNy) @@ -75,44 +74,87 @@ int test_psi_sor_suite(void) { * *****************************************************************************/ -static int do_test_sor1(pe_t * pe) { +int test_psi_sor_poisson(pe_t * pe) { - int mpi_cartsz[3]; cs_t * cs = NULL; psi_t * psi = NULL; + int ntotal[3] = {4, 4, 64}; assert(pe); cs_create(pe, &cs); cs_nhalo_set(cs, 1); + cs_ntotal_set(cs, ntotal); cs_init(cs); - cs_cartsz(cs, mpi_cartsz); - psi_create(pe, cs, 2, &psi); assert(psi); - psi_valency_set(psi, 0, +1.0); - psi_valency_set(psi, 1, -1.0); + + psi_valency_set(psi, 0, +1); + psi_valency_set(psi, 1, -1); + psi_beta_set(psi, 1.0); psi_epsilon_set(psi, REF_PERMEATIVITY); test_charge1_set(psi); + psi_halo_psi(psi); psi_halo_rho(psi); - psi_sor_poisson(psi); - if (mpi_cartsz[Z] == 1) test_charge1_exact(psi, fepsilon_constant); + /* Time step is -1 for no output. */ + psi_sor_poisson(psi, -1); + + test_charge1_exact(psi, fepsilon_constant); + + psi_free(psi); + cs_free(cs); + + return 0; +} + +/***************************************************************************** + * + * test_psi_sor_vare_poisson + * + * Same problem as above, but use variable epsilon solver (albeit with + * fixed epsilon here). + * + * Note this needs something slightly tighter than the default tolerance + * cf. the uniform case. + * + *****************************************************************************/ - /* Varying permeativity */ +int test_psi_sor_vare_poisson(pe_t * pe) { + + cs_t * cs = NULL; + psi_t * psi = NULL; + int ntotal[3] = {4, 4, 64}; + + assert(pe); + + cs_create(pe, &cs); + cs_nhalo_set(cs, 1); + cs_ntotal_set(cs, ntotal); + cs_init(cs); + + psi_create(pe, cs, 2, &psi); + assert(psi); + + psi_valency_set(psi, 0, +1); + psi_valency_set(psi, 1, -1); + psi_beta_set(psi, 1.0); + psi_reltol_set(psi, 0.01*FLT_EPSILON); + psi_epsilon_set(psi, REF_PERMEATIVITY); test_charge1_set(psi); + psi_halo_psi(psi); psi_halo_rho(psi); - /* Following broken in latest vare solver */ - psi_sor_vare_poisson(psi, NULL, fepsilon_sinz); - /* - if (cart_size(Z) == 1) test_charge1_exact(psi, fepsilon_sinz); - */ + /* Time step is -1 to avoid output */ + psi_sor_vare_poisson(psi, NULL, fepsilon_constant, -1); + + test_charge1_exact(psi, fepsilon_constant); + psi_free(psi); cs_free(cs); @@ -265,7 +307,7 @@ static int test_charge1_exact(psi_t * obj, f_vare_t fepsilon) { int k, kp1, km1, index; int nlocal[3]; - int n; + int nz; int ifail; double * epsilon = NULL; /* 1-d e = e(z) from fepsilon */ @@ -278,33 +320,32 @@ static int test_charge1_exact(psi_t * obj, f_vare_t fepsilon) { double * a = NULL; /* A is matrix for linear system */ double * b = NULL; /* B is RHS / solution vector */ - double * c = NULL; /* Copy of the original RHS. */ + + assert(obj); cs_nlocal(obj->cs, nlocal); - /* assert(cart_size(Z) == 1); Rewrite elsewhere? */ - n = nlocal[Z]; + nz = nlocal[Z]; /* Compute and store the permeativity values for convenience */ - epsilon = (double *) calloc(n, sizeof(double)); + epsilon = (double *) calloc(nz, sizeof(double)); assert(epsilon); if (epsilon == NULL) pe_fatal(obj->pe, "calloc(epsilon) failed\n"); - for (k = 0; k < n; k++) { + for (k = 0; k < nz; k++) { index = cs_index(obj->cs, 1, 1, 1+k); fepsilon(NULL, index, epsilon + k); } /* Allocate space for exact solution */ - a = (double *) calloc((size_t) n*n, sizeof(double)); - b = (double *) calloc(n, sizeof(double)); - c = (double *) calloc(n, sizeof(double)); - assert(a && b && c); + a = (double *) calloc((size_t) nz*nz, sizeof(double)); + b = (double *) calloc(nz, sizeof(double)); + assert(a); + assert(b); if (a == NULL) pe_fatal(obj->pe, "calloc(a) failed\n"); if (b == NULL) pe_fatal(obj->pe, "calloc(b) failed\n"); - if (c == NULL) pe_fatal(obj->pe, "calloc(c) failed\n"); /* Set tridiagonal elements for periodic solution for the * three-point stencil. The logic is to remove the perioidic end @@ -312,65 +353,73 @@ static int test_charge1_exact(psi_t * obj, f_vare_t fepsilon) { * effectively sets a Dirichlet boundary condition with psi = 0 * at both ends. */ - for (k = 0; k < n; k++) { + for (k = 0; k < nz; k++) { kp1 = k + 1; km1 = k - 1; if (k == 0) km1 = kp1; - if (k == n-1) kp1 = km1; + if (k == nz-1) kp1 = km1; eph = 0.5*(epsilon[k] + epsilon[kp1]); emh = 0.5*(epsilon[km1] + epsilon[k]); - a[k*n + kp1] = eph; - a[k*n + km1] = emh; - a[k*n + k] = -(eph + emh); + a[k*nz + kp1] = eph; + a[k*nz + km1] = emh; + a[k*nz + k ] = -(eph + emh); } /* Set the right hand side and solve the linear system. */ - for (k = 0; k < n; k++) { + for (k = 0; k < nz; k++) { index = cs_index(obj->cs, 1, 1, k + 1); psi_rho_elec(obj, index, b + k); b[k] *= -1.0; /* Minus sign in RHS Poisson equation */ - - c[k] = b[k]; } - ifail = util_gauss_jordan(n, a, b); - test_assert(ifail == 0); + ifail = util_gauss_jordan(nz, a, b); + assert(ifail == 0); - /* Check the Gauss Jordan answer against the answer from psi_t */ + /* Check the Gauss Jordan answer b[] against the answer from psi_t */ psi_abstol(obj, &tolerance); rhotot = 0.0; psi0 = 0.0; - for (k = 0; k < n; k++) { + for (k = 0; k < nz; k++) { index = cs_index(obj->cs, 1, 1, 1+k); psi_psi(obj, index, &psi); if (k == 0) psi0 = psi; - test_assert(fabs(b[k] + psi0 - psi) < tolerance); - + assert(fabs(b[k] - (psi - psi0)) < tolerance); + + /* Extra check on the differencing terms */ + kp1 = k + 1; km1 = k - 1; if (k == 0) km1 = kp1; - if (k == n-1) kp1 = km1; + if (k == nz-1) kp1 = km1; eph = 0.5*(epsilon[k] + epsilon[kp1]); emh = 0.5*(epsilon[km1] + epsilon[k]); - rhodiff = emh*obj->psi[index-1] - (emh + eph)*obj->psi[index] - + eph*obj->psi[index+1]; + { + double psim1 = 0.0; + double psip1 = 0.0; + double rho0 = 0.0; + + psi_psi(obj, index-1, &psim1); + psi_psi(obj, index+1, &psip1); + psi_rho_elec(obj, index, &rho0); - test_assert(fabs(c[k] - rhodiff) < tolerance); - rhotot += c[k]; + rhodiff = -(emh*psim1 - (emh + eph)*psi + eph*psip1); + + assert(fabs(rho0 - rhodiff) < tolerance); + rhotot += rho0; + } } /* Total rho should be unchanged at zero. */ test_assert(fabs(rhotot) < tolerance); - free(c); free(b); free(a); free(epsilon); @@ -406,21 +455,3 @@ static int fepsilon_constant(fe_fake_t * fe, int index, double * epsilon) { * The - 0.5 is to make it symmetric about the centre line. * *****************************************************************************/ - -static int fepsilon_sinz(fe_fake_t * fe, int index, double * epsilon) { - test_assert(0); -#ifdef OLD_PENDING_REFACTOR - int coords[3]; - double ltot[3]; - cs_t * cs = NULL; - PI_DOUBLE(pi); - assert(0); - - cs_ref(&cs); /* SHIT */ - cs_index_to_ijk(cs, index, coords); - cs_ltot(cs, ltot); - - *epsilon = REF_PERMEATIVITY*sin(pi*(1.0*coords[Z] - 0.5)/ltot[Z]); -#endif - return 0; -} diff --git a/tests/unit/tests.c b/tests/unit/tests.c index f305bab80..f4e828e52 100644 --- a/tests/unit/tests.c +++ b/tests/unit/tests.c @@ -99,6 +99,7 @@ __host__ int tests_create() { test_phi_bc_outflow_free_suite(); test_polar_active_suite(); test_psi_suite(); + test_psi_sor_suite(); test_lb_prop_suite(); test_random_suite(); test_rt_suite(); From ce77c0208ffbc6c2f1bcf657f81e3ba6efe93a42 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 12:21:58 +0100 Subject: [PATCH 40/79] Repair older no-hydro version --- src/nernst_planck.c | 159 +++++++++++++++++++++++--------------------- src/nernst_planck.h | 11 ++- 2 files changed, 88 insertions(+), 82 deletions(-) diff --git a/src/nernst_planck.c b/src/nernst_planck.c index 65f051f34..fd7ccd074 100644 --- a/src/nernst_planck.c +++ b/src/nernst_planck.c @@ -57,12 +57,12 @@ * Edinbrugh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * + * (c) 2012-2022 The University of Edinburgh + * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) * Oliver Henrich (ohenrich@epcc.ed.ac.uk) * - * (c) 2012-2017 The University of Edinbrugh - * *****************************************************************************/ #include @@ -74,7 +74,6 @@ #include "psi_s.h" #include "advection.h" #include "advection_bcs.h" -#include "physics.h" #include "nernst_planck.h" #include "psi_gradients.h" @@ -82,9 +81,11 @@ int nernst_planck_fluxes_force_d3qx(psi_t * psi, fe_t * fe, hydro_t * hydro, map_t * map, colloids_info_t * cinfo, double ** flx); -static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, +static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fx, double * fy, double * fz); +static int nernst_planck_no_flux_condition(map_t * map, int nk, double * fx, + double * fy, double * fz); static int nernst_planck_update(psi_t * psi, double * fe, double * fy, double * fz); static int nernst_planck_fluxes_d3qx(psi_t * psi, fe_t * fe, hydro_t * hydro, @@ -97,19 +98,12 @@ static double max_acc; * * nernst_planck_driver * - * The hydro object is allowed to be NULL, in which case there is - * no advection. - * - * The map object is allowed to be NULL, in which case no boundary - * condition corrections are attempted. - * - * TODO: - * The assert(0) indicates this routine is not in use. - * The nernst_planck_driver_d3qx version is preferred. + * No hydrodynamics (use nernst_plancj_driver_d3qx instead). + * Allows for a no-flux condition between solid and fluid sites. * *****************************************************************************/ -int nernst_planck_driver(psi_t * psi, fe_t * fel, hydro_t * hydro, map_t * map) { +int nernst_planck_driver(psi_t * psi, fe_t * fel, map_t * map) { int nk; /* Number of electrolyte species */ int nsites; /* Number of lattice sites */ @@ -118,8 +112,6 @@ int nernst_planck_driver(psi_t * psi, fe_t * fel, hydro_t * hydro, map_t * map) double * fy = NULL; double * fz = NULL; - assert(0); /* Not in use. */ - psi_nk(psi, &nk); cs_nsites(psi->cs, &nsites); @@ -131,22 +123,15 @@ int nernst_planck_driver(psi_t * psi, fe_t * fel, hydro_t * hydro, map_t * map) if (fy == NULL) pe_fatal(psi->pe, "calloc(fy) failed\n"); if (fz == NULL) pe_fatal(psi->pe, "calloc(fz) failed\n"); - /* The order of these calls is important, as the diffusive - * (Nernst Planck) fluxes are added to the advective. The - * whole lot are then subject to no normal flux BCs. */ - - /* Add advective fluxes based on six-point stencil */ - /* Should be here. */ + /* Diffusive fluxes based on six-point stencil, followed + * by no-flux condition for solid-fluid boundaries. */ - /* Add diffusive fluxes based on six-point stencil */ nernst_planck_fluxes(psi, fel, fe, fy, fz); - - /* Apply no flux BC for six-point stencil */ - /* Should be here. */ + nernst_planck_no_flux_condition(map, nk, fe, fy, fz); /* Update charge distribution */ - nernst_planck_update(psi, fe, fy, fz); + nernst_planck_update(psi, fe, fy, fz); free(fz); free(fy); @@ -159,23 +144,11 @@ int nernst_planck_driver(psi_t * psi, fe_t * fel, hydro_t * hydro, map_t * map) * * nernst_planck_fluxes * - * Compute diffusive fluxes. - * - * At this point we assume we can accumulate the fluxes, ie., the - * fluxes fe, fw, fy, and fz are zero, or have been set to hold the - * advective contribution. - * - * As we compute rho(n+1) = rho(n) - div.flux in the update routine, - * there is an extra minus sign in the fluxes here. This conincides - * with the sign of the advective fluxes, if present. - * - * TODO: - * The assert(0) indicates this code is not in use. The - * analogoues _d3qx version is preferred. + * Compute diffusive fluxes via a simple 7-point stencil in 3d. * *****************************************************************************/ -static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, +static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fx, double * fy, double * fz) { int ic, jc, kc, index; @@ -184,16 +157,14 @@ static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, int zs, ys, xs; int n, nk; - double eunit; - double beta; + double eunit, reunit; double b0, b1; double mu0, mu1; double rho0, rho1; double mu_s0, mu_s1; /* Solvation chemical potential, from free energy */ - assert(0); /* Not in use. */ assert(psi); - assert(fe); + assert(fx); assert(fy); assert(fz); @@ -203,13 +174,7 @@ static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, psi_nk(psi, &nk); psi_unit_charge(psi, &eunit); - psi_beta(psi, &beta); - - /* We write the contribution from the electric field as - * - (psi^ex_{i} - psi^ex_{i-dx}) / dx - * = - (-E.x - -E.(x-dx))/dx - * = (Ex - Ex + Edx)/dx = -grad psi^ex = E */ - + reunit = 1.0/eunit; for (ic = 0; ic <= nlocal[X]; ic++) { for (jc = 0; jc <= nlocal[Y]; jc++) { @@ -220,47 +185,47 @@ static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, for (n = 0; n < nk; n++) { fel->func->mu_solv(fel, index, n, &mu_s0); - mu0 = mu_s0 - + psi->valency[n]*eunit*psi->psi[addr_rank0(nsites, index)]; + mu0 = reunit*mu_s0 + + psi->valency[n]*psi->psi[addr_rank0(nsites, index)]; rho0 = psi->rho[addr_rank1(nsites, nk, index, n)]; /* x-direction (between ic and ic+1) */ fel->func->mu_solv(fel, index + xs, n, &mu_s1); - mu1 = mu_s1 - + psi->valency[n]*eunit*psi->psi[addr_rank0(nsites, index + xs)]; + mu1 = reunit*mu_s1 + + psi->valency[n]*psi->psi[addr_rank0(nsites, index + xs)]; - b0 = exp(-beta*(mu1 - mu0)); - b1 = exp(+beta*(mu1 - mu0)); + b0 = exp(mu1 - mu0); + b1 = exp(mu1 - mu0); rho1 = psi->rho[addr_rank1(nsites, nk, (index + xs), n)]*b1; - fe[addr_rank1(nsites, nk, index, n)] - -= psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); + fx[addr_rank1(nsites, nk, index, n)] + = -psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); /* y-direction (between jc and jc+1) */ fel->func->mu_solv(fel, index + ys, n, &mu_s1); - mu1 = mu_s1 - + psi->valency[n]*eunit*psi->psi[addr_rank0(nsites, index + ys)]; + mu1 = reunit*mu_s1 + + psi->valency[n]*psi->psi[addr_rank0(nsites, index + ys)]; - b0 = exp(-beta*(mu1 - mu0)); - b1 = exp(+beta*(mu1 - mu0)); + b0 = exp(mu1 - mu0); + b1 = exp(mu1 - mu0); rho1 = psi->rho[addr_rank1(nsites, nk, (index + ys), n)]*b1; - fy[nk*index + n] -= psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); + fy[nk*index + n] = -psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); /* z-direction (between kc and kc+1) */ fel->func->mu_solv(fel, index + zs, n, &mu_s1); - mu1 = mu_s1 - + psi->valency[n]*eunit*psi->psi[addr_rank0(nsites, index + zs)]; + mu1 = reunit*mu_s1 + + psi->valency[n]*psi->psi[addr_rank0(nsites, index + zs)]; - b0 = exp(-beta*(mu1 - mu0)); - b1 = exp(+beta*(mu1 - mu0)); + b0 = exp(mu1 - mu0); + b1 = exp(mu1 - mu0); rho1 = psi->rho[addr_rank1(nsites, nk, (index + zs), n)]*b1; fz[addr_rank1(nsites, nk, index, n)] - -= psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); + = -psi->diffusivity[n]*0.5*(1.0 + b0)*(rho1 - rho0); } /* Next face */ @@ -271,6 +236,50 @@ static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, return 0; } +/***************************************************************************** + * + * nernst_planck_no_flux_condition + * + * Use map to determine solid/fluid boudaries and set no normal flux. + * + *****************************************************************************/ + +static int nernst_planck_no_flux_condition(map_t * map, int nk, double * fx, + double * fy, double * fz) { + + cs_t * cs = NULL; + int nsites = 0; + int nlocal[3] = {0}; + + assert(map); + assert(fx); + assert(fy); + assert(fz); + + cs = map->cs; + cs_nsites(cs, &nsites); + cs_nlocal(cs, nlocal); + + for (int ic = 0; ic <= nlocal[X]; ic++) { + for (int jc = 0; jc <= nlocal[Y]; jc++) { + for (int kc = 0; kc <= nlocal[Z]; kc++) { + int index = cs_index(cs, ic, jc, kc); + int status = MAP_FLUID; + map_status(map, index, &status); + if (status == MAP_BOUNDARY) { + for (int n = 0; n < nk; n++) { + fx[addr_rank1(nsites, nk, index, n)] = 0.0; + fy[addr_rank1(nsites, nk, index, n)] = 0.0; + fz[addr_rank1(nsites, nk, index, n)] = 0.0; + } + } + } + } + } + + return 0; +} + /***************************************************************************** * * nernst_planck_update @@ -279,7 +288,7 @@ static int nernst_planck_fluxes(psi_t * psi, fe_t * fel, double * fe, * *****************************************************************************/ -static int nernst_planck_update(psi_t * psi, double * fe, double * fy, +static int nernst_planck_update(psi_t * psi, double * fx, double * fy, double * fz) { int ic, jc, kc, index; int nlocal[3]; @@ -289,7 +298,7 @@ static int nernst_planck_update(psi_t * psi, double * fe, double * fy, double dt; assert(psi); - assert(fe); + assert(fx); assert(fy); assert(fz); @@ -307,8 +316,8 @@ static int nernst_planck_update(psi_t * psi, double * fe, double * fy, for (n = 0; n < nk; n++) { psi->rho[addr_rank1(psi->nsites, nk, index, n)] - -= (+ fe[addr_rank1(psi->nsites, nk, index, n)] - - fe[addr_rank1(psi->nsites, nk, (index-xs), n)] + -= (+ fx[addr_rank1(psi->nsites, nk, index, n)] + - fx[addr_rank1(psi->nsites, nk, (index-xs), n)] + fy[addr_rank1(psi->nsites, nk, index, n)] - fy[addr_rank1(psi->nsites, nk, (index-ys), n)] + fz[addr_rank1(psi->nsites, nk, index, n)] @@ -405,7 +414,6 @@ static int nernst_planck_fluxes_d3qx(psi_t * psi, fe_t * fe, hydro_t * hydro, double mu_s0, mu_s1; /* Solvation chemical potential, from free energy */ double eunit, reunit; - double beta; double dt; colloid_t * pc = NULL; @@ -420,7 +428,6 @@ static int nernst_planck_fluxes_d3qx(psi_t * psi, fe_t * fe, hydro_t * hydro, psi_unit_charge(psi, &eunit); reunit = 1.0/eunit; - psi_beta(psi, &beta); psi_nk(psi, &nk); psi_multistep_timestep(psi, &dt); diff --git a/src/nernst_planck.h b/src/nernst_planck.h index 99d6d4bf0..5af8a77ef 100644 --- a/src/nernst_planck.h +++ b/src/nernst_planck.h @@ -2,18 +2,17 @@ * * nernst_planck.h * - * $Id$ - * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * + * (c) 2012-2022 The University of Edinburgh + * * Kevin Stratford (kevin@epcc.ed.ac.uk) - * (c) 2012-2016 The University of Edinburgh * *****************************************************************************/ -#ifndef NERNST_PLANCK_H -#define NERNST_PLANCK_H +#ifndef LUDWIG_NERNST_PLANCK_H +#define LUDWIG_NERNST_PLANCK_H #include "psi.h" #include "free_energy.h" @@ -21,7 +20,7 @@ #include "map.h" #include "colloids.h" -int nernst_planck_driver(psi_t * psi, fe_t * fe, hydro_t * hydro, map_t * map); +int nernst_planck_driver(psi_t * psi, fe_t * fe, map_t * map); int nernst_planck_driver_d3qx(psi_t * psi, fe_t * fe, hydro_t * hydro, map_t * map, colloids_info_t * cinfo); int nernst_planck_adjust_multistep(psi_t * psi); From 3c6211443ad822143433fd2e0773e45b17e41431 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 12:22:40 +0100 Subject: [PATCH 41/79] Repair --- tests/unit/test_nernst_planck.c | 123 ++++++++++++++++---------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/tests/unit/test_nernst_planck.c b/tests/unit/test_nernst_planck.c index 63377d025..c54191679 100644 --- a/tests/unit/test_nernst_planck.c +++ b/tests/unit/test_nernst_planck.c @@ -34,7 +34,7 @@ #include "nernst_planck.h" #include "tests.h" -static int do_test_gouy_chapman(pe_t * pe); +static int test_nernst_planck_driver(pe_t * pe); static int test_io(cs_t * cs, psi_t * psi, int tstep); /***************************************************************************** @@ -49,7 +49,7 @@ int test_nernst_planck_suite(void) { pe_create(MPI_COMM_WORLD, PE_QUIET, &pe); - do_test_gouy_chapman(pe); + test_nernst_planck_driver(pe); pe_info(pe, "PASS ./unit/test_nernst_planck\n"); pe_free(pe); @@ -59,7 +59,9 @@ int test_nernst_planck_suite(void) { /***************************************************************************** * - * do_test_gouy_chapman + * test_nernst_planck_driver + * + * This is the Gouy-Chapman problem. * * A theory exists for symmetric electrolytes near a flat surface * owing to Gouy and Chapman. (See Lyklema "Fundamentals of @@ -80,21 +82,20 @@ int test_nernst_planck_suite(void) { * where D_eff ~= D_k e beta rho_k (from the Nernst Planck * equation). The parameters make 20,000 steps reasonable. * - * The tolerances on the SOR could be investigated. * - * This is a test of the Gouy-Chapman theory. + * This is a test of the Gouy-Chapman theory if one runs a significant + * number of time steps... * *****************************************************************************/ -static int do_test_gouy_chapman(pe_t * pe) { +static int test_nernst_planck_driver(pe_t * pe) { - int nk = 2; /* Number of species */ + int ntotal[3] = {64, 4, 4}; /* Quasi-one-dimensional system */ + int nk = 2; /* Number of species */ - int ic, jc, kc, index; int nlocal[3]; int noffst[3]; int test_output_required = 0; - int tstep; int mpi_cartsz[3]; int mpi_cartcoords[3]; @@ -108,23 +109,15 @@ static int do_test_gouy_chapman(pe_t * pe) { double eunit = 1.; /* Unit charge, ... */ double epsilon = 3.3e3; /* ... epsilon, and ... */ double beta = 3.0e4; /* ... the Boltzmann factor i.e., t ~ 10^5 */ - double lb; /* ... make up the Bjerrum length */ - double ldebye; /* Debye length */ double rho_el = 1.0e-3; /* charge density */ - double yd; /* Dimensionless surface potential */ double ltot[3]; - int ntotal[3] = {64, 4, 4}; /* Quasi-one-dimensional system */ - int grid[3]; /* Processor decomposition */ - - int tmax = 200; cs_t * cs = NULL; map_t * map = NULL; psi_t * psi = NULL; physics_t * phys = NULL; fe_electro_t * fe = NULL; - MPI_Comm comm; assert(pe); @@ -133,13 +126,13 @@ static int do_test_gouy_chapman(pe_t * pe) { cs_create(pe, &cs); cs_nhalo_set(cs, 1); cs_ntotal_set(cs, ntotal); - cs_cart_comm(cs, &comm); - - grid[X] = pe_mpi_size(pe); - grid[Y] = 1; - grid[Z] = 1; - cs_decomposition_set(cs, grid); + { + /* If parallel, make sure the decomposition is in x-direction */ + int grid[3] = {pe_mpi_size(pe), 1, 1}; + cs_decomposition_set(cs, grid); + } + cs_init(cs); cs_ltot(cs, ltot); @@ -162,6 +155,8 @@ static int do_test_gouy_chapman(pe_t * pe) { psi_epsilon_set(psi, epsilon); psi_beta_set(psi, beta); + /* Care. the free energy gets the temperatue from global physics_t. */ + physics_kt_set(phys, 1.0/beta); fe_electro_create(pe, psi, &fe); /* wall charge density */ @@ -172,11 +167,11 @@ static int do_test_gouy_chapman(pe_t * pe) { /* apply counter charges & electrolyte */ - for (ic = 1; ic <= nlocal[X]; ic++) { - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { + for (int ic = 1; ic <= nlocal[X]; ic++) { + for (int jc = 1; jc <= nlocal[Y]; jc++) { + for (int kc = 1; kc <= nlocal[Z]; kc++) { - index = cs_index(cs, ic, jc, kc); + int index = cs_index(cs, ic, jc, kc); psi_psi_set(psi, index, 0.0); psi_rho_set(psi, index, 0, rho_el); @@ -188,11 +183,11 @@ static int do_test_gouy_chapman(pe_t * pe) { /* apply wall charges */ if (mpi_cartcoords[X] == 0) { - ic = 1; - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { + int ic = 1; + for (int jc = 1; jc <= nlocal[Y]; jc++) { + for (int kc = 1; kc <= nlocal[Z]; kc++) { - index = cs_index(cs, ic, jc, kc); + int index = cs_index(cs, ic, jc, kc); map_status_set(map, index, MAP_BOUNDARY); psi_rho_set(psi, index, 0, rho_w); @@ -203,11 +198,11 @@ static int do_test_gouy_chapman(pe_t * pe) { } if (mpi_cartcoords[X] == mpi_cartsz[X] - 1) { - ic = nlocal[X]; - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { + int ic = nlocal[X]; + for (int jc = 1; jc <= nlocal[Y]; jc++) { + for (int kc = 1; kc <= nlocal[Z]; kc++) { - index = cs_index(cs, ic, jc, kc); + int index = cs_index(cs, ic, jc, kc); map_status_set(map, index, MAP_BOUNDARY); psi_rho_set(psi, index, 0, rho_w); @@ -217,54 +212,58 @@ static int do_test_gouy_chapman(pe_t * pe) { } } + /* Make a single update ... */ + map_halo(map); - for (tstep = 1; tstep <= tmax; tstep++) { + psi_halo_psi(psi); + psi_sor_poisson(psi, -1); + psi_halo_rho(psi); - psi_halo_psi(psi); - psi_sor_poisson(psi, tstep); - psi_halo_rho(psi); - /* The test is run with no hydrodynamics, hence NULL here. */ - nernst_planck_driver(psi, (fe_t *) fe, NULL, map); + nernst_planck_driver(psi, (fe_t *) fe, map); - if (tstep % 1000 == 0) { - - pe_info(pe, "%d\n", tstep); - psi_stats_info(psi); - if (test_output_required) test_io(cs, psi, tstep); - } - } + if (test_output_required) test_io(cs, psi, 0); /* We adopt a rather simple way to extract the answer from the * MPI task holding the centre of the system. The charge * density must be > 0 to compute the debye length and the * surface potential. */ - jc = 2; - kc = 2; - rho_b_local = 0.0; - for (ic = 1; ic <= nlocal[X]; ic++) { + for (int ic = 1; ic <= nlocal[X]; ic++) { - index = cs_index(cs, ic, jc, kc); + int jc = 2; + int kc = 2; + int index = cs_index(cs, ic, jc, kc); if (noffst[X] + ic == ntotal[X] / 2) { psi_ionic_strength(psi, index, &rho_b_local); } } - MPI_Allreduce(&rho_b_local, &rho_b, 1, MPI_DOUBLE, MPI_SUM, comm); + { + MPI_Comm comm = MPI_COMM_NULL; + cs_cart_comm(cs, &comm); + MPI_Allreduce(&rho_b_local, &rho_b, 1, MPI_DOUBLE, MPI_SUM, comm); + } + + { + double lb = 0.0; /* Bjerrum length */ + double ldebye = 0.0; /* Debye length */ + double yd = 0.0; /* Dimensionless surface potential */ - psi_bjerrum_length(psi, &lb); - psi_debye_length(psi, rho_b, &ldebye); - psi_surface_potential(psi, rho_w, rho_b, &yd); + psi_bjerrum_length(psi, &lb); + psi_debye_length(psi, rho_b, &ldebye); + psi_surface_potential(psi, rho_w, rho_b, &yd); - assert(tmax == 200); - assert(ntotal[X] == 64); - assert(fabs(lb - 7.2343156e-01) < FLT_EPSILON); - assert(fabs(ldebye - 6.0648554e+00) < FLT_EPSILON); - assert(fabs(yd - 5.1997576e-05) < FLT_EPSILON); + /* Only the surface potential has really changed compared with the + * initial conditions ... */ + + assert(fabs(lb - 7.23431560e-01) < FLT_EPSILON); + assert(fabs(ldebye - 6.04727364e+00) < FLT_EPSILON); + assert(fabs(yd - 5.18713579e-05) < FLT_EPSILON); + } map_free(map); fe_electro_free(fe); From cb28de3cbbdfe825dd127d0adddb308e151b4dd1 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 12:23:01 +0100 Subject: [PATCH 42/79] Reinstate Nernst Planck test --- tests/unit/tests.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/tests.c b/tests/unit/tests.c index f4e828e52..e49731a87 100644 --- a/tests/unit/tests.c +++ b/tests/unit/tests.c @@ -7,9 +7,10 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * Kevin Stratford (kevin@epcc.ed.ac.uk) * (c) 2010-2022 The University of Edinburgh * + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * *****************************************************************************/ #include @@ -100,6 +101,7 @@ __host__ int tests_create() { test_polar_active_suite(); test_psi_suite(); test_psi_sor_suite(); + test_nernst_planck_suite(); test_lb_prop_suite(); test_random_suite(); test_rt_suite(); From c50abdb2f378f71b0eba169e0d96f3cb256e76d9 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 12:32:56 +0100 Subject: [PATCH 43/79] Fix size_t in calloc() --- src/nernst_planck.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nernst_planck.c b/src/nernst_planck.c index fd7ccd074..8a51a4b4d 100644 --- a/src/nernst_planck.c +++ b/src/nernst_planck.c @@ -115,10 +115,12 @@ int nernst_planck_driver(psi_t * psi, fe_t * fel, map_t * map) { psi_nk(psi, &nk); cs_nsites(psi->cs, &nsites); - /* Allocate fluxes and initialise to zero */ - fe = (double*) calloc(nsites*nk, sizeof(double)); - fy = (double*) calloc(nsites*nk, sizeof(double)); - fz = (double*) calloc(nsites*nk, sizeof(double)); + /* Allocate fluxes and initialise to zero */ + + fe = (double*) calloc((size_t) nsites*nk, sizeof(double)); + fy = (double*) calloc((size_t) nsites*nk, sizeof(double)); + fz = (double*) calloc((size_t) nsites*nk, sizeof(double)); + if (fe == NULL) pe_fatal(psi->pe, "calloc(fe) failed\n"); if (fy == NULL) pe_fatal(psi->pe, "calloc(fy) failed\n"); if (fz == NULL) pe_fatal(psi->pe, "calloc(fz) failed\n"); From 39e1d2bde7671db1d845cc772eb81ee7c97a22f9 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 13:40:38 +0100 Subject: [PATCH 44/79] Improve comments --- src/psi.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/psi.c b/src/psi.c index ebb25b18d..d29ae487d 100644 --- a/src/psi.c +++ b/src/psi.c @@ -1161,9 +1161,11 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, 0 - nh, jc, kc); if (periodic[X]) { + /* Add external potential */ psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[X]*ntotal[X]; } else{ + /* Borrow fluid site ic = 1 */ index1 = cs_index(psi->cs, 1, jc, kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; @@ -1183,10 +1185,12 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, nlocal[0] + 1 + nh, jc, kc); if (periodic[X]) { + /* Subtract external potential */ psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[X]*ntotal[X]; } else { - index1 = cs_index(psi->cs, nlocal[0], jc, kc); + /* Borrow fluid site at end ... */ + index1 = cs_index(psi->cs, nlocal[X], jc, kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; } @@ -1204,9 +1208,11 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, 0 - nh, kc); if (periodic[Y]) { + /* Add external potential */ psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[Y]*ntotal[Y]; } else { + /* Not periodic ... just borrow from fluid site jc = 1 */ index1 = cs_index(psi->cs, ic, 1, kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; @@ -1226,9 +1232,11 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, nlocal[Y] + 1 + nh, kc); if (periodic[Y]) { + /* Subtract external potential */ psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[Y]*ntotal[Y]; } else { + /* Borrow fluid site at end */ index1 = cs_index(psi->cs, ic, nlocal[Y], kc); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; @@ -1248,9 +1256,11 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, jc, 0 - nh); if (periodic[Z]) { + /* Add external potential */ psi->psi[addr_rank0(psi->nsites, index)] += psi->e0[Z]*ntotal[Z]; } else { + /* Borrow fluid site kc = 1 */ index1 = cs_index(psi->cs, ic, jc, 1); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; @@ -1270,10 +1280,12 @@ int psi_halo_psijump(psi_t * psi) { index = cs_index(psi->cs, ic, jc, nlocal[Z] + 1 + nh); if (periodic[Z]) { + /* Subtract external potential */ psi->psi[addr_rank0(psi->nsites, index)] -= psi->e0[Z]*ntotal[Z]; } - else{ - index1 = cs_index(psi->cs, ic, jc, nlocal[2]); + else { + /* Borrow fluid site at end ... */ + index1 = cs_index(psi->cs, ic, jc, nlocal[Z]); psi->psi[addr_rank0(psi->nsites, index)] = psi->psi[addr_rank0(psi->nsites, index1)]; } From 2092bcf688d6cf8246b9b498151dc49218b6380f Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 17:08:25 +0100 Subject: [PATCH 45/79] Add null free energy --- src/fe_null.c | 206 ++++++++++++++++++++++++++++++++++++++++++++++ src/fe_null.h | 39 +++++++++ src/free_energy.h | 3 +- 3 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 src/fe_null.c create mode 100644 src/fe_null.h diff --git a/src/fe_null.c b/src/fe_null.c new file mode 100644 index 000000000..60b28eb7b --- /dev/null +++ b/src/fe_null.c @@ -0,0 +1,206 @@ +/**************************************************************************** + * + * fe_null.c + * + * A 'null' free energy. Everything is zero. + * + * + * Edinburgh Soft Matter and Statistical Physics Group + * and Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Contributing authors: + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + ****************************************************************************/ + +#include +#include + + +#include "pe.h" +#include "fe_null.h" + +static fe_vt_t fe_null_hvt = { + (fe_free_ft) fe_null_free, + (fe_target_ft) fe_null_target, + (fe_fed_ft) fe_null_fed, + (fe_mu_ft) fe_null_mu, + (fe_mu_solv_ft) NULL, + (fe_str_ft) fe_null_str, + (fe_str_ft) fe_null_str, + (fe_str_ft) NULL, + (fe_hvector_ft) NULL, + (fe_htensor_ft) NULL, + (fe_htensor_v_ft) NULL, + (fe_stress_v_ft) fe_null_str_v, + (fe_stress_v_ft) fe_null_str_v, + (fe_stress_v_ft) NULL +}; + +static __constant__ fe_vt_t fe_null_dvt = { + (fe_free_ft) NULL, + (fe_target_ft) NULL, + (fe_fed_ft) fe_null_fed, + (fe_mu_ft) fe_null_mu, + (fe_mu_solv_ft) NULL, + (fe_str_ft) fe_null_str, + (fe_str_ft) fe_null_str, + (fe_str_ft) NULL, + (fe_hvector_ft) NULL, + (fe_htensor_ft) NULL, + (fe_htensor_v_ft) NULL, + (fe_stress_v_ft) fe_null_str_v, + (fe_stress_v_ft) fe_null_str_v, + (fe_stress_v_ft) NULL +}; + +/**************************************************************************** + * + * fe_null_create + * + ****************************************************************************/ + +__host__ int fe_null_create(pe_t * pe, fe_null_t ** p) { + + int ndevice; + fe_null_t * fe = NULL; + + assert(pe); + + fe = (fe_null_t *) calloc(1, sizeof(fe_null_t)); + assert(fe); + if (fe == NULL) pe_fatal(pe, "calloc(fe_null_t) failed\n"); + + fe->pe = pe; + fe->super.func = &fe_null_hvt; + fe->super.id = FE_NULL; + + /* Allocate target memory, or alias */ + + tdpGetDeviceCount(&ndevice); + + if (ndevice == 0) { + fe->target = fe; + } + else { + fe_vt_t * vt = NULL; + + tdpGetSymbolAddress((void **) &vt, tdpSymbol(fe_null_dvt)); + tdpAssert(tdpMemcpy(&fe->target->super.func, &vt, sizeof(fe_vt_t *), + tdpMemcpyHostToDevice)); + } + + *p = fe; + + return 0; +} + +/***************************************************************************** + * + * fe_null_free + * + *****************************************************************************/ + +__host__ int fe_null_free(fe_null_t * fe) { + + int ndevice; + + assert(fe); + + tdpGetDeviceCount(&ndevice); + + if (ndevice > 0) tdpFree(fe->target); + free(fe); + + return 0; +} +/**************************************************************************** + * + * fe_null_target + * + ****************************************************************************/ + +__host__ int fe_null_target(fe_null_t * fe, fe_t ** target) { + + assert(fe); + assert(target); + + *target = (fe_t *) fe->target; + + return 0; +} + +/**************************************************************************** + * + * fe_null_fed + * + * The free energy density is zero. + * + ****************************************************************************/ + +__host__ __device__ int fe_null_fed(fe_null_t * fe, int index, double * fed) { + + assert(fe); + + *fed = 0.0*index; + + return 0; +} + +/***************************************************************************** + * + * fe_null_mu + * + *****************************************************************************/ + +__host__ __device__ int fe_null_mu(fe_null_t * fe, int index, double * mu) { + + *mu = 0.0*index; + + return 0; +} + +/**************************************************************************** + * + * fe_null_str + * + ****************************************************************************/ + +__host__ __device__ +int fe_null_str(fe_null_t * fe, int index, double s[3][3]) { + + assert(fe); + + for (int ia = 0; ia < 3; ia++) { + for (int ib = 0; ib < 3; ib++) { + s[ia][ib] = 0.0*index; + } + } + + return 0; +} + +/***************************************************************************** + * + * fe_symm_str_v + * + *****************************************************************************/ + +__host__ __device__ +void fe_null_str_v(fe_null_t * fe, int index, double s[3][3][NSIMDVL]) { + + assert(fe); + + for (int ia = 0; ia < 3; ia++) { + for (int ib = 0; ib < 3; ib++) { + int iv = 0; + for_simd_v(iv, NSIMDVL) { + s[ia][ib][iv] = 0.0*index; + } + } + } + + return; +} diff --git a/src/fe_null.h b/src/fe_null.h new file mode 100644 index 000000000..f3f34a9eb --- /dev/null +++ b/src/fe_null.h @@ -0,0 +1,39 @@ +/***************************************************************************** + * + * fe_null.h + * + * Edinburgh Soft Matter and Statistical Physics Group and + * Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Contributing authors: + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + *****************************************************************************/ + +#ifndef LUDWIG_FE_NULL_H +#define LUDWIG_FE_NULL_H + +#include "pe.h" +#include "free_energy.h" + +typedef struct fe_null_s fe_null_t; + +struct fe_null_s { + fe_t super; /* Superclass block */ + pe_t * pe; /* Parallel environment */ + fe_null_t * target; /* Target copy */ +}; + +__host__ int fe_null_create(pe_t * pe, fe_null_t ** fe); +__host__ int fe_null_free(fe_null_t * fe); +__host__ int fe_null_target(fe_null_t * fe, fe_t ** target); + +__host__ __device__ int fe_null_fed(fe_null_t * fe, int index, double * fed); +__host__ __device__ int fe_null_mu(fe_null_t * fe, int index, double * mu); +__host__ __device__ int fe_null_str(fe_null_t * fe, int index, double s[3][3]); +__host__ __device__ void fe_null_str_v(fe_null_t * fe, int index, + double s[3][3][NSIMDVL]); + +#endif diff --git a/src/free_energy.h b/src/free_energy.h index cf415bbfa..ffaa190fa 100644 --- a/src/free_energy.h +++ b/src/free_energy.h @@ -24,7 +24,8 @@ #include "memory.h" -enum fe_id_enum {FE_SYMMETRIC, +enum fe_id_enum {FE_NULL, + FE_SYMMETRIC, FE_BRAZOVSKII, FE_SURFACTANT, FE_POLAR, From 94c63046b359bf74e52b2b39d4b18ee0052f74d8 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 17:15:35 +0100 Subject: [PATCH 46/79] Add fe null test --- tests/unit/test_fe_null.c | 206 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 tests/unit/test_fe_null.c diff --git a/tests/unit/test_fe_null.c b/tests/unit/test_fe_null.c new file mode 100644 index 000000000..35c98ff25 --- /dev/null +++ b/tests/unit/test_fe_null.c @@ -0,0 +1,206 @@ +/***************************************************************************** + * + * test_fe_null.c + * + * Edinburgh Soft Matter and Statistical Physics Group and + * Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + *****************************************************************************/ + +#include +#include +#include + +#include "fe_null.c" + +int test_fe_null_create(pe_t * pe); +int test_fe_null_fed(pe_t * pe); +int test_fe_null_mu(pe_t * pe); +int test_fe_null_str(pe_t * pe); +int test_fe_null_str_v(pe_t * pe); + +/***************************************************************************** + * + * test_fe_null_suite + * + *****************************************************************************/ + +int test_fe_null_suite(void) { + + pe_t * pe = NULL; + + pe_create(MPI_COMM_WORLD, PE_QUIET, &pe); + + test_fe_null_create(pe); + test_fe_null_fed(pe); + test_fe_null_mu(pe); + test_fe_null_str(pe); + test_fe_null_str_v(pe); + + pe_info(pe, "PASS ./unit/test_fe_null\n"); + pe_free(pe); + + return 0; +} + +/***************************************************************************** + * + * test_fe_null_create + * + *****************************************************************************/ + +int test_fe_null_create(pe_t * pe) { + + fe_null_t * fe = NULL; + + fe_null_create(pe, &fe); + + assert(fe); + assert(fe->super.id == FE_NULL); + assert(fe->super.func); + + /* If an implementation is added, update the tests. */ + assert(fe->super.func->free); + assert(fe->super.func->target); + assert(fe->super.func->fed); + assert(fe->super.func->mu); + assert(fe->super.func->mu_solv == NULL); + assert(fe->super.func->stress); + assert(fe->super.func->str_symm); + assert(fe->super.func->str_anti == NULL); + assert(fe->super.func->hvector == NULL); + assert(fe->super.func->htensor == NULL); + assert(fe->super.func->htensor_v == NULL); + assert(fe->super.func->stress_v); + assert(fe->super.func->str_symm_v); + assert(fe->super.func->str_anti_v == NULL); + + fe_null_free(fe); + + return 0; +} + +/***************************************************************************** + * + * test_fe_null_fed + * + *****************************************************************************/ + +int test_fe_null_fed(pe_t * pe) { + + fe_null_t * fe = NULL; + + assert(pe); + + fe_null_create(pe, &fe); + + { + int index = 1; + double fed = 1.0; + + fe_null_fed(fe, index, &fed); + assert(fabs(fed - 0.0) < DBL_EPSILON); + } + + fe_null_free(fe); + + return 0; +} + +/***************************************************************************** + * + * test_fe_null_mu + * + *****************************************************************************/ + +int test_fe_null_mu(pe_t * pe) { + + fe_null_t * fe = NULL; + + assert(pe); + + fe_null_create(pe, &fe); + + { + int index = 1; + double mu = 1.0; + + fe_null_mu(fe, index, &mu); + assert(fabs(mu - 0.0) < DBL_EPSILON); + } + + fe_null_free(fe); + + return 0; +} + +/***************************************************************************** + * + * test_fe_null_str + * + *****************************************************************************/ + +int test_fe_null_str(pe_t * pe) { + + fe_null_t * fe = NULL; + + assert(pe); + + fe_null_create(pe, &fe); + + { + int index = 1; + double s[3][3] = {{1.0,2.0,3.0},{4.0,5.0,6.0},{7.0,8.0,9.0}}; + + fe_null_str(fe, index, s); + + for (int ia = 0; ia < 3; ia++) { + for (int ib = 0; ib < 3; ib++) { + assert(fabs(s[ia][ib] - 0.0) < DBL_EPSILON); + } + } + } + + fe_null_free(fe); + + return 0; +} + +/***************************************************************************** + * + * test_fe_null_str_v + * + *****************************************************************************/ + +int test_fe_null_str_v(pe_t * pe) { + + fe_null_t * fe = NULL; + + assert(pe); + + fe_null_create(pe, &fe); + + { + int index = 1; + double s[3][3][NSIMDVL] = {0}; + + fe_null_str_v(fe, index, s); + + for (int ia = 0; ia < 3; ia++) { + for (int ib = 0; ib < 3; ib++) { + for (int iv = 0; iv < NSIMDVL; iv++) { + assert(fabs(s[ia][ib][iv] - 0.0) < DBL_EPSILON); + } + } + } + } + + fe_null_free(fe); + + return 0; +} + From 06883e52263b2a901b42014c8849c119cfe54f57 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 17:16:06 +0100 Subject: [PATCH 47/79] Reinstate cahn hilliard test --- tests/unit/test_phi_ch.c | 307 ++++++++++----------------------------- tests/unit/tests.c | 2 + tests/unit/tests.h | 1 + 3 files changed, 80 insertions(+), 230 deletions(-) diff --git a/tests/unit/test_phi_ch.c b/tests/unit/test_phi_ch.c index 8d5b890d4..36af56b85 100644 --- a/tests/unit/test_phi_ch.c +++ b/tests/unit/test_phi_ch.c @@ -2,15 +2,14 @@ * * test_phi_ch.c * - * Order parameter advection and the Cahn Hilliard equation. + * That is, unit test of phi_cahn_hilliard.c + * A free energy is required so use fe_null.h. * - * In principle, this really is advection only; there is - * a default chemical potential (i.e., everywhere zero). * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2010-2017 The University of Edinburgh + * (c) 2010-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -18,30 +17,16 @@ *****************************************************************************/ #include -#include -#include -#include #include "pe.h" #include "coords.h" +#include "fe_null.h" #include "physics.h" -#include "leesedwards.h" -#include "hydro.h" -#include "map.h" -#include "field.h" -#include "gradient_3d_7pt_fluid.h" -#include "free_energy.h" #include "phi_cahn_hilliard.h" -#include "util.h" -#include "tests.h" -static int test_u_zero(cs_t * cs, hydro_t * hydro, const double u[3]); -static int test_advection(cs_t * cs, phi_ch_t * pch, field_t * phi, - hydro_t * hydro); -static int test_set_drop(cs_t * cs, field_t * phi, const double rc[3], - double radius, double xi0); -static int test_drop_difference(cs_t * cs, field_t * phi, const double rc[3], - double radius, double xi0, double elnorm[3]); +int test_phi_ch_create(pe_t * pe); +int test_phi_cahn_hilliard(pe_t * pe); + /***************************************************************************** * @@ -51,46 +36,18 @@ static int test_drop_difference(cs_t * cs, field_t * phi, const double rc[3], int test_phi_ch_suite(void) { - int nf = 1; - int nhalo = 2; - pe_t * pe = NULL; - cs_t * cs = NULL; - lees_edw_t * le = NULL; - hydro_t * hydro = NULL; - field_t * phi = NULL; - physics_t * phys = NULL; - phi_ch_t * pch = NULL; - - hydro_options_t hopts = hydro_options_default(); - field_options_t opts = field_options_ndata_nhalo(nf, nhalo); + physics_t * phys = NULL; /* Dependency via Lees Edwards */ pe_create(MPI_COMM_WORLD, PE_QUIET, &pe); - cs_create(pe, &cs); - cs_nhalo_set(cs, nhalo); - cs_init(cs); physics_create(pe, &phys); - lees_edw_create(pe, cs, NULL, &le); - - field_create(pe, cs, le, "phi", &opts, &phi); - hydro_create(pe, cs, le, &hopts, &hydro); - - assert(phi); - assert(hydro); - phi_ch_create(pe, cs, le, NULL, &pch); - assert(pch); + test_phi_ch_create(pe); + test_phi_cahn_hilliard(pe); - test_advection(cs, pch, phi, hydro); + pe_info(pe, "PASS ./unit/test_phi_ch\n"); - hydro_free(hydro); - field_free(phi); physics_free(phys); - - phi_ch_free(pch); - lees_edw_free(le); - cs_free(cs); - pe_info(pe, "PASS ./unit/test_phi_ch\n"); pe_free(pe); return 0; @@ -98,220 +55,110 @@ int test_phi_ch_suite(void) { /***************************************************************************** * - * test_advection - * - * Advect a droplet at constant velocity once across the lattice. + * test_phi_ch_create * *****************************************************************************/ -static int test_advection(cs_t * cs, phi_ch_t * pch, field_t * phi, hydro_t * hydro) { - - int n, ntmax; - double u[3]; - double rc[3]; - double r0; - double xi0; - double ell[3]; - double lmin[3]; - double ltot[3]; - - assert(cs); - assert(pch); - assert(phi); - assert(hydro); +int test_phi_ch_create(pe_t * pe) { - cs_lmin(cs, lmin); - cs_ltot(cs, ltot); - - r0 = 0.25*ltot[X]; /* Drop should fit */ - xi0 = 0.1*r0; /* Cahn number = 1 / 10 (say) */ - - /* Initial position is central */ - rc[X] = lmin[X] + 0.5*ltot[X]; - rc[Y] = lmin[Y] + 0.5*ltot[Y]; - rc[Z] = lmin[Z] + 0.5*ltot[Z]; - - u[X] = -0.25; - u[Y] = 0.25; - u[Z] = -0.25; - - ntmax = 10; - - test_u_zero(cs, hydro, u); - test_set_drop(cs, phi, rc, r0, xi0); + cs_t * cs = NULL; + lees_edw_t * le = NULL; - /* Steps */ + cs_create(pe, &cs); + cs_init(cs); - for (n = 0; n < ntmax; n++) { - field_halo(phi); - /* The map_t argument can be NULL here, as there is no solid; - * the same is true for noise */ - phi_cahn_hilliard(pch, NULL, phi, hydro, NULL, NULL); + { + lees_edw_info_t opts = {0}; + lees_edw_create(pe, cs, &opts, &le); } - /* Exact solution has position: */ - rc[X] += u[X]*ntmax; - rc[Y] += u[Y]*ntmax; - rc[Z] += u[Z]*ntmax; + { + phi_ch_info_t info = {.conserve = 0}; + phi_ch_t * ch = NULL; - test_drop_difference(cs, phi, rc, r0, xi0, ell); - - /* For these particular values... */ - assert(fabs(ell[0] - 1.1448194e-02) < FLT_EPSILON); - assert(fabs(ell[1] - 1.5247605e-03) < FLT_EPSILON); - assert(fabs(ell[2] - 2.5296108e-01) < FLT_EPSILON); - - return 0; -} - -/**************************************************************************** - * - * test_u_zero - * - * Set the velocity (and hence Courant numbers) uniformly in the - * system. - * - ****************************************************************************/ + phi_ch_create(pe, cs, le, &info, &ch); + assert(ch); -static int test_u_zero(cs_t * cs, hydro_t * hydro, const double u[3]) { + assert(ch->info.conserve == info.conserve); + assert(ch->pe == pe); + assert(ch->cs == cs); + assert(ch->csum == NULL); + assert(ch->le == le); + assert(ch->flux); - int ic, jc, kc, index; - int nlocal[3]; - - assert(hydro); - - cs_nlocal(cs, nlocal); - - for (ic = 1; ic <= nlocal[X]; ic++) { - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { - - index = cs_index(cs, ic, jc, kc); - hydro_u_set(hydro, index, u); - } - } + phi_ch_free(ch); } - return 0; -} - -/***************************************************************************** - * - * test_set_drop - * - * Initialise a droplet with centre at rc, with given radius and - * interfacial width xi0. - * - *****************************************************************************/ - -static int test_set_drop(cs_t * cs, field_t * fphi, const double rc[3], - double radius, - double xi0) { - - int nlocal[3]; - int noffset[3]; - int index, ic, jc, kc; - - double position[3]; - double rzeta; /* rxi ! */ - - double phi, r; - - cs_nlocal(cs, nlocal); - cs_nlocal_offset(cs, noffset); + { + phi_ch_info_t info = {.conserve = 1}; + phi_ch_t * ch = NULL; - assert(fphi); - rzeta = 1.0 / xi0; + phi_ch_create(pe, cs, le, &info, &ch); + assert(ch); - for (ic = 1; ic <= nlocal[X]; ic++) { - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { + assert(ch->info.conserve == info.conserve); + assert(ch->pe == pe); + assert(ch->cs == cs); + assert(ch->csum); + assert(ch->le == le); + assert(ch->flux); - index = cs_index(cs, ic, jc, kc); - position[X] = 1.0*(noffset[X] + ic) - rc[X]; - position[Y] = 1.0*(noffset[Y] + jc) - rc[Y]; - position[Z] = 1.0*(noffset[Z] + kc) - rc[Z]; - - r = sqrt(dot_product(position, position)); - phi = tanh(rzeta*(r - radius)); - field_scalar_set(fphi, index, phi); - } - } + phi_ch_free(ch); } + lees_edw_free(le); + cs_free(cs); + return 0; } /***************************************************************************** * - * test_drop_difference + * test_phi_cahn_hilliard * - * For the advection only problem, the exact solution is known (the - * centre of the drop is just displaced u\Delta t). So we can work - * out the errors. + * Minimum requirement of an order parameter and free energy. * *****************************************************************************/ -static int test_drop_difference(cs_t * cs, field_t * fphi, const double rc[3], - double radius, double xi0, double elnorm[3]) { +int test_phi_cahn_hilliard(pe_t * pe) { - int nlocal[3]; - int noffset[3]; - int index, ic, jc, kc; - - double ltot[3]; - double position[3]; - double phi, phi0, r, rzeta, dphi; - double ell_local[2], ell[2]; - double ell_inf_local, ell_inf; - MPI_Comm comm; - - assert(cs); - assert(fphi); - assert(xi0 > 0.0); - rzeta = 1.0 / xi0; + cs_t * cs = NULL; + lees_edw_t * le = NULL; + field_t * field = NULL; + fe_null_t * fe = NULL; - cs_ltot(cs, ltot); - cs_nlocal(cs, nlocal); - cs_nlocal_offset(cs, noffset); - cs_cart_comm(cs, &comm); + cs_create(pe, &cs); + cs_init(cs); - ell_local[0] = 0.0; - ell_local[1] = 0.0; - ell_inf_local = 0.0; + fe_null_create(pe, &fe); - for (ic = 1; ic <= nlocal[X]; ic++) { - for (jc = 1; jc <= nlocal[Y]; jc++) { - for (kc = 1; kc <= nlocal[Z]; kc++) { + { + lees_edw_info_t opts = {0}; + lees_edw_create(pe, cs, &opts, &le); + } - index = cs_index(cs, ic, jc, kc); - position[X] = 1.0*(noffset[X] + ic) - rc[X]; - position[Y] = 1.0*(noffset[Y] + jc) - rc[Y]; - position[Z] = 1.0*(noffset[Z] + kc) - rc[Z]; + { + /* Order parameter field */ + field_options_t opts = field_options_default(); + field_create(pe, cs, le, "phi", &opts, &field); + } - field_scalar(fphi, index, &phi); + { + /* No test as such. */ + phi_ch_info_t info = {.conserve = 0}; + phi_ch_t * ch = NULL; - r = sqrt(dot_product(position, position)); - phi0 = tanh(rzeta*(r - radius)); + phi_ch_create(pe, cs, le, &info, &ch); - dphi = fabs(phi - phi0); - ell_local[0] += fabs(phi - phi0); - ell_local[1] += pow(phi - phi0, 2); - if (dphi > ell_inf_local) ell_inf_local = dphi; + phi_cahn_hilliard(ch, (fe_t *) fe, field, NULL, NULL, NULL); - } - } + phi_ch_free(ch); } - MPI_Allreduce(ell_local, ell, 2, MPI_DOUBLE, MPI_SUM, comm); - MPI_Allreduce(&ell_inf_local, &ell_inf, 1, MPI_DOUBLE, MPI_MAX, comm); - - ell[0] /= ltot[X]*ltot[Y]*ltot[Z]; - ell[1] /= ltot[X]*ltot[Y]*ltot[Z]; - - elnorm[0] = ell[0]; - elnorm[1] = ell[1]; - elnorm[2] = ell_inf; + field_free(field); + lees_edw_free(le); + fe_null_free(fe); + cs_free(cs); return 0; } diff --git a/tests/unit/tests.c b/tests/unit/tests.c index e49731a87..86119581c 100644 --- a/tests/unit/tests.c +++ b/tests/unit/tests.c @@ -64,6 +64,7 @@ __host__ int tests_create() { test_colloids_info_suite(); test_colloids_halo_suite(); test_ewald_suite(); + test_fe_null_suite(); test_fe_electro_suite(); test_fe_electro_symm_suite(); test_fe_lc_droplet_suite(); @@ -98,6 +99,7 @@ __host__ int tests_create() { test_phi_bc_inflow_fixed_suite(); test_phi_bc_outflow_opts_suite(); test_phi_bc_outflow_free_suite(); + test_phi_ch_suite(); test_polar_active_suite(); test_psi_suite(); test_psi_sor_suite(); diff --git a/tests/unit/tests.h b/tests/unit/tests.h index e499ed7b2..feec195c6 100644 --- a/tests/unit/tests.h +++ b/tests/unit/tests.h @@ -39,6 +39,7 @@ int test_colloids_info_suite(void); int test_colloids_halo_suite(void); int test_coords_suite(void); int test_ewald_suite(void); +int test_fe_null_suite(void); int test_fe_electro_suite(void); int test_fe_electro_symm_suite(void); int test_fe_lc_droplet_suite(void); From c11b01097cffefb1e6956f7f7abbe092f7100dad Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 21 Jul 2022 17:24:29 +0100 Subject: [PATCH 48/79] Correct typo in include --- tests/unit/test_fe_null.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_fe_null.c b/tests/unit/test_fe_null.c index 35c98ff25..f38b31385 100644 --- a/tests/unit/test_fe_null.c +++ b/tests/unit/test_fe_null.c @@ -15,7 +15,7 @@ #include #include -#include "fe_null.c" +#include "fe_null.h" int test_fe_null_create(pe_t * pe); int test_fe_null_fed(pe_t * pe); From d2d642d6e9ca9626936e4896331221f8434d7a1e Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 09:45:20 +0100 Subject: [PATCH 49/79] Add util fopen and a test --- src/util_fopen.c | 196 +++++++++++++++++++++++++++++++++++ src/util_fopen.h | 22 ++++ tests/unit/test_util_fopen.c | 133 ++++++++++++++++++++++++ tests/unit/tests.c | 1 + tests/unit/tests.h | 1 + 5 files changed, 353 insertions(+) create mode 100644 src/util_fopen.c create mode 100644 src/util_fopen.h create mode 100644 tests/unit/test_util_fopen.c diff --git a/src/util_fopen.c b/src/util_fopen.c new file mode 100644 index 000000000..6e7945ec5 --- /dev/null +++ b/src/util_fopen.c @@ -0,0 +1,196 @@ +/***************************************************************************** + * + * util_fopen.c + * + * This is a version of fopen() which allows the specification of + * something other than the default UMASK for new files, which is + * not available via the ANSI C fopen(). + * + * UMASK 0644 leads to annoying security alerts from code scanning, + * so use 0600 instead. + * + * The allowed modes are "rwa+b". The optional "x" and "e" do + * nothing. + * + * The Unix implementation needs to use open() then fdopen(). + * + * A fall-back option which is just a wrapper to standard fopen() + * is available. + * + * + * Edinburgh Soft Matter and Statistical Physics Group and + * Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + *****************************************************************************/ + +#include + +#include "util_fopen.h" + +/***************************************************************************** + * + * util_fopen_default_umask + * + *****************************************************************************/ + +int util_fopen_default_umask(void) { + + return 0600; +} + +#ifdef USE_STANDARD_FOPEN + +/***************************************************************************** + * + * util_fopen + * + *****************************************************************************/ + +FILE * util_fopen(const char * path, const char * mode) { + + return fopen(path, mode); +} + +#else + +#include +#include +#include +#include + +FILE * util_fopen_umask(const char * path, const char * mode, int umask); + +/***************************************************************************** + * + * util_fopen + * + * Formally, the umask as argument to open() is of type mode_t (often + * size 16 bytes). Here we just say int. + * + *****************************************************************************/ + +FILE * util_fopen(const char * path, const char * mode) { + + int umask = util_fopen_default_umask(); + + assert(sizeof(int) >= sizeof(mode_t)); + + return util_fopen_umask(path, mode, umask); +} + +/***************************************************************************** + * + * util_fopen_umask + * + * "r" open for reading + * "w" open for writing [create new file] write at position 0 + * "a" open for appending [create new file] write at end + * "r+" reading and writing + * "w+" reading and writing [create new file] write at position 0 + * "a+" reading and writing [create new file] read from start, write at end + * + * Optionally, 'b' may appear, but has no effect. + * + * Standard arguments 'x' and 'e' are not handled. + * + *****************************************************************************/ + +FILE * util_fopen_umask(const char * path, const char * mode, int umask) { + + int flags = 0; /* For open() */ + const char * fdmode = NULL; /* For fopen() */ + FILE * fp = NULL; + + if (!path) goto err_einval; + if (!mode) goto err_einval; + + /* Verify 'mode' consists of supported characters only. */ + /* 'b' may appear but doesn't have any consequences. */ + + if (strlen(mode) != strspn(mode, "rwa+b")) goto err_einval; + + { + /* Arguments may appear in any order ... */ + int have_r = strchr(mode, 'r') ? 1 : 0; + int have_w = strchr(mode, 'w') ? 2 : 0; + int have_a = strchr(mode, 'a') ? 4 : 0; + int have_p = strchr(mode, '+') ? 8 : 0; + + switch (have_r + have_w + have_a + have_p) { + case 1: + flags = O_RDONLY; + fdmode = "r"; + break; + case 2: + flags = O_WRONLY | O_CREAT | O_TRUNC; + fdmode = "w"; + break; + case 4: + flags = O_WRONLY | O_CREAT | O_APPEND; + fdmode = "a"; + break; + case 9: + flags = O_RDWR | O_CREAT; + fdmode = "r+"; + break; + case 10: + flags = O_RDWR | O_CREAT | O_TRUNC; + fdmode = "w+"; + break; + case 12: + flags = O_RDWR | O_CREAT | O_APPEND; + fdmode = "a+"; + break; + default: + /* Invalid combination of 'r', 'w', 'a', and '+'. */ + goto err_einval; + } + } + + { + int fd = -1; /* open() file descriptor */ + + if (flags & O_CREAT) { + /* New file with a umask (of type mode_t) */ + mode_t umode = umask; + fd = open(path, flags, umode); + } + else { + /* Existing file */ + fd = open(path, flags); + } + + /* If open() has failed, errno is set by open(). Fail here: */ + + if (fd == -1) return NULL; + + fp = fdopen(fd, fdmode); + + if (fp) { + /* Success */ + return fp; + } + else { + /* Failed. Clean up from open(), but retain fdopen() errno. */ + + int fdopen_errno = errno; + + if (flags & O_TRUNC) unlink(path); + close(fd); + + errno = fdopen_errno; + } + } + + return NULL; + +err_einval: + errno = EINVAL; + return NULL; +} + +#endif diff --git a/src/util_fopen.h b/src/util_fopen.h new file mode 100644 index 000000000..664db8493 --- /dev/null +++ b/src/util_fopen.h @@ -0,0 +1,22 @@ +/***************************************************************************** + * + * util_fopen.h + * + * Edinburgh Soft Matter and Statistical Physics Group and + * Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + *****************************************************************************/ + +#ifndef LUDWIG_UTIL_FOPEN_H +#define LUDWIG_UTIL_FOPEN_H + +#include + +int util_fopen_default_umask(void); +FILE * util_fopen(const char * path, const char * mode); + +#endif diff --git a/tests/unit/test_util_fopen.c b/tests/unit/test_util_fopen.c new file mode 100644 index 000000000..21ff5397e --- /dev/null +++ b/tests/unit/test_util_fopen.c @@ -0,0 +1,133 @@ +/***************************************************************************** + * + * test_util_fopen.c + * + * Check the wrapper is working properly. + * + * + * Edinburgh Soft Matter and Statistical Physics Group and + * Edinburgh Parallel Computing Centre + * + * (c) 2022 The University of Edinburgh + * + * Kevin Stratford (kevin@epcc.ed.ac.uk) + * + *****************************************************************************/ + +#include + +#include "pe.h" +#include "util_fopen.h" + +int test_util_fopen_default_umask(void); +int test_util_fopen(void); + +/***************************************************************************** + * + * test_util_fopen_suite + * + *****************************************************************************/ + +int test_util_fopen_suite(void) { + + pe_t * pe = NULL; + + pe_create(MPI_COMM_WORLD, PE_QUIET, &pe); + + test_util_fopen_default_umask(); + + /* All actual file operations at root to prevent collisions */ + + if (pe_mpi_rank(pe) == 0) test_util_fopen(); + + pe_info(pe, "PASS ./unit/test_util_fopen\n"); + pe_free(pe); + + return 0; +} + +/***************************************************************************** + * + * test_util_fopen_default_umask + * + *****************************************************************************/ + +int test_util_fopen_default_umask(void) { + + int umask = util_fopen_default_umask(); + + assert(umask == 0600); + + return (umask - 0600); +} + +/***************************************************************************** + * + * test_util_fopen + * + *****************************************************************************/ + +int test_util_fopen(void) { + + int ifail = 0; + const char * path = "util_fopen_test_file.txt"; + + { + /* Write a new file ... */ + const char * mode = "w"; + FILE * fp = util_fopen(path, mode); + if (ferror(fp)) { + ifail = -1; + } + else { + fprintf(fp, "text file\n"); + fclose(fp); + } + } + + { + /* Read the file we just wrote ... */ + const char * mode = "r"; + FILE * fp = util_fopen(path, mode); + if (ferror(fp)) { + ifail = -1; + } + else { + char buf[BUFSIZ] = {0}; + fgets(buf, BUFSIZ-1, fp); + fclose(fp); + } + } + + { + /* Append to same file ... */ + const char * mode = "a"; + FILE * fp = util_fopen(path, mode); + if (ferror(fp)) { + ifail = -1; + } + else { + fprintf(fp, "another text line\n"); + fclose(fp); + } + } + + { + /* And check remaining mode flags ... */ + const char * mode = "a+b"; + FILE * fp = util_fopen(path, mode); + if (ferror(fp)) { + ifail = -1; + } + else { + fprintf(fp, "Final text line\n"); + fclose(fp); + } + } + + if (ifail == 0) remove(path); + + assert(ifail == 0); + + return ifail; +} diff --git a/tests/unit/tests.c b/tests/unit/tests.c index 86119581c..dce322015 100644 --- a/tests/unit/tests.c +++ b/tests/unit/tests.c @@ -109,6 +109,7 @@ __host__ int tests_create() { test_rt_suite(); test_timer_suite(); test_util_suite(); + test_util_fopen_suite(); test_util_sum_suite(); test_visc_arrhenius_suite(); test_wall_suite(); diff --git a/tests/unit/tests.h b/tests/unit/tests.h index feec195c6..60176c829 100644 --- a/tests/unit/tests.h +++ b/tests/unit/tests.h @@ -90,6 +90,7 @@ int test_random_suite(void); int test_rt_suite(void); int test_timer_suite(void); int test_util_suite(void); +int test_util_fopen_suite(void); int test_util_sum_suite(void); int test_visc_arrhenius_suite(void); int test_wall_suite(void); From 6955b46a40b4e9415177d4256c8d30236223fff0 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 10:06:51 +0100 Subject: [PATCH 50/79] Avoid unused return value in fgets() --- tests/unit/test_util_fopen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_util_fopen.c b/tests/unit/test_util_fopen.c index 21ff5397e..7e22cd384 100644 --- a/tests/unit/test_util_fopen.c +++ b/tests/unit/test_util_fopen.c @@ -94,7 +94,9 @@ int test_util_fopen(void) { } else { char buf[BUFSIZ] = {0}; - fgets(buf, BUFSIZ-1, fp); + char * pl = NULL; + pl = fgets(buf, BUFSIZ, fp); + if (pl == NULL) ifail = -1; fclose(fp); } } From 136ab023fb28b7a2ade2d1bfe7f7ae96c48aad44 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 10:19:14 +0100 Subject: [PATCH 51/79] Attempt to fix fopen alert --- tests/unit/test_nernst_planck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_nernst_planck.c b/tests/unit/test_nernst_planck.c index c54191679..acbf35282 100644 --- a/tests/unit/test_nernst_planck.c +++ b/tests/unit/test_nernst_planck.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "pe.h" @@ -32,6 +31,7 @@ #include "psi_stats.h" #include "fe_electro.h" #include "nernst_planck.h" +#include "util_fopen.h" #include "tests.h" static int test_nernst_planck_driver(pe_t * pe); @@ -346,7 +346,7 @@ static int test_io(cs_t * cs, psi_t * psi, int tstep) { if (cs_cart_rank(cs) == 0) { sprintf(filename, "np_test-%d.dat", tstep); - out = fopen(filename, "w"); + out = util_fopen(filename, "w"); if (out == NULL) pe_fatal(psi->pe, "Could not open %s\n", filename); for (ic = 1; ic <= ntotal[X]; ic++) { From 6a7848b3470ee7c3d3e1e15103ee733e5aa09266 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 11:50:11 +0100 Subject: [PATCH 52/79] Allow GPU --- src/fe_electro.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/fe_electro.c b/src/fe_electro.c index 8d7c7cbb5..72cdc67fa 100644 --- a/src/fe_electro.c +++ b/src/fe_electro.c @@ -127,10 +127,16 @@ __host__ int fe_electro_create(pe_t * pe, psi_t * psi, fe_electro_t ** pobj) { fe->target = fe; } else { - fe_vt_t * vt; - /* Device implementation pending */ + /* Allow this to go forward on the basis that no device calls are + * available. */ + fe_vt_t * vt = NULL; + + tdpAssert(tdpMalloc((void **) &fe->target, sizeof(fe_electro_t))); + tdpMemset(fe->target, 0, sizeof(fe_electro_t)); + tdpGetSymbolAddress((void **) &vt, tdpSymbol(fe_electro_dvt)); - pe_fatal(pe, "No device implementation for fe_electro\n"); + tdpAssert(tdpMemcpy(&fe->target->super.func, &vt, sizeof(fe_vt_t *), + tdpMemcpyHostToDevice)); } *pobj = fe; @@ -146,8 +152,13 @@ __host__ int fe_electro_create(pe_t * pe, psi_t * psi, fe_electro_t ** pobj) { __host__ int fe_electro_free(fe_electro_t * fe) { + int ndevice = 0; + assert(fe); + tdpAssert(tdpGetDeviceCount(&ndevice)); + if (ndevice > 0) tdpAssert(tdpFree(fe->target)); + if (fe->mu_ref) free(fe->mu_ref); free(fe); From 66c9c72b89d4b1deefdf971e412fd0bc5ee973ca Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 11:50:28 +0100 Subject: [PATCH 53/79] GPU bug fix --- src/fe_null.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fe_null.c b/src/fe_null.c index 60b28eb7b..7d6fe8285 100644 --- a/src/fe_null.c +++ b/src/fe_null.c @@ -87,6 +87,9 @@ __host__ int fe_null_create(pe_t * pe, fe_null_t ** p) { else { fe_vt_t * vt = NULL; + tdpAssert(tdpMalloc((void **) &fe->target, sizeof(fe_null_t))); + tdpAssert(tdpMemset(fe->target, 0, sizeof(fe_null_t))); + tdpGetSymbolAddress((void **) &vt, tdpSymbol(fe_null_dvt)); tdpAssert(tdpMemcpy(&fe->target->super.func, &vt, sizeof(fe_vt_t *), tdpMemcpyHostToDevice)); From 0b4db7de94a998e85a6d6005b9ae381cf490ce15 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 11:51:12 +0100 Subject: [PATCH 54/79] Don't run host halo swaps for GPU --- tests/unit/test_prop.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_prop.c b/tests/unit/test_prop.c index b850cf6b0..b4de41e76 100644 --- a/tests/unit/test_prop.c +++ b/tests/unit/test_prop.c @@ -38,6 +38,7 @@ __host__ int do_test_source_destination(pe_t * pe, cs_t * cs, int ndist, int test_lb_prop_suite(void) { + int ndevice = 0; pe_t * pe = NULL; cs_t * cs = NULL; @@ -45,15 +46,21 @@ int test_lb_prop_suite(void) { cs_create(pe, &cs); cs_init(cs); + tdpAssert(tdpGetDeviceCount(&ndevice)); + do_test_velocity(pe, cs, 1, LB_HALO_TARGET); do_test_velocity(pe, cs, 2, LB_HALO_TARGET); - do_test_velocity(pe, cs, 1, LB_HALO_OPENMP_FULL); - do_test_velocity(pe, cs, 1, LB_HALO_OPENMP_REDUCED); + if (ndevice == 0) { + do_test_velocity(pe, cs, 1, LB_HALO_OPENMP_FULL); + do_test_velocity(pe, cs, 1, LB_HALO_OPENMP_REDUCED); + } do_test_source_destination(pe, cs, 1, LB_HALO_TARGET); do_test_source_destination(pe, cs, 2, LB_HALO_TARGET); - do_test_source_destination(pe, cs, 1, LB_HALO_OPENMP_FULL); - do_test_source_destination(pe, cs, 1, LB_HALO_OPENMP_REDUCED); + if (ndevice == 0) { + do_test_source_destination(pe, cs, 1, LB_HALO_OPENMP_FULL); + do_test_source_destination(pe, cs, 1, LB_HALO_OPENMP_REDUCED); + } pe_info(pe, "PASS ./unit/test_prop\n"); cs_free(cs); From 13e2363809d434c92836621a8285ba29320b44dc Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 12:18:06 +0100 Subject: [PATCH 55/79] .. and don't assert tdpGetDeviceCount() --- src/fe_electro.c | 2 +- tests/unit/test_prop.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe_electro.c b/src/fe_electro.c index 72cdc67fa..4c4294fa3 100644 --- a/src/fe_electro.c +++ b/src/fe_electro.c @@ -156,7 +156,7 @@ __host__ int fe_electro_free(fe_electro_t * fe) { assert(fe); - tdpAssert(tdpGetDeviceCount(&ndevice)); + tdpGetDeviceCount(&ndevice); if (ndevice > 0) tdpAssert(tdpFree(fe->target)); if (fe->mu_ref) free(fe->mu_ref); diff --git a/tests/unit/test_prop.c b/tests/unit/test_prop.c index b4de41e76..4f52b48ab 100644 --- a/tests/unit/test_prop.c +++ b/tests/unit/test_prop.c @@ -46,7 +46,7 @@ int test_lb_prop_suite(void) { cs_create(pe, &cs); cs_init(cs); - tdpAssert(tdpGetDeviceCount(&ndevice)); + tdpGetDeviceCount(&ndevice); do_test_velocity(pe, cs, 1, LB_HALO_TARGET); do_test_velocity(pe, cs, 2, LB_HALO_TARGET); From 83aa613c9280ae335446a14a862ce893291b61ea Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Fri, 22 Jul 2022 12:33:01 +0100 Subject: [PATCH 56/79] Replace fopen() with util_fopen() --- tests/unit/test_colloid.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/unit/test_colloid.c b/tests/unit/test_colloid.c index cf84a1776..130620188 100644 --- a/tests/unit/test_colloid.c +++ b/tests/unit/test_colloid.c @@ -7,18 +7,19 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * + * (c) 2010-2022 The University of Edinburgh + * * Kevin Stratford (kevin@epcc.ed.ac.uk) - * (c) 2010-2021 The University of Edinburgh * *****************************************************************************/ #include #include -#include #include #include "mpi.h" #include "colloid.h" +#include "util_fopen.h" #include "tests.h" #define TOLERANCE 1.0e-14 @@ -96,7 +97,7 @@ void test_colloid_ascii_io(colloid_state_t * sref, const char * filename) { assert(sref); - fp = fopen(filename, "w"); + fp = util_fopen(filename, "w"); if (fp == NULL) { printf("fopen(%s) failed\n", filename); @@ -108,7 +109,7 @@ void test_colloid_ascii_io(colloid_state_t * sref, const char * filename) { } fp = NULL; - fp = fopen(filename, "r"); + fp = util_fopen(filename, "r"); if (fp == NULL) { printf("fopen(%s) failed\n", filename); @@ -138,7 +139,7 @@ void test_colloid_binary_io(colloid_state_t * sref, const char * filename) { assert(sref); - fp = fopen(filename, "w"); + fp = util_fopen(filename, "w"); if (fp == NULL) { printf("fopen(%s) failed\n", filename); } @@ -149,7 +150,7 @@ void test_colloid_binary_io(colloid_state_t * sref, const char * filename) { } fp = NULL; - fp = fopen(filename, "r"); + fp = util_fopen(filename, "r"); if (fp == NULL) { printf("fopen(%s) failed\n", filename); } From f6584a0ae749f587d6f8a3b4da27c71378070ca7 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 28 Jul 2022 12:15:13 +0100 Subject: [PATCH 57/79] Add various peer access routines --- target/target.h | 17 ++++++++ target/target_cuda.c | 37 +++++++++++++++++ target/target_cuda.h | 22 +++++++++-- target/target_hip.c | 38 ++++++++++++++++++ target/target_hip.h | 10 ++++- target/target_x86.c | 94 +++++++++++++++++++++++++++++++++++++++++++- target/target_x86.h | 10 ++++- 7 files changed, 221 insertions(+), 7 deletions(-) diff --git a/target/target.h b/target/target.h index 418c659cc..42e44fe61 100644 --- a/target/target.h +++ b/target/target.h @@ -35,6 +35,10 @@ /* Device management */ +__host__ tdpError_t tdpDeviceGetP2PAttribute(int * value, + tdpDeviceP2PAttr attr, + int srcDevice, + int dstDevice); __host__ tdpError_t tdpDeviceSetCacheConfig(tdpFuncCache cacheConfig); __host__ tdpError_t tdpGetDeviceProperties(struct tdpDeviceProp * prop, int); __host__ tdpError_t tdpSetDevice(int device); @@ -75,6 +79,11 @@ __host__ tdpError_t tdpMemcpy(void * dst, const void * src, size_t count, tdpMemcpyKind kind); __host__ tdpError_t tdpMemcpyAsync(void * dst, const void * src, size_t count, tdpMemcpyKind kind, tdpStream_t stream); +__host__ tdpError_t tdpMemcpyPeer(void * dst, int dstDevice, const void * src, + int srcDevice, size_t count); +__host__ tdpError_t tdpMemcpyPeerAsync(void * dst, int dstDevice, + const void * src, int srcDevice, + size_t count, tdpStream_t stream); __host__ tdpError_t tdpMemset(void * devPtr, int value, size_t count); @@ -96,6 +105,14 @@ __host__ tdpError_t tdpMemcpyToSymbol(void * symbol, const void * src, tdpMemcpyKind kind); #endif +/* Peer memory access */ + +__host__ tdpError_t tdpDeviceCanAccessPeer(int * canAccessPeer, int device, + int peerDevice); +__host__ tdpError_t tdpDeviceDisablePeerAccess(int peerDevice); +__host__ tdpError_t tdpDeviceEnablePeerAccess(int peerDevice, + unsigned int flags); + /* Additional API */ __host__ tdpError_t tdpThreadModelInfo(FILE * fp); diff --git a/target/target_cuda.c b/target/target_cuda.c index 9cd0a6f0e..a99cdbfef 100644 --- a/target/target_cuda.c +++ b/target/target_cuda.c @@ -235,6 +235,12 @@ __host__ __device__ tdpError_t tdpDeviceGetCacheConfig(tdpFuncCache * cache) { return cudaDeviceGetCacheConfig(cache); } +__host__ tdpError_t tdpDeviceGetP2PAttribute(int * value, + tdpDeviceP2PAttr attr, + int srcDevice, int dstDevice) { + return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice); +} + __host__ tdpError_t tdpDeviceSetCacheConfig(tdpFuncCache cacheConfig) { return cudaDeviceSetCacheConfig(cacheConfig); @@ -334,6 +340,20 @@ __host__ tdpError_t tdpMemcpyAsync(void * dst, const void * src, size_t count, return cudaMemcpyAsync(dst, src, count, kind, stream); } +__host__ tdpError_t tdpMemcpyPeer(void * dst, int dstDevice, const void * src, + int srcDevice, size_t count) { + + return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count); +} + +__host__ tdpError_t tdpMemcpyPeerAsync(void * dst, int dstDevice, + const void * src, int srcDevice, + size_t count, tdpStream_t stream) { + + return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream); +} + + __host__ __device__ tdpError_t tdpMalloc(void ** devptr, size_t size) { return cudaMalloc(devptr, size); @@ -354,3 +374,20 @@ __host__ tdpError_t tdpHostAlloc(void ** phost, size_t size, return cudaHostAlloc(phost, size, flags); } + +__host__ tdpError_t tdpDeviceCanAccessPeer(int * canAccessPeer, int device, + int peerDevice) { + + return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice); +} + +__host__ tdpError_t tdpDeviceDisablePeerAccess(int peerDevice) { + + return cudaDeviceDisablePeerAccess(peerDevice); +} + +__host__ tdpError_t tdpDeviceEnablePeerAccess(int peerDevice, + unsigned int flags) { + + return cudaDeviceEnablePeerAccess(peerDevice, flags); +} diff --git a/target/target_cuda.h b/target/target_cuda.h index 02297e855..d330f3eff 100644 --- a/target/target_cuda.h +++ b/target/target_cuda.h @@ -25,19 +25,33 @@ typedef cudaFuncCache tdpFuncCache; #define tdpFuncCachePreferL1 cudaFuncCachePreferL1 #define tdpFuncCahcePreferEqual cudaFuncCachePreferEqual -typedef cudaMemcpyKind tdpMemcpyKind; -typedef cudaDeviceAttr tdpDeviceAttr; +/* enums */ -#define tdpDeviceProp cudaDeviceProp +typedef cudaMemcpyKind tdpMemcpyKind; +typedef cudaDeviceAttr tdpDeviceAttr; +typedef cudaDeviceP2PAttr tdpDeviceP2PAttr; +/* defines */ + +#define tdpDeviceProp cudaDeviceProp #define tdpDevAttrManagedMemory cudaDevAttrManagedMemory +#define tdpSuccess cudaSuccess + +/* cudaMemcpyKind */ -#define tdpSuccess cudaSuccess #define tdpMemcpyHostToDevice cudaMemcpyHostToDevice #define tdpMemcpyDeviceToHost cudaMemcpyDeviceToHost #define tdpMemcpyHostToHost cudaMemcpyHostToHost #define tdpMemcpyDeviceToDevice cudaMemcpyDeviceToDevice +/* cudaDeviceP2PAttr */ +/* Note "tdpDevP@PAttrArray..." */ + +#define tdpDevP2PAttrPerformanceRank cudaDevP2PAttrPerformanceRank +#define tdpDevP2PAttrAccessSupported cudaDevP2PAttrAccessSupported +#define tdpDevP2PAttrNativeAtomicSupported cudaDevP2PAttrNativeAtomicSupported +#define tdpDevP2PAttrArrayAccessSupported cudaDevP2PAttrCudaArrayAccessSupported + #define tdpMemAttachHost cudaMemAttachHost #define tdpMemAttachGlobal cudaMemAttachGlobal diff --git a/target/target_hip.c b/target/target_hip.c index d2903a91c..85965261f 100644 --- a/target/target_hip.c +++ b/target/target_hip.c @@ -243,6 +243,12 @@ __host__ __device__ tdpError_t tdpDeviceGetCacheConfig(tdpFuncCache * cache) { #endif } +__host__ tdpError_t tdpDeviceGetP2PAttribute(int * value, + tdpDeviceP2PAttr attr, + int srcDevice, int dstDevice) { + return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice); +} + __host__ tdpError_t tdpDeviceSetCacheConfig(tdpFuncCache cacheConfig) { return hipDeviceSetCacheConfig(cacheConfig); @@ -377,6 +383,19 @@ __host__ tdpError_t tdpMemcpyAsync(void * dst, const void * src, size_t count, return hipMemcpyAsync(dst, src, count, kind, stream); } +__host__ tdpError_t tdpMemcpyPeer(void * dst, int dstDevice, const void * src, + int srcDevice, size_t count) { + + return hipMemcpyPeer(dst, dstDevice, src, srcDevice, count); +} + +__host__ tdpError_t tdpMemcpyPeerAsync(void * dst, int dstDevice, + const void * src, int srcDevice, + size_t count, tdpStream_t stream) { + + return hipMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream); +} + __host__ __device__ tdpError_t tdpMalloc(void ** devptr, size_t size) { #ifdef __HIP_DEVICE_COMPILE__ @@ -407,3 +426,22 @@ __host__ tdpError_t tdpHostAlloc(void ** phost, size_t size, return hipHostMalloc(phost, size, flags); } + +/* Peer device memory access */ + +__host__ tdpError_t tdpDeviceCanAccessPeer(int * canAccessPeer, int device, + int peerDevice) { + + return hipDeviceCanAccessPeer(canAccessPeer, device, peerDevice); +} + +__host__ tdpError_t tdpDeviceDisablePeerAccess(int peerDevice) { + + return hipDeviceDisablePeerAccess(peerDevice); +} + +__host__ tdpError_t tdpDeviceEnablePeerAccess(int peerDevice, + unsigned int flags) { + + return hipDeviceEnablePeerAccess(peerDevice, flags); +} diff --git a/target/target_hip.h b/target/target_hip.h index 0aef26f55..bb3e73c5a 100644 --- a/target/target_hip.h +++ b/target/target_hip.h @@ -5,7 +5,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2020 The University of Edinburgh + * (c) 2020-2022 The University of Edinburgh * * Contributing authors: * Nikola Vasilev did the original implementation in 2020. @@ -40,6 +40,14 @@ typedef hipDeviceAttribute_t tdpDeviceAttr; #define tdpMemcpyHostToHost hipMemcpyHostToHost #define tdpMemcpyDeviceToDevice hipMemcpyDeviceToDevice +/* P2P */ + +#define tdpDevP2PAttrPerformaceRank hipDevP2PAttrPerformanceRank +#define tdpDevP2PAttrAccessSupported hipDevP2PAttrAccessSupported +#define tdpDevP2PAttrNativeAtomicSupported hipDevP2PAttrNativeAtomicSupported +#define tdpDevP2PAttrArrayAccessSupported hipDevP2PAttrHipArrayAccessSupported + + #define tdpMemAttachHost hipMemAttachHost #define tdpMemAttachGlobal hipMemAttachGlobal diff --git a/target/target_x86.c b/target/target_x86.c index ffd84b3ed..eb52decab 100644 --- a/target/target_x86.c +++ b/target/target_x86.c @@ -7,7 +7,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2018 The University of Edinburgh + * (c) 2018-2022 The University of Edinburgh * * Contributing authors: * Alan Gray (Late of this parish) @@ -140,6 +140,18 @@ tdpError_t tdpDeviceGetCacheConfig(tdpFuncCache * cacheConfig) { return tdpSuccess; } +/***************************************************************************** + * + * tdpDeviceGetP2PAttribute + * + *****************************************************************************/ + +tdpError_t tdpDeviceGetP2PAttribute(int * value, tdpDeviceP2PAttr attr, + int srcDevice, int peerDevice) { + *value = 0; + + return tdpSuccess; +} /***************************************************************************** * @@ -260,6 +272,7 @@ tdpError_t tdpGetDeviceProperties(struct tdpDeviceProp * prop, int device) { prop->maxThreadsDim[0] = TARGET_MAX_THREADS_PER_BLOCK; prop->maxThreadsDim[1] = 1; prop->maxThreadsDim[2] = 1; + strncpy(prop->name, "host", 256); return tdpSuccess; } @@ -507,6 +520,47 @@ tdpError_t tdpMemcpyFromSymbol(void * dst, const void * symbol, return tdpSuccess; } +/***************************************************************************** + * + * tdpMemcpyPeer + * + *****************************************************************************/ + +__host__ tdpError_t tdpMemcpyPeer(void * dst, int dstDevice, const void * src, + int srcDevice, size_t count) { + + + error_return_if(dst == NULL, tdpErrorInvalidValue); + error_return_if(src == NULL, tdpErrorInvalidValue); + + /* Probably to be avoided. */ + + error_return(tdpErrorInvalidDevice); + + return tdpSuccess; +} + +/***************************************************************************** + * + * tdpMemcpyPeerAsync + * + *****************************************************************************/ + +__host__ tdpError_t tdpMemcpyPeerAsync(void * dst, int dstDevice, + const void * src, int srcDevice, + size_t count, tdpStream_t stream) { + + error_return_if(dst == NULL, tdpErrorInvalidValue); + error_return_if(src == NULL, tdpErrorInvalidValue); + + /* Probably to be avoided as well. */ + + error_return(tdpErrorInvalidDevice); + + return tdpSuccess; +} + + /***************************************************************************** * * tdpMemcpyToSymbol @@ -618,6 +672,44 @@ tdpError_t tdpMemcpyAsync(void * dst, const void * src, size_t count, return tdpMemcpy(dst, src, count, kind); } +/***************************************************************************** + * + * tdpDeviceCanAccessPeer + * + *****************************************************************************/ + +tdpError_t tdpDeviceCanAccessPeer(int * canAccessPeer, int device, + int peerDevice) { + + *canAccessPeer = 0; + + return tdpSuccess; +} + +/***************************************************************************** + * + * tdpDeviceDisablePeerAccess + * + *****************************************************************************/ + +tdpError_t tdpDeviceDisablePeerAccess(int peerDevice) { + + return tdpSuccess; +} + +/***************************************************************************** + * + * tdpDeviceEnablePeerAccess + * + *****************************************************************************/ + +tdpError_t tdpDeviceEnablePeerAccess(int peerDevice, unsigned int flags) { + + assert(flags == 0); + + return tdpSuccess; +} + static int int_max(int a, int b) {return (a > b) ?a :b;} static int int_min(int a, int b) {return (a < b) ?a :b;} diff --git a/target/target_x86.h b/target/target_x86.h index d3dedd342..2014f2bd3 100644 --- a/target/target_x86.h +++ b/target/target_x86.h @@ -5,7 +5,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2018-2021 The University of Edinburgh + * (c) 2018-2022 The University of Edinburgh * * Contributing authors: * Alan Gray (alang@epcc.ed.ac.uk) @@ -31,6 +31,13 @@ typedef enum tdpMemcpyKind_enum { tdpMemcpyDefault = 4} tdpMemcpyKind; +typedef enum tdpDeviceP2PAttr { + tdpDevP2PAttrPerformanceRank = 1, + tdpDevP2PAttrAccessSupported = 2, + tdpDevP2pAttrNativeAtomicSupported = 3, + tdpDevP2PAttrArrayAccessSupported = 4 +} tdpDeviceP2PAttr; + /* Device attributes (potentially a lot of them) */ typedef enum tdpDeviceAttr_enum { @@ -146,6 +153,7 @@ typedef int * tdpStream_t; /* an opaque handle */ struct tdpDeviceProp { int maxThreadsPerBlock; int maxThreadsDim[3]; + char name[256]; }; From a5c482c010649fef7d9954aca6c085de12ed3020 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 28 Jul 2022 12:16:02 +0100 Subject: [PATCH 58/79] Display name --- target/test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/test.c b/target/test.c index d61cdda59..d8bc351e4 100644 --- a/target/test.c +++ b/target/test.c @@ -41,6 +41,7 @@ __host__ int test0(void) { if (ifail != tdpSuccess) printf("FAIL!\n"); printf("Device id %d\n", mydevice); + printf("Device name %s\n", prop.name); printf("maxThreadsPerBlock %d\n", prop.maxThreadsPerBlock); printf("maxThreadsDim[0] %d\n", prop.maxThreadsDim[0]); printf("maxThreadsDim[1] %d\n", prop.maxThreadsDim[1]); From 0e0de711f9f87010c521815fd462dc5d5454702b Mon Sep 17 00:00:00 2001 From: "Kevin Stratford kevin@ed.ac.uk" Date: Thu, 28 Jul 2022 06:31:26 -0500 Subject: [PATCH 59/79] Add missing P2PAttr type --- target/target_hip.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/target_hip.h b/target/target_hip.h index bb3e73c5a..d4a276c52 100644 --- a/target/target_hip.h +++ b/target/target_hip.h @@ -25,8 +25,13 @@ typedef hipFuncCache_t tdpFuncCache; #define tdpFuncCachePreferL1 hipFuncCachePreferL1 #define tdpFuncCahcePreferEqual hipFuncCachePreferEqual -typedef hipMemcpyKind tdpMemcpyKind; -typedef hipDeviceAttribute_t tdpDeviceAttr; +/* enums */ + +typedef hipMemcpyKind tdpMemcpyKind; +typedef hipDeviceAttribute_t tdpDeviceAttr; +typedef hipDeviceP2PAttr tdpDeviceP2PAttr; + +/* defines */ #define tdpDeviceProp hipDeviceProp_t From 1949222a4278ba27c607bb1eba87767c2e929c9f Mon Sep 17 00:00:00 2001 From: "Kevin Stratford kevin@ed.ac.uk" Date: Thu, 28 Jul 2022 06:32:12 -0500 Subject: [PATCH 60/79] Replace stray cuda with hip --- target/target_hip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/target_hip.c b/target/target_hip.c index 85965261f..b1c1e9b1f 100644 --- a/target/target_hip.c +++ b/target/target_hip.c @@ -246,7 +246,7 @@ __host__ __device__ tdpError_t tdpDeviceGetCacheConfig(tdpFuncCache * cache) { __host__ tdpError_t tdpDeviceGetP2PAttribute(int * value, tdpDeviceP2PAttr attr, int srcDevice, int dstDevice) { - return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice); + return hipDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice); } __host__ tdpError_t tdpDeviceSetCacheConfig(tdpFuncCache cacheConfig) { From a959f981ddab2ef1cfb69ae320c8f5810fcf03cd Mon Sep 17 00:00:00 2001 From: Oliver Henrich Date: Thu, 11 Aug 2022 16:36:07 +0100 Subject: [PATCH 61/79] Updated bash command --- docs/tutorial/tutorial.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/tutorial.tex b/docs/tutorial/tutorial.tex index 5a6f0cf59..0d6878c73 100644 --- a/docs/tutorial/tutorial.tex +++ b/docs/tutorial/tutorial.tex @@ -288,7 +288,7 @@ \subsection{Test 2: Spinodal Decomposition of a Binary Fluid} raw data files and time steps (with appropriate start, increment and end in the \texttt{for} loop): \begin{lstlisting} #!/bin/bash -for i in `seq 1000 1000 10000`; +for i in $(seq 1000 1000 10000); do tstep=$(printf "%08d" $i) ./extract -k vel.001-001.meta vel-${tstep}.001-001 @@ -429,7 +429,7 @@ \subsection{Test 3: Colloids Dispersed in a Liquid Crystalline Fluid} \item Again, a bash script like this one below can be used for convenient post-processing of multiple raw data files and time steps (with appropriate start, increment and end in the \texttt{for} loop): \begin{lstlisting} #!/bin/bash -for i in `seq 1000 1000 10000`; +for i in $(seq 1000 1000 10000); do tstep=$(printf "%08d" $i) ./extract -k vel.001-001.meta vel-${tstep}.001-001 From ccaa73674e6ee0ef42baf68a8502d9f3eb67d72c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:37:09 +0100 Subject: [PATCH 62/79] Split electric field into external and time dependent term --- src/blue_phase.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/blue_phase.h b/src/blue_phase.h index cb4a38b6f..33c43e480 100644 --- a/src/blue_phase.h +++ b/src/blue_phase.h @@ -1,3 +1,4 @@ + /***************************************************************************** * * fe_lc.h @@ -65,7 +66,8 @@ struct fe_lc_param_s { double rredshift; /* Reciprocal redshift */ double epsilon; /* Dielectric anistropy */ double amplitude0; /* Initial amplitude from input */ - double e0coswt[3]; /* Electric field */ + double e0[3]; /* Electric field (external) */ + double coswt; /* Electtric field (phase) */ double w1_coll; /* Anchoring strength parameter */ double w2_coll; /* Second anchoring parameter */ @@ -147,9 +149,6 @@ int fe_lc_chirality(fe_lc_t * fe, double * chirality); __host__ __device__ int fe_lc_reduced_temperature(fe_lc_t * fe, double * tau); -__host__ __device__ -int fe_lc_dimensionless_field_strength(fe_lc_t * fe, double * edm); - __host__ __device__ void fe_lc_mol_field_v(fe_lc_t * fe, int index, double h[3][3][NSIMDVL]); @@ -184,6 +183,9 @@ int fe_lc_grad_stress(fe_lc_t * fe, int index, double sgrad[3][3]); /* Function of the parameters only */ +__host__ int fe_lc_dimensionless_field_strength(const fe_lc_param_t * param, + double * e0); + __host__ __device__ int fe_lc_amplitude_compute(fe_lc_param_t * param, double * a); From b6e6eb7cf36178e6bd20294af7de5bf982cacee6 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:37:28 +0100 Subject: [PATCH 63/79] Update external field terms --- src/blue_phase.c | 74 +++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/src/blue_phase.c b/src/blue_phase.c index 8a037d907..8d681541e 100644 --- a/src/blue_phase.c +++ b/src/blue_phase.c @@ -8,7 +8,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2011-2021 The University of Edinburgh + * (c) 2011-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -209,21 +209,17 @@ __host__ int fe_lc_target(fe_lc_t * fe, fe_t ** target) { __host__ int fe_lc_param_commit(fe_lc_t * fe) { - int ia; double e0_freq, t; - double e0[3]; physics_t * phys = NULL; PI_DOUBLE(pi); assert(fe); physics_ref(&phys); - physics_e0(phys, e0); physics_e0_frequency(phys, &e0_freq); physics_control_time(phys, &t); - for (ia = 0; ia < 3; ia++) { - fe->param->e0coswt[ia] = cos(2.0*pi*e0_freq*t)*e0[ia]; - } + + fe->param->coswt = cos(2.0*pi*e0_freq*t); tdpMemcpyToSymbol(tdpSymbol(const_param), fe->param, sizeof(fe_lc_param_t), 0, tdpMemcpyHostToDevice); @@ -388,8 +384,10 @@ __host__ __device__ int fe_lc_compute_fed(fe_lc_t * fe, double gamma, efield = 0.0; for (ia = 0; ia < 3; ia++) { + double ea = fe->param->e0[ia]*fe->param->coswt; for (ib = 0; ib < 3; ib++) { - efield += fe->param->e0coswt[ia]*q[ia][ib]*fe->param->e0coswt[ib]; + double eb = fe->param->e0[ib]*fe->param->coswt; + efield += ea*q[ia][ib]*eb; } } @@ -1094,13 +1092,15 @@ int fe_lc_compute_h(fe_lc_t * fe, double gamma, double q[3][3], e2 = 0.0; for (ia = 0; ia < 3; ia++) { - e2 += fe->param->e0coswt[ia]*fe->param->e0coswt[ia]; + double ea = fe->param->e0[ia]*fe->param->coswt; + e2 += ea*ea; } for (ia = 0; ia < 3; ia++) { + double ea = fe->param->e0[ia]*fe->param->coswt; for (ib = 0; ib < 3; ib++) { - h[ia][ib] += fe->param->epsilon - *(fe->param->e0coswt[ia]*fe->param->e0coswt[ib] - r3*d[ia][ib]*e2); + double eb = fe->param->e0[ib]*fe->param->coswt; + h[ia][ib] += fe->param->epsilon*(ea*eb - r3*d[ia][ib]*e2); } } @@ -1294,42 +1294,36 @@ int fe_lc_reduced_temperature(fe_lc_t * fe, double * tau) { /***************************************************************************** * - * fe_lc_dimensionless_field_strength + * fe_lc_dimensonless_field_strength + * + * Return the dimensionless (or reduced) field strength which is + * ered^2 = (27 epsilon / 32 pi A_O gamma) E_a E_a * - * Return the dimensionless field strength which is - * e^2 = (27 epsilon / 32 pi A_O gamma) E_a E_a + * The external field is e0[3] in lattice units. No phase. * *****************************************************************************/ -__host__ __device__ -int fe_lc_dimensionless_field_strength(fe_lc_t * fe, double * ered) { +__host__ int fe_lc_dimensionless_field_strength(const fe_lc_param_t * param, + double * ered) { - int ia; - double a0; - double gamma; - double epsilon; - double fieldsq; - double e0[3]; - physics_t * phys = NULL; + double fieldsq = 0.0; PI_DOUBLE(pi); - assert(fe); - - physics_ref(&phys); - physics_e0(phys, e0); + assert(param); - fieldsq = 0.0; - for (ia = 0; ia < 3; ia++) { - fieldsq += e0[ia]*e0[ia]; + for (int ia = 0; ia < 3; ia++) { + fieldsq += param->e0[ia]*param->e0[ia]; } /* Remember epsilon is stored with factor (1/12pi) */ - a0 = fe->param->a0; - gamma = fe->param->gamma; - epsilon = 12.0*pi*fe->param->epsilon; + { + double a0 = param->a0; + double gamma = param->gamma; + double epsilon = 12.0*pi*param->epsilon; - *ered = sqrt(27.0*epsilon*fieldsq/(32.0*pi*a0*gamma)); + *ered = sqrt(27.0*epsilon*fieldsq/(32.0*pi*a0*gamma)); + } return 0; } @@ -2059,9 +2053,11 @@ void fe_lc_compute_fed_v(fe_lc_t * fe, for_simd_v(iv, NSIMDVL) efield[iv] = 0.0; for (ia = 0; ia < 3; ia++) { + double ea = fe->param->e0[ia]*fe->param->coswt; for (ib = 0; ib < 3; ib++) { + double eb = fe->param->e0[ib]*fe->param->coswt; for_simd_v(iv, NSIMDVL) { - efield[iv] += fe->param->e0coswt[ia]*q[ia][ib][iv]*fe->param->e0coswt[ib]; + efield[iv] += ea*q[ia][ib][iv]*eb; } } } @@ -2252,16 +2248,18 @@ void fe_lc_compute_h_v(fe_lc_t * fe, for_simd_v(iv, NSIMDVL) e2[iv] = 0.0; for (ia = 0; ia < 3; ia++) { + double ea = fe->param->e0[ia]*fe->param->coswt; for_simd_v(iv, NSIMDVL) { - e2[iv] += fe->param->e0coswt[ia]*fe->param->e0coswt[ia]; + e2[iv] += ea*ea; } } for (ia = 0; ia < 3; ia++) { + double ea = fe->param->e0[ia]*fe->param->coswt; for (ib = 0; ib < 3; ib++) { + double eb = fe->param->e0[ib]*fe->param->coswt; for_simd_v(iv, NSIMDVL) { - h[ia][ib][iv] += fe->param->epsilon* - (fe->param->e0coswt[ia]*fe->param->e0coswt[ib] - r3*d[ia][ib]*e2[iv]); + h[ia][ib][iv] += fe->param->epsilon*(ea*eb - r3*d[ia][ib]*e2[iv]); } } } From aed01b506e3e8b7bd9ea14b191866c7cc46a3c2c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:37:52 +0100 Subject: [PATCH 64/79] Correct dimensionless field value report --- src/blue_phase_rt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blue_phase_rt.c b/src/blue_phase_rt.c index 59f33224f..e5c4c5c69 100644 --- a/src/blue_phase_rt.c +++ b/src/blue_phase_rt.c @@ -176,11 +176,11 @@ __host__ int blue_phase_init_rt(pe_t * pe, rt_t *rt, rt_double_parameter(rt, "lc_dielectric_anisotropy", &epsilon); fe_param.epsilon = epsilon; - n = rt_double_parameter_vector(rt, "electric_e0", fe_param.e0coswt); + n = rt_double_parameter_vector(rt, "electric_e0", fe_param.e0); if (n == 1) { - double ered; - fe_lc_dimensionless_field_strength(fe, &ered); + double ered = 0.0; + fe_lc_dimensionless_field_strength(&fe_param, &ered); pe_info(pe, "Dielectric anisotropy = %14.7e\n", epsilon); pe_info(pe, "Dimensionless field e = %14.7e\n", ered); } From 257b5edb42a5a212f3dab16d17ac5c5ddb9a36a5 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:38:19 +0100 Subject: [PATCH 65/79] Separate dimensionless field tests --- tests/unit/test_blue_phase.c | 85 ++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/tests/unit/test_blue_phase.c b/tests/unit/test_blue_phase.c index 3fc20d8ba..5dc2fd084 100644 --- a/tests/unit/test_blue_phase.c +++ b/tests/unit/test_blue_phase.c @@ -40,6 +40,7 @@ static int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, field_t * fq, field_grad_t * fqgrad); static int test_bp_nonfield(void); +int test_fe_lc_dimensionless_field_strength(pe_t * pe); __host__ int do_test_fe_lc_device1(pe_t * pe, cs_t * cs, fe_lc_t * fe); @@ -69,6 +70,7 @@ int test_bp_suite(void) { lees_edw_create(pe, cs, NULL, &le); test_bp_nonfield(); + test_fe_lc_dimensionless_field_strength(pe); { field_options_t opts = field_options_ndata_nhalo(NQAB, nhalo); @@ -193,11 +195,9 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, double h[3][3]; double field[3]; double value, vtest; - double e; double ltot[3]; fe_lc_param_t param = {0}; physics_t * phys = NULL; - PI_DOUBLE(pi_); assert(pe); assert(le); @@ -788,46 +788,14 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, /* Electric field test */ - /* Default electric field should be zero */ - - field[X] = 0.0; - field[Y] = 0.0; - field[Z] = 1.0; - - physics_e0_set(phys, field); - fe_lc_param_commit(fe); - - - e = sqrt(27.0*epsilon*1.0/(32.0*pi_*a0*gamma)); - - /* Electric field (0.0, 0.0, 1.0) gives dimensionless field */ - fe_lc_dimensionless_field_strength(fe, &value); - test_assert(fabs(value - e) < TEST_FLOAT_TOLERANCE); - - field[X] = 1.0; - field[Y] = 1.0; - field[Z] = 1.0; - - physics_e0_set(phys, field); - - e = sqrt(27.0*epsilon*3.0/(32.0*pi_*a0*gamma)); - - fe_lc_dimensionless_field_strength(fe, &value); - /* Electric field (1.0, 1.0, 1.0) gives dimensionless field ... */ - test_assert(fabs(value - e) < TEST_FLOAT_TOLERANCE); - /* Set dimensionless field to 0.2 for these parameters */ field[X] = 0.012820969/sqrt(3.0); field[Y] = field[X]; field[Z] = field[X]; - physics_e0_set(phys, field); - - fe_lc_dimensionless_field_strength(fe, &value); fe_lc_param_commit(fe); - test_assert(fabs(value - 0.2) < TEST_FLOAT_TOLERANCE); /* Note the electric field remains switched on so... */ @@ -859,6 +827,7 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, fe_lc_compute_fed(fe, gamma, q, dq, &value); test_assert(fabs(value - 6.7087074e-04) < TEST_FLOAT_TOLERANCE); + /* Dimensionless field 0.2 */ field[X] = 0.012820969; field[Y] = 0.0; field[Z] = 0.0; @@ -866,10 +835,6 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, physics_e0_set(phys, field); fe_lc_param_commit(fe); - fe_lc_dimensionless_field_strength(fe, &value); - test_assert(fabs(value - 0.2) < TEST_FLOAT_TOLERANCE); - - /* Note the electric field now changed so... */ ic = 1; @@ -1025,3 +990,47 @@ __global__ void do_test_fe_lc_kernel1(fe_lc_t * fe, fe_lc_param_t ref) { return; } + +/***************************************************************************** + * + * test_fe_lc_dimensionless_field_strength + * + * Function of only the dielectric anistropy epsilon, gamma, A0, and the + * external field. + * + *****************************************************************************/ + +int test_fe_lc_dimensionless_field_strength(pe_t * pe) { + + int ifail = 0; + PI_DOUBLE(pi); + + assert(pe); + + { + /* Default must be zero */ + fe_lc_param_t param = {.a0 = 1.0, .gamma = 3.0}; + double ered = -1.0; + fe_lc_dimensionless_field_strength(¶m, &ered); + assert(fabs(ered - 0.0) < DBL_EPSILON); + if (fabs(ered - 0.0) < DBL_EPSILON) ifail += 1; + } + + { + /* epsilon = 1 in reduced units should give reference value eref */ + double e[3] = {1.0, 1.0, 1.0}; + double a0 = 1.0; + double gamma = 2.7; + double epsilon = 1.0/(12.0*pi); + double eref = sqrt(27.0*3.0/(32.0*pi*a0*gamma)); + + fe_lc_param_t param = {.a0 = a0, .gamma = gamma, .epsilon = epsilon, + .e0 = {e[X], e[Y], e[Z]}}; + double ered = -1.0; + fe_lc_dimensionless_field_strength(¶m, &ered); + assert(fabs(ered - eref) < DBL_EPSILON); + if (fabs(ered - eref) < DBL_EPSILON) ifail += 1; + } + + return ifail; +} From c60bf5d2d25b0db8ae2aeec6741dece2d9fc4512 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:40:15 +0100 Subject: [PATCH 66/79] Note dimensionless field fix --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c9642a948..085fe2488 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ ### Changes +version 0.18.0 + +- Bug fix (issue #197). The liquid crystal reduced field strength was reported + incorrectly in the output (always zero). Thanks to Oliver H. for spotting. + version 0.17.0 - add liquid crystal anchoring "fd_gradient_calculation s7_anchoring" From 8ae236636d69e7fbc769f210d957e55d4820db4a Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 12:40:38 +0100 Subject: [PATCH 67/79] Add test for dimensionless field --- .../d3q19-short/serial-chol-fld.inp | 98 ++++++++++ .../d3q19-short/serial-chol-fld.log | 167 ++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 tests/regression/d3q19-short/serial-chol-fld.inp create mode 100644 tests/regression/d3q19-short/serial-chol-fld.log diff --git a/tests/regression/d3q19-short/serial-chol-fld.inp b/tests/regression/d3q19-short/serial-chol-fld.inp new file mode 100644 index 000000000..d9f786111 --- /dev/null +++ b/tests/regression/d3q19-short/serial-chol-fld.inp @@ -0,0 +1,98 @@ +############################################################################## +# +# serial-chol-fld.inp +# +# Liquid crystal example with external field and di-electric +# anisotropy. +# +############################################################################## + +N_cycles 10 + +size 16_16_16 +periodicity 1_1_1 + +distribution_initialisation 3d_uniform_u +distribution_uniform_u 0.0_0.0_0.0 + +############################################################################## +# +# Fluid parameters +# +############################################################################## + +viscosity 0.135 +viscosity_bulk 0.135 + +isothermal_fluctuations off + +############################################################################## +# +# Free energy parameters +# +############################################################################### + +free_energy lc_blue_phase + +fd_advection_scheme_order 2 +fd_gradient_calculation 3d_7pt_fluid + +############################################################################### +# +# Blue Phase free energy +# +############################################################################### + +lc_a0 0.084334998544 +lc_gamma 3.085714285714 +lc_q0 0.0 +lc_kappa0 0.01 +lc_kappa1 0.01 +lc_xi 0.7 + +lc_Gamma 0.3 +lc_active_zeta 0.0 + +lc_q_init_amplitude 0.2 +lc_q_initialisation nematic +lc_init_redshift 1.0 +lc_redshift_update 0 +lc_init_nematic 1.0_1.0_0.0 + +lc_dielectric_anisotropy 41.4 +electric_e0 0.01_0.0_0.0 + +############################################################################### +# +# Colloid parameters +# +############################################################################### + +colloid_init none + +############################################################################### +# +# Walls / boundaries +# +############################################################################### + +boundary_walls 0_0_0 + +############################################################################### +# +# Output frequency and type +# +############################################################################### + +freq_statistics 10 +config_at_end no + +############################################################################### +# +# Miscellaneous +# +# random_seed +ve integer is the random number generator seed +# +############################################################################### + +random_seed 8361435 diff --git a/tests/regression/d3q19-short/serial-chol-fld.log b/tests/regression/d3q19-short/serial-chol-fld.log new file mode 100644 index 000000000..46ffcf1a1 --- /dev/null +++ b/tests/regression/d3q19-short/serial-chol-fld.log @@ -0,0 +1,167 @@ +Welcome to Ludwig v0.17.0 (Serial version running on 1 process) +Start time: Mon Aug 15 11:52:27 2022 + +Compiler: + name: Gnu 11.2.0 + version-string: 11.2.0 + +Note assertions via standard C assert() are on. + +Target thread model: OpenMP. +OpenMP threads: 1; maximum number of threads: 8. + +Read 31 user parameters from serial-chol-fld.inp + +System details +-------------- +System size: 16 16 16 +Decomposition: 1 1 1 +Local domain: 16 16 16 +Periodic: 1 1 1 +Halo nhalo: 2 +Reorder: true +Initialised: 1 + +Free energy details +------------------- + +Blue phase free energy selected. + +Liquid crystal blue phase free energy +Bulk parameter A0: = 8.4334999e-02 +Magnitude of order gamma = 3.0857143e+00 +Pitch wavevector q0 = 0.0000000e+00 +... gives pitch length = inf +Elastic constant kappa0 = 1.0000000e-02 +Elastic constant kappa1 = 1.0000000e-02 +Amplitude (uniaxial) order = 2.0000000e-01 +Effective aspect ratio xi = 7.0000000e-01 +Chirality = 0.0000000e+00 +Reduced temperature = -2.5000000e-01 +Initial redshift = 1.0000000e+00 +Dynamic redshift update = no +Liquid crystal activity No +Dielectric anisotropy = 4.1400000e+01 +Dimensionless field e = 4.0134320e-01 + +Using Beris-Edwards solver: +Rotational diffusion const = 3.0000000e-01 +LC fluctuations: = off + +System properties +---------------- +Mean fluid density: 1.00000e+00 +Shear viscosity 1.35000e-01 +Bulk viscosity 1.35000e-01 +Temperature 0.00000e+00 +External body force density 0.00000e+00 0.00000e+00 0.00000e+00 +External E-field amplitude 1.00000e-02 0.00000e+00 0.00000e+00 +External E-field frequency 0.00000e+00 +External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 + +Lattice Boltzmann distributions +------------------------------- +Model: d3q19 +SIMD vector len: 1 +Number of sets: 1 +Halo type: lb_halo_target (full halo) +Input format: binary +Output format: binary +I/O grid: 1 1 1 + +Lattice Boltzmann collision +--------------------------- +Relaxation time scheme: M10 +Hydrodynamic modes: on +Ghost modes: on +Isothermal fluctuations: off +Shear relaxation time: 9.05000e-01 +Bulk relaxation time: 9.05000e-01 +Ghost relaxation time: 1.00000e+00 +[User ] Random number seed: 8361435 + +Hydrodynamics +------------- +Hydrodynamics: on + +Order parameter I/O +------------------- +Order parameter I/O format: +I/O decomposition: 1 1 1 + +Advection scheme order: 2 + +Initial distribution: 3d uniform desnity/velocity +Density: 1.0000000e+00 +Velocity: 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Gradient calculation: 3d_7pt_fluid + + +Initialising Q_ab to nematic +Director: 1.0000000e+00 1.0000000e+00 0.0000000e+00 +Initial conditions. + +Scalars - total mean variance min max +[rho] 4096.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 +[phi] 2.0480000e+02 5.0000000e-02-2.7495367e-16 5.0000000e-02 5.0000000e-02 +[phi] 6.1440000e+02 1.5000000e-01 2.0781987e-15 1.5000000e-01 1.5000000e-01 +[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[phi] 2.0480000e+02 5.0000000e-02-2.7495367e-16 5.0000000e-02 5.0000000e-02 +[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Momentum - x y z +[total ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[fluid ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Starting time step loop. + +Scalars - total mean variance min max +[rho] 4096.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 +[phi] 2.1364907e+02 5.2160417e-02-4.9136042e-16 5.2160417e-02 5.2160417e-02 +[phi] 6.3827142e+02 1.5582798e-01 1.5092094e-15 1.5582798e-01 1.5582798e-01 +[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[phi] 2.1227628e+02 5.1825263e-02 5.0090140e-16 5.1825263e-02 5.1825263e-02 +[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Free energies - timestep f v f/v f_bulk/v f_grad/v redshift +[fe] 10 -1.6165785011e+00 4.0960000000e+03 -3.9467248563e-04 -3.8894438981e-04 0.0000000000e+00 1.0000000000e+00 + +Momentum - x y z +[total ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[fluid ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Velocity - x y z +[minimum ] 0.0000000e+00 -6.9388939e-18 0.0000000e+00 +[maximum ] 1.1754944e-38 1.1754944e-38 1.1754944e-38 + +Completed cycle 10 + +Timer resolution: 1e-06 second + +Timer statistics + Section: tmin tmax total + Total: 0.235 0.235 0.235 0.235152 (1 call) + Time step loop: 0.021 0.024 0.220 0.022019 (10 calls) + Propagation: 0.001 0.002 0.015 0.001504 (10 calls) + Propagtn (krnl) : 0.001 0.002 0.015 0.001501 (10 calls) + Collision: 0.003 0.004 0.035 0.003547 (10 calls) + Collision (krnl) : 0.003 0.004 0.035 0.003541 (10 calls) + Lattice halos: 0.001 0.001 0.007 0.000740 (10 calls) + phi gradients: 0.002 0.003 0.025 0.002537 (10 calls) + phi grad (krnl) : 0.002 0.003 0.022 0.002201 (10 calls) + phi halos: 0.000 0.000 0.003 0.000334 (10 calls) + BBL: 0.000 0.000 0.000 0.000001 (10 calls) + Force calculation: 0.006 0.007 0.063 0.006302 (10 calls) + Phi force (krnl) : 0.002 0.003 0.027 0.002666 (10 calls) + phi update: 0.007 0.009 0.072 0.007215 (10 calls) + Velocity Halo : 0.000 0.000 0.001 0.000142 (10 calls) +BE mol field (krnl) : 0.001 0.002 0.014 0.001445 (10 calls) +BP BE update (krnl) : 0.003 0.003 0.027 0.002708 (10 calls) + Advectn (krnl) : 0.002 0.003 0.023 0.002304 (10 calls) + Advectn BCS (krnl) : 0.000 0.001 0.005 0.000483 (10 calls) + Free1: 0.000 0.005 0.006 0.000550 (10 calls) +Warning: key/value present in input but not used: +(Line 54): lc_active_zeta +End time: Mon Aug 15 11:52:27 2022 +Ludwig finished normally. From 4ee992828af3e9c20b40d1df535b6e11bf937649 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 15 Aug 2022 13:04:23 +0100 Subject: [PATCH 68/79] Spelling correction --- src/blue_phase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blue_phase.h b/src/blue_phase.h index 33c43e480..6400434ff 100644 --- a/src/blue_phase.h +++ b/src/blue_phase.h @@ -67,7 +67,7 @@ struct fe_lc_param_s { double epsilon; /* Dielectric anistropy */ double amplitude0; /* Initial amplitude from input */ double e0[3]; /* Electric field (external) */ - double coswt; /* Electtric field (phase) */ + double coswt; /* Electric field (phase) */ double w1_coll; /* Anchoring strength parameter */ double w2_coll; /* Second anchoring parameter */ From 6faabc461dcd5cffd7e6293885d151339fa2cf31 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Thu, 18 Aug 2022 16:37:51 +0100 Subject: [PATCH 69/79] Patch 0.17.1 --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 085fe2488..d62ea4423 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ ### Changes -version 0.18.0 +version 0.17.1 - Bug fix (issue #197). The liquid crystal reduced field strength was reported incorrectly in the output (always zero). Thanks to Oliver H. for spotting. From 31008bff3b47eaadc52360356cda7deba05b0cea Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 22 Aug 2022 16:47:23 +0100 Subject: [PATCH 70/79] Fix duff assertion --- util/extract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/extract.c b/util/extract.c index 080cd6473..bde76c8f5 100644 --- a/util/extract.c +++ b/util/extract.c @@ -228,7 +228,7 @@ int extract_driver(const char * filename, metadata_v1_t * meta, int version) { FILE * fp_data; ntime = read_data_file_name(filename); - assert(ntime <= 0 && ntime < 1000*1000*1000); + assert(0 <= ntime && ntime < 1000*1000*1000); /* Work out parallel local file size */ From eb48694f4bf1d71923a553c5a72cb5f3b6a240ad Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 14:04:17 +0100 Subject: [PATCH 71/79] Update electric field tests --- tests/unit/test_blue_phase.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_blue_phase.c b/tests/unit/test_blue_phase.c index 5dc2fd084..716b47392 100644 --- a/tests/unit/test_blue_phase.c +++ b/tests/unit/test_blue_phase.c @@ -794,8 +794,9 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, field[Y] = field[X]; field[Z] = field[X]; - physics_e0_set(phys, field); - fe_lc_param_commit(fe); + fe->param->e0[X] = field[X]; + fe->param->e0[Y] = field[Y]; + fe->param->e0[Z] = field[Z]; /* Note the electric field remains switched on so... */ @@ -832,8 +833,9 @@ int test_o8m_struct(pe_t * pe, cs_t * cs, lees_edw_t * le, fe_lc_t * fe, field[Y] = 0.0; field[Z] = 0.0; - physics_e0_set(phys, field); - fe_lc_param_commit(fe); + fe->param->e0[X] = field[X]; + fe->param->e0[Y] = field[Y]; + fe->param->e0[Z] = field[Z]; /* Note the electric field now changed so... */ From 328a5b8dfe2f1d391bc597a7931db734d2a0980c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 14:06:50 +0100 Subject: [PATCH 72/79] Add issing test on halo width --- src/colloids_rt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/colloids_rt.c b/src/colloids_rt.c index 6127cac33..005e8ede0 100644 --- a/src/colloids_rt.c +++ b/src/colloids_rt.c @@ -640,7 +640,8 @@ int colloids_rt_cell_list_checks(pe_t * pe, cs_t * cs, interact_rcmax(interact, &rcmax); interact_hcmax(interact, &hcmax); rmax = dmax(2.0*ahmax + hcmax, rcmax); - rmax = dmax(rmax, 1.5); /* subgrid particles again */ + rmax = dmax(rmax, 1.5); /* subgrid particles again */ + rmax = dmax(rmax, a0max + nhalo - 0.5); /* halo, as above */ nbest[X] = (int) floor(1.0*nlocal[X] / rmax); nbest[Y] = (int) floor(1.0*nlocal[Y] / rmax); nbest[Z] = (int) floor(1.0*nlocal[Z] / rmax); From 0062723b0cbc3c8b2c6fcb1398e9b50c4a5b8d2b Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 14:07:39 +0100 Subject: [PATCH 73/79] Prevent failures at proximity --- src/gradient_s7_anchoring.c | 44 ++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/gradient_s7_anchoring.c b/src/gradient_s7_anchoring.c index d9c9b185f..6a759818e 100644 --- a/src/gradient_s7_anchoring.c +++ b/src/gradient_s7_anchoring.c @@ -421,15 +421,22 @@ void grad_s7_kernel(kernel_ctxt_t * ktx, cs_t * cs, grad_s7_anch_t * anch, /* Combine the outward normals to produce a unique outward * normal at the edge */ + /* Cases to trap: status[0] != status[1] (e.g., one wall, one + * colloid). Default to MAP_BOUNDARY, then check have same + * status. */ + int bcse[3] = {0, 0, 0}; int nn0 = normal[0]; int nn1 = normal[1]; + int mystatus = MAP_BOUNDARY; + bcse[X] = bcs[nn0][X] + bcs[nn1][X]; bcse[Y] = bcs[nn0][Y] + bcs[nn1][Y]; bcse[Z] = bcs[nn0][Z] + bcs[nn1][Z]; - grad_s7_boundary_c(fe->param, anch, ic, jc, kc, status[normal[1]], qs, - bcse, c); + if (status[nn0] == status[nn1]) mystatus = status[nn0]; + + grad_s7_boundary_c(fe->param, anch, ic, jc, kc, mystatus, qs, bcse, c); /* Overwrite the existing values, and add new ones, which are * the same. */ @@ -460,13 +467,17 @@ void grad_s7_kernel(kernel_ctxt_t * ktx, cs_t * cs, grad_s7_anch_t * anch, int nn0 = normal[0]; int nn1 = normal[1]; int nn2 = normal[2]; + int mystatus = MAP_BOUNDARY; bcse[X] = bcs[nn0][X] + bcs[nn1][X] + bcs[nn2][X]; bcse[Y] = bcs[nn0][Y] + bcs[nn1][Y] + bcs[nn2][Y]; bcse[Z] = bcs[nn0][Z] + bcs[nn1][Z] + bcs[nn2][Z]; - grad_s7_boundary_c(fe->param, anch, ic, jc, kc, status[normal[2]], qs, - bcse, c); + if (status[nn0] == status[nn1] && status[nn0] == status[nn2]) { + mystatus = status[nn0]; + } + + grad_s7_boundary_c(fe->param, anch, ic, jc, kc, mystatus, qs, bcse, c); b18[0*NSYMM + XX] = -1.0*c[X][X]; b18[0*NSYMM + XY] = -2.0*c[X][Y]; @@ -1042,13 +1053,26 @@ __host__ __device__ int grad_s7_boundary_c(fe_lc_param_t * param, { int index = cs_index(anch->cs, ic - di[X], jc - di[Y], kc - di[Z]); colloid_t * pc = anch->cinfo->map_new[index]; - assert(pc); - dr[X] = 1.0*(noffset[X] + ic) - pc->s.r[X]; - dr[Y] = 1.0*(noffset[Y] + jc) - pc->s.r[Y]; - dr[Z] = 1.0*(noffset[Z] + kc) - pc->s.r[Z]; - } - grad_s7_boundary_coll(param, qs, dr, c); + if (pc) { + dr[X] = 1.0*(noffset[X] + ic) - pc->s.r[X]; + dr[Y] = 1.0*(noffset[Y] + jc) - pc->s.r[Y]; + dr[Z] = 1.0*(noffset[Z] + kc) - pc->s.r[Z]; + grad_s7_boundary_coll(param, qs, dr, c); + } + else { + /* There is a case to trap here, where a diagonal di[] crosses + * the gap between two different colloids. This will give a + * fluid site. It's not clear there is any 'correct' answer + * to what to do in this case as there is no unique surface normal. + * So set c = 0. */ + for (int ia = 0; ia < 3; ia++) { + for (int ib = 0; ib < 3; ib++) { + c[ia][ib] = 0.0; + } + } + } + } } else { /* Should not be here. */ From af33d9d5b95c7b3c720e94af26c12f18fd136fff Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 14:08:19 +0100 Subject: [PATCH 74/79] Fix for s7_anchoring --- CHANGES.md | 6 ++++++ version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d62ea4423..aefc5233b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,12 @@ ### Changes +version 0.17.2 + +- Bug fix (issue #204) prevent crashes with s7_anchoring related to + proximity of wall/colloid or colloid/colloid. Advice added to + documentation on avoiding such close approaches. + version 0.17.1 - Bug fix (issue #197). The liquid crystal reduced field strength was reported diff --git a/version.h b/version.h index 3b65a8fe5..96eb25d30 100644 --- a/version.h +++ b/version.h @@ -14,6 +14,6 @@ #define LUDWIG_MAJOR_VERSION 0 #define LUDWIG_MINOR_VERSION 17 -#define LUDWIG_PATCH_VERSION 0 +#define LUDWIG_PATCH_VERSION 2 #endif From 05c464cb2ee3c74b5e2547cee5533f791c411b2c Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 17:55:38 +0100 Subject: [PATCH 75/79] Add wall colloid lubrication offset --- src/wall.c | 68 ++++++++++++++++++++++++++++++++++++--------------- src/wall.h | 6 ++++- src/wall_rt.c | 6 ++++- 3 files changed, 58 insertions(+), 22 deletions(-) diff --git a/src/wall.c b/src/wall.c index 39ed3c8dd..b2b986bd1 100644 --- a/src/wall.c +++ b/src/wall.c @@ -9,7 +9,7 @@ * Edinburgh Soft Matter and Statistical Physics and * Edinburgh Parallel Computing Centre * - * (c) 2011-2021 The University of Edinburgh + * (c) 2011-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -221,6 +221,11 @@ __host__ int wall_info(wall_t * wall) { wall->param->utop[X]); pe_info(pe, "Boundary normal lubrication rc: %14.7e\n", wall->param->lubr_rc[X]); + /* Print only if non-zero for backwards compatibility in tests ...*/ + if (wall->param->lubr_dh[X] > 0.0) { + pe_info(pe, "Boundary normal lubrication dh: %14.7e\n", + wall->param->lubr_dh[X]); + } pe_info(pe, "Wall boundary links allocated: %d\n", nlink); pe_info(pe, "Memory (total, bytes): %zu\n", 4*nlink*sizeof(int)); @@ -1496,7 +1501,9 @@ __host__ int wall_shear_init(wall_t * wall) { * This operates in parallel by computing the absolute distance between * the side of the system (walls nominally at Lmin and (Lmax + Lmin)), * and applying the cutoff. - * + * + * An offset lubr_dh is available at each end [defaults to zero]. + * * Normal force is added to the diagonal of drag matrix \zeta^FU_xx etc * (No tangential force would be added to \zeta^FU_xx and \zeta^FU_yy) * @@ -1505,13 +1512,10 @@ __host__ int wall_shear_init(wall_t * wall) { __host__ int wall_lubr_sphere(wall_t * wall, double ah, const double r[3], double drag[3]) { - double hlub; - double h; double eta; double lmin[3]; double ltot[3]; physics_t * phys = NULL; - PI_DOUBLE(pi); drag[X] = 0.0; drag[Y] = 0.0; @@ -1528,28 +1532,52 @@ __host__ int wall_lubr_sphere(wall_t * wall, double ah, const double r[3], /* Lower, then upper wall X, Y, and Z */ if (wall->param->isboundary[X]) { - hlub = wall->param->lubr_rc[X]; - h = r[X] - lmin[X] - ah; - if (h < hlub) drag[X] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); - h = lmin[X] + ltot[X] - r[X] - ah; - if (h < hlub) drag[X] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); + double dh = wall->param->lubr_dh[X]; + double hlub = wall->param->lubr_rc[X]; + double hb = r[X] - (lmin[X] + dh) - ah; + double ht = lmin[X] + (ltot[X] - dh) - r[X] - ah; + drag[X] += wall_lubr_drag(eta, ah, hb, hlub); + drag[X] += wall_lubr_drag(eta, ah, ht, hlub); } if (wall->param->isboundary[Y]) { - hlub = wall->param->lubr_rc[Y]; - h = r[Y] - lmin[Y] - ah; - if (h < hlub) drag[Y] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); - h = lmin[Y] + ltot[Y] - r[Y] - ah; - if (h < hlub) drag[Y] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); + double dh = wall->param->lubr_dh[Y]; + double hlub = wall->param->lubr_rc[Y]; + double hb = r[Y] - (lmin[Y] + dh) - ah; + double ht = lmin[Y] + (ltot[Y] - dh) - r[Y] - ah; + drag[Y] += wall_lubr_drag(eta, ah, hb, hlub); + drag[Y] += wall_lubr_drag(eta, ah, ht, hlub); } if (wall->param->isboundary[Z]) { - hlub = wall->param->lubr_rc[Z]; - h = r[Z] - lmin[Z] - ah; - if (h < hlub) drag[Z] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); - h = lmin[Z] + ltot[Z] - r[Z] - ah; - if (h < hlub) drag[Z] = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hlub); + double dh = wall->param->lubr_dh[Z]; + double hlub = wall->param->lubr_rc[Z]; + double hb = r[Z] - (lmin[Z] + dh) - ah; + double ht = lmin[Z] + (ltot[Z] - dh) - r[Z] - ah; + drag[Z] += wall_lubr_drag(eta, ah, hb, hlub); + drag[Z] += wall_lubr_drag(eta, ah, ht, hlub); } return 0; } + +/***************************************************************************** + * + * wall_lubr_drag + * + * Return drag correction for sphere hydrodynamic radius ah. + * The separation h should be less than the cut off hc, or + * else zero is returned. Both h and hc should be +ve. + * + * eta is the dynamic viscosity (lattice units). + * + *****************************************************************************/ + +__host__ double wall_lubr_drag(double eta, double ah, double h, double hc) { + + double zeta = 0.0; + PI_DOUBLE(pi); + + if (h < hc) zeta = -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hc); + return zeta; +} diff --git a/src/wall.h b/src/wall.h index 65dec5173..610758dc5 100644 --- a/src/wall.h +++ b/src/wall.h @@ -5,7 +5,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2011-2021 The University of Edinburgh + * (c) 2011-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -57,6 +57,7 @@ struct wall_param_s { double ubot[3]; /* 'Botttom' wall motion */ double utop[3]; /* 'Top' wall motion */ double lubr_rc[3]; /* Lubrication correction cut offs */ + double lubr_dh[3]; /* Lubrication correction offset into fluid */ wall_slip_t slip; /* Slip parameters */ }; @@ -106,4 +107,7 @@ __host__ __device__ int wall_is_pm(wall_t * wall, int * ispm); __host__ __device__ int wall_present(wall_t * wall); __host__ __device__ int wall_present_dim(wall_t * wall, int iswall[3]); +/* A "class" method */ +__host__ double wall_lubr_drag(double eta, double ah, double h, double hlub); + #endif diff --git a/src/wall_rt.c b/src/wall_rt.c index 9c1de75eb..22d44a1a4 100644 --- a/src/wall_rt.c +++ b/src/wall_rt.c @@ -5,7 +5,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2015-2020 The University of Edinburgh + * (c) 2015-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -58,6 +58,10 @@ int wall_rt_init(pe_t * pe, cs_t * cs, rt_t * rt, lb_t * lb, map_t * map, rt_double_parameter(rt, "boundary_lubrication_rcnormal", &p.lubr_rc[X]); p.lubr_rc[Y] = p.lubr_rc[X]; p.lubr_rc[Z] = p.lubr_rc[X]; + + rt_double_parameter(rt, "boundary_lubrication_dhnormal", &p.lubr_dh[X]); + p.lubr_dh[Y] = p.lubr_dh[X]; + p.lubr_dh[Z] = p.lubr_dh[X]; } /* Slip properties [optional] */ From 2b3b82b246c2c7ea68297615991eab15dbb34147 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 17:56:45 +0100 Subject: [PATCH 76/79] Add lubrication offset test --- .../d3q19-short/serial-wall-st6.inp | 95 +++++++++++ .../d3q19-short/serial-wall-st6.log | 156 ++++++++++++++++++ 2 files changed, 251 insertions(+) create mode 100644 tests/regression/d3q19-short/serial-wall-st6.inp create mode 100644 tests/regression/d3q19-short/serial-wall-st6.log diff --git a/tests/regression/d3q19-short/serial-wall-st6.inp b/tests/regression/d3q19-short/serial-wall-st6.inp new file mode 100644 index 000000000..2d367f5d4 --- /dev/null +++ b/tests/regression/d3q19-short/serial-wall-st6.inp @@ -0,0 +1,95 @@ +############################################################################## +# +# Wall lubrication smoke test +# +# A colloid close to the wall with normal lubrication correction +# rc = 0.5 plus a lubrication offset. +# +############################################################################## + +N_cycles 10 + +############################################################################## +# +# System and MPI +# +############################################################################## + +size 24_24_24 +periodicity 0_0_0 + + +############################################################################## +# +# Fluid parameters +# +############################################################################## + +viscosity 0.1 + +isothermal_fluctuations off + +############################################################################## +# +# Free energy parameters +# +############################################################################### + +free_energy none + +############################################################################### +# +# Colloid parameters +# +############################################################################### + +colloid_init input_one + +colloid_one_a0 2.3 +colloid_one_ah 2.3 +colloid_one_r 3.5_12.5_12.5 +colloid_one_v 0.0_0.0_0.0 + +# Constant body force on all colloids ("gravity") [default is zero] + +colloid_gravity -0.001_0.0_0.0 + +############################################################################### +# +# Walls / boundaries +# +############################################################################### + +boundary_walls 1_1_1 +boundary_speed_bottom 0.0 +boundary_speed_top 0.0 + +boundary_lubrication_rcnormal 0.5 +boundary_lubrication_dhnormal 0.6 + +############################################################################### +# +# Output frequency and type +# +############################################################################### + +freq_statistics 10 +config_at_end no + +############################################################################## +# +# colloid i/o +# +############################################################################## + +colloid_io_freq 100000 + +############################################################################### +# +# Miscellaneous +# +# random_seed +ve integer is the random number generator seed +# +############################################################################### + +random_seed 8361235 diff --git a/tests/regression/d3q19-short/serial-wall-st6.log b/tests/regression/d3q19-short/serial-wall-st6.log new file mode 100644 index 000000000..af0c83ecf --- /dev/null +++ b/tests/regression/d3q19-short/serial-wall-st6.log @@ -0,0 +1,156 @@ +Welcome to Ludwig v0.18.0 (Serial version running on 1 process) +Start time: Mon Sep 12 17:00:04 2022 + +Compiler: + name: Gnu 11.2.0 + version-string: 11.2.0 + +Note assertions via standard C assert() are on. + +Target thread model: OpenMP. +OpenMP threads: 1; maximum number of threads: 8. + +Read 21 user parameters from serial-wall-st6.inp + +No free energy selected + +System details +-------------- +System size: 24 24 24 +Decomposition: 1 1 1 +Local domain: 24 24 24 +Periodic: 0 0 0 +Halo nhalo: 1 +Reorder: true +Initialised: 1 + +System properties +---------------- +Mean fluid density: 1.00000e+00 +Shear viscosity 1.00000e-01 +Bulk viscosity 1.00000e-01 +Temperature 0.00000e+00 +External body force density 0.00000e+00 0.00000e+00 0.00000e+00 +External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 +External E-field frequency 0.00000e+00 +External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 + +Lattice Boltzmann distributions +------------------------------- +Model: d3q19 +SIMD vector len: 1 +Number of sets: 1 +Halo type: lb_halo_target (full halo) +Input format: binary +Output format: binary +I/O grid: 1 1 1 + +Lattice Boltzmann collision +--------------------------- +Relaxation time scheme: M10 +Hydrodynamic modes: on +Ghost modes: on +Isothermal fluctuations: off +Shear relaxation time: 8.00000e-01 +Bulk relaxation time: 8.00000e-01 +Ghost relaxation time: 1.00000e+00 +[User ] Random number seed: 8361235 + +Hydrodynamics +------------- +Hydrodynamics: on + +Boundary walls +-------------- +Boundary walls: X Y Z +Boundary speed u_x (bottom): 0.0000000e+00 +Boundary speed u_x (top): 0.0000000e+00 +Boundary normal lubrication rc: 5.0000000e-01 +Boundary normal lubrication dh: 6.0000000e-01 +Wall boundary links allocated: 16992 +Memory (total, bytes): 271872 +Boundary shear initialise: 0 + +Colloid information +------------------- + +Colloid I/O settings +-------------------- +Decomposition: 1 1 1 +Number of files: 1 +Input format: ascii +Output format: ascii +Single file read flag: 0 + +Requested one colloid via input: +colloid_one_a0 2.3000000e+00 +colloid_one_ah 2.3000000e+00 +colloid_one_r 3.5000000e+00 1.2500000e+01 1.2500000e+01 +colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Initialised 1 colloid + +Colloid cell list information +----------------------------- +Input radius maximum: 2.3000000e+00 +Final cell list: 8 8 8 +Final cell lengths: 3.0000000e+00 3.0000000e+00 3.0000000e+00 + +Sedimentation force on: yes +Sedimentation force: -1.0000000e-03 0.0000000e+00 0.0000000e+00 + +Initial conditions. + +Scalars - total mean variance min max +[rho] 13768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 + +Momentum - x y z +[total ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[fluid ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 +[walls ] 0.0000000e+00 0.0000000e+00 0.0000000e+00 + +Starting time step loop. + +Particle statistics: + +Colloid velocities - x y z +[minimum ] -9.2793235e-06 -3.6198386e-18 -4.9001472e-18 +[maximum ] -9.2793235e-06 -3.6198386e-18 -4.9001472e-18 + +Scalars - total mean variance min max +[rho] 13768.00 1.00000000000 1.3138379e-12 0.99999588562 1.00003719551 + +Momentum - x y z +[total ] 9.2651581e-14 5.3639201e-15 -1.7281942e-15 +[fluid ] 5.7671194e-03 -3.9884762e-14 -8.1379348e-14 +[colloids] -4.7758860e-04 6.9544079e-17 -9.0615277e-17 +[walls ] -5.2895308e-03 4.5179138e-14 7.9741769e-14 + +Velocity - x y z +[minimum ] -8.6004811e-06 -6.1701126e-06 -6.1701126e-06 +[maximum ] 1.9629015e-06 6.1701126e-06 6.1701126e-06 + +Completed cycle 10 + +Timer resolution: 1e-06 second + +Timer statistics + Section: tmin tmax total + Total: 0.218 0.218 0.218 0.217563 (1 call) + Time step loop: 0.018 0.019 0.186 0.018627 (10 calls) + Propagation: 0.004 0.004 0.041 0.004116 (10 calls) + Propagtn (krnl) : 0.004 0.004 0.041 0.004103 (10 calls) + Collision: 0.008 0.009 0.084 0.008358 (10 calls) + Collision (krnl) : 0.008 0.009 0.084 0.008351 (10 calls) + Lattice halos: 0.001 0.002 0.024 0.001188 (20 calls) + phi gradients: 0.000 0.000 0.000 0.000000 (10 calls) + Forces: 0.000 0.000 0.001 0.000101 (10 calls) + Rebuild: 0.000 0.000 0.004 0.000406 (10 calls) + BBL: 0.003 0.003 0.029 0.002858 (10 calls) + Particle halos: 0.000 0.000 0.000 0.000036 (10 calls) + Force calculation: 0.000 0.000 0.000 0.000001 (10 calls) + phi update: 0.000 0.000 0.000 0.000000 (10 calls) + Free1: 0.000 0.007 0.007 0.000239 (30 calls) +End time: Mon Sep 12 17:00:04 2022 +Ludwig finished normally. From a352c461b50a9e5e73e063d1847d931dfcc8b735 Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 17:57:04 +0100 Subject: [PATCH 77/79] Add lubrication test --- tests/unit/test_wall.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_wall.c b/tests/unit/test_wall.c index a0f5ae1d0..c172d10d6 100644 --- a/tests/unit/test_wall.c +++ b/tests/unit/test_wall.c @@ -9,7 +9,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2020-2021 The University of Edinburgh + * (c) 2020-2022 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -23,6 +23,7 @@ #include "pe.h" #include "wall.h" +#include "util.h" #include "tests.h" __host__ int wall_link_normal(wall_t * wall, int n, int wn[3]); @@ -36,6 +37,7 @@ __host__ int test_wall_link_slip(pe_t * pe, cs_t * cs); __host__ int test_wall_commit1(pe_t * pe, cs_t * cs); __host__ int test_wall_commit2(pe_t * pe, cs_t * cs); +__host__ int test_wall_lubr_drag(void); /***************************************************************************** * @@ -65,6 +67,8 @@ __host__ int test_wall_suite(void) { test_wall_commit1(pe, cs); test_wall_commit2(pe, cs); + test_wall_lubr_drag(); + pe_info(pe, "PASS ./unit/test_wall\n"); cs_free(cs); @@ -438,3 +442,37 @@ __host__ int test_wall_commit2(pe_t * pe, cs_t * cs) { return 0; } + +/***************************************************************************** + * + * test_wall_lubr_drag + * + *****************************************************************************/ + +__host__ int test_wall_lubr_drag(void) { + + int ifail = 0; + PI_DOUBLE(pi); + + { + /* h > hc => zeta = 0. */ + double eta = 0.1; + double ah = 1.25; + double h = 1.2; + double hc = 1.0; + double zeta = wall_lubr_drag(eta, ah, h, hc); + assert(fabs(zeta) < DBL_EPSILON); + if (fabs(zeta) < DBL_EPSILON) ifail = 1; + } + { + /* h < hc */ + double eta = 0.1; + double ah = 1.25; + double h = 1.0; + double hc = 1.2; + double zeta = wall_lubr_drag(eta, ah, h, hc); + assert(fabs(zeta - -6.0*pi*eta*ah*ah*(1.0/h - 1.0/hc)) < DBL_EPSILON); + } + + return ifail; +} From c3a7af9dbdc5ddc48766337e1caf33d69fcd5e0d Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Mon, 12 Sep 2022 17:57:36 +0100 Subject: [PATCH 78/79] Chanages for 0.18.0 --- CHANGES.md | 11 +++++++++++ version.h | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index aefc5233b..ff4a13078 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,17 @@ ### Changes +version 0.18.0 + +- Added a lubrication correction offset to allow an option for keeping + particles clear of plane walls. + See XXX +- Added options for arranging 'first touch' on allocation of memory + for LB data and field componenents. + See XXX + +- Various minor code improvements. + version 0.17.2 - Bug fix (issue #204) prevent crashes with s7_anchoring related to diff --git a/version.h b/version.h index 96eb25d30..e50d861e8 100644 --- a/version.h +++ b/version.h @@ -13,7 +13,7 @@ #define LUDWIG_VERSION_H #define LUDWIG_MAJOR_VERSION 0 -#define LUDWIG_MINOR_VERSION 17 -#define LUDWIG_PATCH_VERSION 2 +#define LUDWIG_MINOR_VERSION 18 +#define LUDWIG_PATCH_VERSION 0 #endif From c93e10d01074ebb194051c6de04d3476a45ec65b Mon Sep 17 00:00:00 2001 From: Kevin Stratford Date: Tue, 13 Sep 2022 17:16:37 +0100 Subject: [PATCH 79/79] Add documentation URLs --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ff4a13078..f83e484d4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,10 +5,10 @@ version 0.18.0 - Added a lubrication correction offset to allow an option for keeping particles clear of plane walls. - See XXX + See https://ludwig.epcc.ed.ac.uk/inputs/colloid.html - Added options for arranging 'first touch' on allocation of memory for LB data and field componenents. - See XXX + See https://ludwig.epcc.ed.ac.uk/inputs/parallel.html - Various minor code improvements.