Pass the GPU streams to StatePropagatorDataGpu constructor
[alexxy/gromacs.git] / src / gromacs / ewald / tests / pmegathertest.cpp
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /*! \internal \file
36  * \brief
37  * Implements PME force gathering tests.
38  *
39  * \author Aleksei Iupinov <a.yupinov@gmail.com>
40  * \ingroup module_ewald
41  */
42
43 #include "gmxpre.h"
44
45 #include <string>
46
47 #include <gmock/gmock.h>
48
49 #include "gromacs/mdtypes/inputrec.h"
50 #include "gromacs/utility/stringutil.h"
51
52 #include "testutils/refdata.h"
53 #include "testutils/testasserts.h"
54
55 #include "pmetestcommon.h"
56
57 namespace gmx
58 {
59 namespace test
60 {
61 namespace
62 {
63
64 /* Valid input instances */
65
66 //! A couple of valid inputs for boxes.
67 std::vector<Matrix3x3> const c_sampleBoxes
68 {
69     // normal box
70     Matrix3x3 {{
71                    8.0F, 0.0F, 0.0F,
72                    0.0F, 3.4F, 0.0F,
73                    0.0F, 0.0F, 2.0F
74                }},
75     // triclinic box
76     Matrix3x3 {{
77                    7.0F, 0.0F, 0.0F,
78                    0.0F, 4.1F, 0.0F,
79                    3.5F, 2.0F, 12.2F
80                }},
81 };
82
83 //! A couple of valid inputs for grid sizes
84 std::vector<IVec> const c_sampleGridSizes
85 {
86     IVec {
87         16, 12, 14
88     },
89     IVec {
90         13, 15, 11
91     }
92 };
93 //! Random charges
94 std::vector<real> const c_sampleChargesFull
95 {
96     4.95F, 3.11F, 3.97F, 1.08F, 2.09F, 1.1F, 4.13F, 3.31F, 2.8F, 5.83F, 5.09F, 6.1F, 2.86F, 0.24F, 5.76F, 5.19F, 0.72F
97 };
98
99 //! All the input atom gridline indices
100 std::vector<IVec> const c_sampleGridLineIndicesFull
101 {
102     IVec {
103         4, 2, 6
104     },
105     IVec {
106         1, 4, 10
107     },
108     IVec {
109         0, 6, 6
110     },
111     IVec {
112         0, 1, 4
113     },
114     IVec {
115         6, 3, 0
116     },
117     IVec {
118         7, 2, 2
119     },
120     IVec {
121         8, 3, 1
122     },
123     IVec {
124         4, 0, 3
125     },
126     IVec {
127         0, 0, 0
128     },
129     IVec {
130         8, 5, 8
131     },
132     IVec {
133         4, 4, 2
134     },
135     IVec {
136         7, 1, 7
137     },
138     IVec {
139         8, 5, 5
140     },
141     IVec {
142         2, 6, 5
143     },
144     IVec {
145         1, 6, 2
146     },
147     IVec {
148         7, 1, 8
149     },
150     IVec {
151         3, 5, 1
152     },
153 };
154
155 // Spline values/derivatives below are also generated randomly, so they are bogus,
156 // but that should not affect the reproducibility, which we're after
157
158 //! A lot of bogus input spline values - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values
159 std::vector<real> const c_sampleSplineValuesFull
160 {
161     0.12F, 0.81F, 0.29F, 0.22F, 0.13F, 0.19F, 0.12F, 0.8F, 0.44F, 0.38F, 0.32F, 0.36F, 0.27F, 0.11F, 0.17F, 0.94F, 0.07F, 0.9F, 0.98F, 0.96F, 0.07F, 0.94F, 0.77F, 0.24F, 0.84F, 0.16F, 0.77F, 0.57F, 0.52F, 0.27F, 0.39F, 0.45F, 0.6F, 0.59F, 0.44F, 0.91F, 0.97F, 0.43F, 0.24F, 0.52F, 0.73F, 0.55F, 0.99F, 0.39F, 0.97F, 0.35F, 0.1F, 0.68F, 0.19F, 0.1F, 0.77F, 0.2F, 0.43F, 0.69F, 0.76F, 0.32F, 0.31F, 0.94F, 0.53F, 0.6F, 0.93F, 0.57F, 0.94F, 0.88F, 0.75F, 0.77F, 0.91F, 0.72F, 0.07F, 0.78F, 0.09F, 0.02F, 0.48F, 0.97F, 0.89F, 0.39F, 0.48F, 0.19F, 0.02F, 0.92F, 0.8F, 0.41F, 0.53F, 0.32F, 0.38F, 0.58F, 0.36F, 0.46F, 0.92F, 0.91F, 0.01F, 0.86F, 0.54F, 0.86F, 0.94F, 0.37F, 0.35F, 0.81F, 0.89F, 0.48F,
162     0.34F, 0.18F, 0.11F, 0.02F, 0.87F, 0.95F, 0.66F, 0.67F, 0.38F, 0.45F, 0.04F, 0.94F, 0.54F, 0.76F, 0.58F, 0.83F, 0.31F, 0.73F, 0.71F, 0.06F, 0.35F, 0.32F, 0.35F, 0.61F, 0.27F, 0.98F, 0.83F, 0.11F, 0.3F, 0.42F, 0.95F, 0.69F, 0.58F, 0.29F, 0.1F, 0.68F, 0.94F, 0.62F, 0.51F, 0.47F, 0.04F, 0.47F, 0.34F, 0.71F, 0.52F, 0.19F, 0.69F, 0.5F, 0.59F, 0.05F, 0.74F, 0.11F, 0.4F, 0.81F, 0.24F, 0.53F, 0.71F, 0.07F, 0.17F, 0.41F, 0.23F, 0.78F, 0.27F, 0.1F, 0.71F, 0.36F, 0.67F, 0.6F, 0.94F, 0.69F, 0.19F, 0.58F, 0.68F, 0.5F, 0.62F, 0.38F, 0.29F, 0.44F, 0.04F, 0.89F, 0.0F, 0.76F, 0.22F, 0.16F, 0.08F, 0.62F, 0.51F, 0.62F, 0.83F, 0.72F, 0.96F, 0.99F, 0.4F, 0.79F, 0.83F, 0.21F, 0.43F, 0.32F, 0.44F, 0.72F,
163     0.21F, 0.4F, 0.93F, 0.07F, 0.11F, 0.41F, 0.24F, 0.04F, 0.36F, 0.15F, 0.92F, 0.08F, 0.99F, 0.35F, 0.42F, 0.7F, 0.17F, 0.39F, 0.69F, 0.0F, 0.86F, 0.89F, 0.59F, 0.81F, 0.77F, 0.15F, 0.89F, 0.17F, 0.76F, 0.67F, 0.58F, 0.78F, 0.26F, 0.19F, 0.69F, 0.18F, 0.46F, 0.6F, 0.69F, 0.23F, 0.34F, 0.3F, 0.64F, 0.34F, 0.6F, 0.99F, 0.69F, 0.57F, 0.75F, 0.07F, 0.36F, 0.75F, 0.81F, 0.8F, 0.42F, 0.09F, 0.94F, 0.66F, 0.35F, 0.67F, 0.34F, 0.66F, 0.02F, 0.47F, 0.78F, 0.21F, 0.02F, 0.18F, 0.42F, 0.2F, 0.46F, 0.34F, 0.4F, 0.46F, 0.96F, 0.86F, 0.25F, 0.25F, 0.22F, 0.37F, 0.59F, 0.19F, 0.45F, 0.61F, 0.04F, 0.71F, 0.77F, 0.51F, 0.77F, 0.15F, 0.78F, 0.36F, 0.62F, 0.24F, 0.86F, 0.2F, 0.77F, 0.08F, 0.09F, 0.3F,
164     0.0F, 0.6F, 0.99F, 0.69F,
165 };
166
167 //! A lot of bogus input spline derivatives - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values
168 std::vector<real> const c_sampleSplineDerivativesFull
169 {
170     0.82F, 0.88F, 0.83F, 0.11F, 0.93F, 0.32F, 0.71F, 0.37F, 0.69F, 0.88F, 0.11F, 0.38F, 0.25F, 0.5F, 0.36F, 0.81F, 0.78F, 0.31F, 0.66F, 0.32F, 0.27F, 0.35F, 0.53F, 0.83F, 0.08F, 0.08F, 0.94F, 0.71F, 0.65F, 0.24F, 0.13F, 0.01F, 0.33F, 0.65F, 0.24F, 0.53F, 0.45F, 0.84F, 0.33F, 0.97F, 0.31F, 0.7F, 0.03F, 0.31F, 0.41F, 0.76F, 0.12F, 0.3F, 0.57F, 0.65F, 0.87F, 0.99F, 0.42F, 0.97F, 0.32F, 0.39F, 0.73F, 0.23F, 0.03F, 0.67F, 0.97F, 0.57F, 0.42F, 0.38F, 0.54F, 0.17F, 0.53F, 0.54F, 0.18F, 0.8F, 0.76F, 0.13F, 0.29F, 0.83F, 0.77F, 0.56F, 0.4F, 0.87F, 0.36F, 0.18F, 0.59F, 0.04F, 0.05F, 0.61F, 0.26F, 0.91F, 0.62F, 0.16F, 0.89F, 0.23F, 0.26F, 0.59F, 0.33F, 0.2F, 0.49F, 0.41F, 0.25F, 0.4F, 0.16F, 0.83F,
171     0.44F, 0.82F, 0.21F, 0.95F, 0.14F, 0.8F, 0.37F, 0.31F, 0.41F, 0.53F, 0.15F, 0.85F, 0.78F, 0.17F, 0.92F, 0.03F, 0.13F, 0.2F, 0.03F, 0.33F, 0.87F, 0.38F, 0, 0.08F, 0.79F, 0.36F, 0.53F, 0.05F, 0.07F, 0.94F, 0.23F, 0.85F, 0.13F, 0.27F, 0.23F, 0.22F, 0.26F, 0.38F, 0.15F, 0.48F, 0.18F, 0.33F, 0.23F, 0.62F, 0.1F, 0.36F, 0.99F, 0.07F, 0.02F, 0.04F, 0.09F, 0.29F, 0.52F, 0.29F, 0.83F, 0.97F, 0.61F, 0.81F, 0.49F, 0.56F, 0.08F, 0.09F, 0.03F, 0.65F, 0.46F, 0.1F, 0.06F, 0.06F, 0.39F, 0.29F, 0.04F, 0.03F, 0.1F, 0.83F, 0.94F, 0.59F, 0.97F, 0.82F, 0.2F, 0.66F, 0.23F, 0.11F, 0.03F, 0.16F, 0.27F, 0.53F, 0.94F, 0.46F, 0.43F, 0.29F, 0.97F, 0.64F, 0.46F, 0.37F, 0.43F, 0.48F, 0.37F, 0.93F, 0.5F, 0.2F,
172     0.92F, 0.09F, 0.74F, 0.55F, 0.44F, 0.05F, 0.13F, 0.17F, 0.79F, 0.44F, 0.11F, 0.6F, 0.64F, 0.05F, 0.96F, 0.3F, 0.45F, 0.47F, 0.42F, 0.74F, 0.91F, 0.06F, 0.89F, 0.24F, 0.26F, 0.68F, 0.4F, 0.88F, 0.5F, 0.65F, 0.48F, 0.15F, 0.0F, 0.41F, 0.67F, 0.4F, 0.31F, 0.73F, 0.77F, 0.36F, 0.26F, 0.74F, 0.46F, 0.56F, 0.78F, 0.92F, 0.32F, 0.9F, 0.06F, 0.55F, 0.6F, 0.13F, 0.38F, 0.93F, 0.5F, 0.92F, 0.96F, 0.82F, 0.0F, 0.04F, 0.9F, 0.55F, 0.97F, 1.0F, 0.23F, 0.46F, 0.52F, 0.49F, 0.0F, 0.32F, 0.16F, 0.4F, 0.62F, 0.36F, 0.03F, 0.63F, 0.16F, 0.58F, 0.97F, 0.03F, 0.44F, 0.07F, 0.22F, 0.75F, 0.32F, 0.61F, 0.94F, 0.33F, 0.7F, 0.57F, 0.5F, 0.84F, 0.7F, 0.47F, 0.18F, 0.09F, 0.25F, 0.77F, 0.94F, 0.85F,
173     0.09F, 0.83F, 0.02F, 0.91F,
174 };
175
176 //! 2 c_sample grids - only non-zero values have to be listed
177 std::vector<SparseRealGridValuesInput> const c_sampleGrids
178 {
179     SparseRealGridValuesInput {{
180                                    IVec {
181                                        0, 0, 0
182                                    }, 3.5F
183                                }, {
184                                    IVec {
185                                        7, 0, 0
186                                    }, -2.5F
187                                },
188                                {
189                                    IVec {
190                                        3, 5, 7
191                                    }, -0.006F
192                                }, {
193                                    IVec {
194                                        1, 6, 7
195                                    }, -2.76F
196                                }, {
197                                    IVec {
198                                        3, 1, 2
199                                    }, 0.6F
200                                },  {
201                                    IVec {
202                                        6, 2, 4
203                                    }, 7.1F
204                                }, {
205                                    IVec {
206                                        4, 5, 6
207                                    }, 4.1F
208                                }, {
209                                    IVec {
210                                        4, 4, 6
211                                    }, -3.7F
212                                }, },
213     SparseRealGridValuesInput {{
214                                    IVec {
215                                        0, 4, 0
216                                    }, 6.F
217                                }, {
218                                    IVec {
219                                        4, 2, 7
220                                    }, 13.76F
221                                }, {
222                                    IVec {
223                                        0, 6, 7
224                                    }, 3.6F
225                                }, {
226                                    IVec {
227                                        3, 2, 8
228                                    }, 0.61F
229                                },
230                                {
231                                    IVec {
232                                        5, 4, 3
233                                    }, 2.1F
234                                },
235                                {
236                                    IVec {
237                                        2, 5, 10
238                                    }, 3.6F
239                                }, {
240                                    IVec {
241                                        5, 3, 6
242                                    }, 2.1F
243                                }, {
244                                    IVec {
245                                        6, 6, 6
246                                    }, 6.1F
247                                }, }
248 };
249
250 //! Input forces for reduction
251 std::vector<RVec> const c_sampleForcesFull {
252     RVec {
253         0.02F, 0.87F, 0.95F
254     }, RVec {
255         0.66F, 0.67F, 0.38F
256     }, RVec {
257         0.45F, 0.04F, 0.94F
258     }, RVec {
259         0.54F, 0.76F, 0.58F
260     },
261     RVec {
262         0.83F, 0.31F, 0.73F
263     }, RVec {
264         0.71F, 0.06F, 0.35F
265     }, RVec {
266         0.32F, 0.35F, 0.61F
267     }, RVec {
268         0.27F, 0.98F, 0.83F
269     },
270     RVec {
271         0.11F, 0.3F, 0.42F
272     }, RVec {
273         0.95F, 0.69F, 0.58F
274     }, RVec {
275         0.29F, 0.1F, 0.68F
276     }, RVec {
277         0.94F, 0.62F, 0.51F
278     },
279     RVec {
280         0.47F, 0.04F, 0.47F
281     }, RVec {
282         0.34F, 0.71F, 0.52F
283     }
284 };
285
286 //! PME orders to test
287 std::vector<int> const pmeOrders {
288     3, 4, 5
289 };
290 //! Atom counts to test
291 std::vector<size_t> const atomCounts {
292     1, 2, 13
293 };
294
295 /* Helper structures for test input */
296
297 //! A structure for all the spline data which depends in size both on the PME order and atom count
298 struct AtomAndPmeOrderSizedData
299 {
300     //! Spline values
301     SplineParamsVector splineValues;
302     //! Spline derivatives
303     SplineParamsVector splineDerivatives;
304 };
305
306 //! A structure for all the input atom data which depends in size on atom count - including a range of spline data for different PME orders
307 struct AtomSizedData
308 {
309     //! Gridline indices
310     GridLineIndicesVector                   gridLineIndices;
311     //! Charges
312     ChargesVector                           charges;
313     //! Coordinates
314     CoordinatesVector                       coordinates;
315     //! Spline data for different orders
316     std::map<int, AtomAndPmeOrderSizedData> splineDataByPmeOrder;
317 };
318
319 //! A range of the test input data sets, uniquely identified by the atom count
320 typedef std::map<size_t, AtomSizedData> InputDataByAtomCount;
321
322 /*! \brief Convenience typedef of the test input parameters - unit cell box, PME interpolation order, grid dimensions,
323  *  grid values, overwriting/reducing the input forces, atom count.
324  *
325  * The rest of the atom-related input data - gridline indices, spline theta values, spline dtheta values, atom charges -
326  * is looked up in the inputAtomDataSets_ test fixture variable.
327  */
328 typedef std::tuple<Matrix3x3, int, IVec, SparseRealGridValuesInput, PmeForceOutputHandling, size_t> GatherInputParameters;
329
330 //! Test fixture
331 class PmeGatherTest : public ::testing::TestWithParam<GatherInputParameters>
332 {
333     private:
334         //! Storage of all the input atom datasets
335         static InputDataByAtomCount s_inputAtomDataSets_;
336
337     public:
338         PmeGatherTest()  = default;
339         //! Sets the input atom data references once
340         static void SetUpTestCase()
341         {
342             size_t start = 0;
343             for (auto atomCount : atomCounts)
344             {
345                 AtomSizedData atomData;
346                 atomData.gridLineIndices = GridLineIndicesVector(c_sampleGridLineIndicesFull).subArray(start, atomCount);
347                 atomData.charges         = ChargesVector(c_sampleChargesFull).subArray(start, atomCount);
348                 start                   += atomCount;
349                 atomData.coordinates.resize(atomCount, RVec {1e6, 1e7, -1e8});
350                 /* The coordinates are intentionally bogus in this test - only the size matters; the gridline indices are fed directly as inputs */
351                 for (auto pmeOrder : pmeOrders)
352                 {
353                     AtomAndPmeOrderSizedData splineData;
354                     const size_t             dimSize = atomCount * pmeOrder;
355                     for (int dimIndex = 0; dimIndex < DIM; dimIndex++)
356                     {
357                         splineData.splineValues[dimIndex]      = SplineParamsDimVector(c_sampleSplineValuesFull).subArray(dimIndex * dimSize, dimSize);
358                         splineData.splineDerivatives[dimIndex] = SplineParamsDimVector(c_sampleSplineDerivativesFull).subArray(dimIndex * dimSize, dimSize);
359                     }
360                     atomData.splineDataByPmeOrder[pmeOrder] = splineData;
361                 }
362                 s_inputAtomDataSets_[atomCount] = atomData;
363             }
364         }
365         //! The test
366         void runTest()
367         {
368             /* Getting the input */
369             Matrix3x3                 box;
370             int                       pmeOrder;
371             IVec                      gridSize;
372             size_t                    atomCount;
373             SparseRealGridValuesInput nonZeroGridValues;
374             PmeForceOutputHandling    inputForceTreatment;
375             std::tie(box, pmeOrder, gridSize, nonZeroGridValues, inputForceTreatment, atomCount) = GetParam();
376             auto inputAtomData       = s_inputAtomDataSets_[atomCount];
377             auto inputAtomSplineData = inputAtomData.splineDataByPmeOrder[pmeOrder];
378
379             /* Storing the input where it's needed, running the test */
380             t_inputrec inputRec;
381             inputRec.nkx         = gridSize[XX];
382             inputRec.nky         = gridSize[YY];
383             inputRec.nkz         = gridSize[ZZ];
384             inputRec.pme_order   = pmeOrder;
385             inputRec.coulombtype = eelPME;
386             inputRec.epsilon_r   = 1.0;
387
388             TestReferenceData refData;
389             for (const auto &context : getPmeTestEnv()->getHardwareContexts())
390             {
391                 CodePath   codePath       = context->getCodePath();
392                 const bool supportedInput = pmeSupportsInputForMode(*getPmeTestEnv()->hwinfo(), &inputRec, codePath);
393                 if (!supportedInput)
394                 {
395                     /* Testing the failure for the unsupported input */
396                     EXPECT_THROW(pmeInitWrapper(&inputRec, codePath, nullptr, nullptr, box), NotImplementedError);
397                     continue;
398                 }
399
400                 /* Describing the test uniquely */
401                 SCOPED_TRACE(formatString("Testing force gathering with %s %sfor PME grid size %d %d %d"
402                                           ", order %d, %zu atoms, %s",
403                                           codePathToString(codePath), context->getDescription().c_str(),
404                                           gridSize[XX], gridSize[YY], gridSize[ZZ],
405                                           pmeOrder,
406                                           atomCount,
407                                           (inputForceTreatment == PmeForceOutputHandling::ReduceWithInput) ? "with reduction" : "without reduction"
408                                           ));
409
410                 PmeSafePointer pmeSafe = pmeInitWrapper(&inputRec, codePath, context->getDeviceInfo(), context->getPmeGpuProgram(), box);
411                 std::unique_ptr<StatePropagatorDataGpu> stateGpu = (codePath == CodePath::GPU) ? makeStatePropagatorDataGpu(*pmeSafe.get()) : nullptr;
412
413                 pmeInitAtoms(pmeSafe.get(), stateGpu.get(), codePath, inputAtomData.coordinates, inputAtomData.charges);
414
415                 /* Setting some more inputs */
416                 pmeSetRealGrid(pmeSafe.get(), codePath, nonZeroGridValues);
417                 pmeSetGridLineIndices(pmeSafe.get(), codePath, inputAtomData.gridLineIndices);
418                 for (int dimIndex = 0; dimIndex < DIM; dimIndex++)
419                 {
420                     pmeSetSplineData(pmeSafe.get(), codePath, inputAtomSplineData.splineValues[dimIndex], PmeSplineDataType::Values, dimIndex);
421                     pmeSetSplineData(pmeSafe.get(), codePath, inputAtomSplineData.splineDerivatives[dimIndex], PmeSplineDataType::Derivatives, dimIndex);
422                 }
423
424                 /* Explicitly copying the sample forces to be able to modify them */
425                 auto inputForcesFull(c_sampleForcesFull);
426                 GMX_RELEASE_ASSERT(inputForcesFull.size() >= atomCount, "Bad input forces size");
427                 auto forces = ForcesVector(inputForcesFull).subArray(0, atomCount);
428
429                 /* Running the force gathering itself */
430                 pmePerformGather(pmeSafe.get(), codePath, inputForceTreatment, forces);
431                 pmeFinalizeTest(pmeSafe.get(), codePath);
432
433                 /* Check the output forces correctness */
434                 TestReferenceChecker forceChecker(refData.rootChecker());
435                 const auto           ulpTolerance = 3 * pmeOrder;
436                 forceChecker.setDefaultTolerance(relativeToleranceAsUlp(1.0, ulpTolerance));
437                 forceChecker.checkSequence(forces.begin(), forces.end(), "Forces");
438             }
439         }
440 };
441
442 // An instance of static atom data
443 InputDataByAtomCount PmeGatherTest::s_inputAtomDataSets_;
444
445 //! Test for PME force gathering
446 TEST_P(PmeGatherTest, ReproducesOutputs)
447 {
448     EXPECT_NO_THROW(runTest());
449 }
450
451 //! Instantiation of the PME gathering test
452 INSTANTIATE_TEST_CASE_P(SaneInput, PmeGatherTest, ::testing::Combine(::testing::ValuesIn(c_sampleBoxes),
453                                                                          ::testing::ValuesIn(pmeOrders),
454                                                                          ::testing::ValuesIn(c_sampleGridSizes),
455                                                                          ::testing::ValuesIn(c_sampleGrids),
456                                                                          ::testing::Values(PmeForceOutputHandling::Set, PmeForceOutputHandling::ReduceWithInput),
457                                                                          ::testing::ValuesIn(atomCounts)));
458
459 }  // namespace
460 }  // namespace test
461 }  // namespace gmx