QMC4PDE

Quasi-Monte Carlo methods for elliptic PDEs with random diffusion coefficients

A practical guide to the software for constructing point sets and point generator code

Accompanying the article “Application of quasi-Monte Carlo methods to elliptic PDEs with random diffusion coefficients – a survey of analysis and implementation”, Foundations of Computational Mathematics, 2016, by Frances Y. Kuo & Dirk Nuyens.

\( \newcommand{\bst}{\boldsymbol{t}} \newcommand{\bsx}{\boldsymbol{x}} \newcommand{\bsy}{\boldsymbol{y}} \newcommand{\bsz}{\boldsymbol{z}} \newcommand{\bsnu}{\boldsymbol{\nu}} \newcommand{\bbZ}{\mathbb{Z}} \newcommand{\bbR}{\mathbb{R}} \newcommand{\bbN}{\mathbb{N}} \newcommand{\Bj}{b_j} \newcommand{\setu}{\mathfrak{u}} \newcommand{\rd}{\,\mathrm{d}} \)

Introduction

This page provides code which accompanies the article “Application of quasi-Monte Carlo methods to elliptic PDEs with random diffusion coefficients — a survey of analysis and implementation”, Foundations of Computational Mathematics, 16(6):1631-1696, 2016, by Frances Y. Kuo & Dirk Nuyens.

Please cite the article, as well as this web page, if you use the software from this page.

You can download the or the .

The code accompanying this article consists of two parts:

  1. Python scripts for the construction of randomly shifted lattice rules (RLR) and interlaced polynomial lattice rules (IPLR) for a specific random parameter setting. This is the QMC4PDE part.
  2. Python, Matlab and C++ code for the generation of the points of these rules (given the parameters from the construction scripts), which additionally can also generate points for interlaced Sobol' sequences (ISobol). These generators have their own web page called the Magic Point Shop.

The current version of the QMC4PDE package is dated 10 Dec 2024.

Download the code as a package.
To be able to construct polynomial lattice rules you need the following data files: polylat-data.tgz (61 MB). This file has to be unpacked in the same directory as where the construction scripts reside (qmc4pde). In a future update we will provide the C++ code to generate these data files (possibly on the fly).
Alternatively you may find the Python codes online as the on bitbucket.
To generate the points please download the generators from the Magic Point Shop. There is choice of Python2/3, Matlab/Octave and C++ point generators.
We also have a set of prepackaged interlaced Sobol' points for use with the point generators below, available for download: sobolmats.tgz (19 MB).

The Python scripts make use of the NumPy Python package (which is probably included in your Python distribution) as well as of the SciPy Python package in the case of lattice rules where the Riemann $\zeta$ function and erf functions are needed.

For integration over $\bbR^s$ (i.e., the lognormal setting for the PDE) we are currently investigating alternative choices to control the derivatives in the norm. A future update will likely include this alternative setting.

Change history:

  1. 20241210: update documentation (webpage) to include explicit description of weights.
  2. 20231012: fix deprecated np.float and collections.Callable thanks to Bill McLean.
  3. 20180616: forced another integer division thanks to Pierre Marion.
  4. 20171214: Added link to bitbucket git repository. Also, from now on the MagicPointShop qmc-generators are in a separate package which makes it easier to maintain.
  5. 20170908: forced another integer division for numpy.tile >= 1.13 (or 1.12?), thanks to Benjamin Raffin
  6. 20170907: modified cbc scripts such that they can be used with python 2 or python 3; changed directory layout; updated Python generator latticeseq_b2.py to generate in blocks of powers of 2 to gain significand speed increase when no intermediate results are needed; restructured directory layout (construction scripts are now in a subdirectory qmc4pde/qmc4pde)
  7. 20160814: initial version

1. Fast CBC constructions

The construction algorithms are all fast component-by-component constructions, using results from [NC06a,NC06b,CKN06,DKLNS14] and [Nuy14]. For lattice rules the construction algorithm will output the generating vector and for the interlaced polynomial lattice rules the algorithm will output the generating matrices. These generating vectors and matrices can then be used in the provided point generators.

1.1. Randomly shifted lattice rules/sequences

For randomly shifted lattice rules the script constructs a good generating vector $\bsz$. The construction script expects the prime $p$ (which defaults to $2$) and the power $m$ to be given such that the (maximum) number of points is $n=p^m$. The generating vector can be used for any intermediate power of $p$ as an embedded sequence of lattice rules. A construction of such lattice sequences was proposed in [CKN06] and this is the approach followed in the lattice rule construction code.

1.2. Interlaced polynomial lattice rules

For interlaced polynomial lattice rules the script constructs the associated generating matrices. We fix the base of the finite field to be $2$ for practicalities in the construction, and in the generation of the points. The number of points is $n = 2^m$, but, in contrast to the lattice rules, we currently do not provide these as embedded sequences. The construction script will automatically choose a default irreducible polynomial of degree $m$ as the modulus polynomial (which can be overridden by the user). The specific choice of modulus polynomial does not influence the theoretical error bound. The output of the script will be both the generating matrices $C_1,\ldots,C_{\alpha s} \in \bbZ_2^{m \times m}$ of the polynomial lattice rule as well as the generating matrices $B_1,\ldots,B_s \in \bbZ_2^{\alpha m \times m}$ of the interlaced polynomial lattice rule.

2. Point generators

Once the generating vector or the generating matrices have been constructed, they are used as input to the corresponding point generator. These point generators are relatively straightforward to program, and their computational cost to generate a point is really minor and so can be neglected for practical purposes; in fact they are comparable to the fastest random number generators. To generate lattice points, one only requires an integer multiplication, a modulus operation, and a fixed float multiplication/division per dimension. This is comparable to the cost of a simple LCG (linear congruential generator) per dimension. To generate (interlaced) polynomial lattice points in Gray code ordering, one needs an xor instruction and a fixed float multiplication/division per dimension. Additionally, a CTZ (count trailing zeros) algorithm is used to determine the column number of the generating matrices to perform each xor instruction, which is available on most CPUs as a machine instruction or can be implemented with a simple algorithm having a fixed low arithmetic cost. This is comparable to the cost of a LFSR (linear feedback shift register) generator per dimension. In the case of randomly shifted lattice rules the points still have to be randomly shifted before being used as quadrature points. As QMC points are naturally enumerated, it is straightforward to parallelize the solving of the different PDE problems and we therefore equip the point generators with an option to start at any offset in the enumeration of the points.

3. Parameters for the construction scripts

The theory in the article [KN16] covers single-level and multi-level algorithms for both the uniform and lognormal cases, and in the uniform case it considers both first order (randomly shifted lattice rules) and higher order methods (interlaced polynomial lattice rules). As the theory is often quite involved, we extract the essential properties of the analysis in the next section and allow them to be applied to any general integrand which shares similar characteristics. The table in the next section clarifies all parameters.

SPOD bounds on the mixed partial derrivatives

We consider a linear functional $G$ applied to $u^s_h(\bsx,\bsy)$ — the approximate solution of the PDE, given a specific random instance. The randomness is parametrized in the form of an infinite vector $\bsy$ which is truncated to $s$ dimensions in the computational approach. Taking $F(\bsy) = G(u_h^s(\cdot,\bsy))$ we approximate the expected value of this function through a QMC rule. The simplified view is thus the integration of an infinite-dimensional function, over $\bsy$ against some distribution, truncated to $s$ dimensions. This $s$-dimensional function is denoted by $F(\bsy)$.

We distinguish two cases:

1. Uniform case: Integrate against the uniform measure
\begin{align*} \mathbb{E}[G(u(\cdot,\bsy))] &= \int_{[-1/2,1/2]^\bbN} G(u(\cdot,\bsy)) \rd{\bsy} \\ &\approx \int_{[-1/2,1/2]^s} G(u_h^s(\cdot,\bsy)) \rd{\bsy} \\ &= \int_{[-1/2,1/2]^s} F(\bsy) \rd{\bsy} \\ &\approx \frac{1}{n} \sum_{k=0}^{n-1} F(\bst_k) . \end{align*}
2. Normal/lognormal case: Integrate against the normal distribution $\phi(\bsy)$
\begin{align*} \mathbb{E}[G(u(\cdot,\bsy))] &= \int_{\bbR^\bbN} G(u(\cdot,\bsy)) \, \phi(\bsy) \rd{\bsy} \\ &\approx \int_{\bbR^s} G(u_h^s(\cdot,\bsy)) \, \phi(\bsy) \rd{\bsy} \\ &= \int_{\bbR^s} F(\bsy) \, \phi(\bsy) \rd{\bsy} \\ &\approx \frac{1}{n} \sum_{k=0}^{n-1} F(\Phi^{-1}(\bst_k)) . \end{align*}

The integral is thus either against the uniform distribution on $[-1/2,1/2]^s$ or against the standard Gaussian distribution on $\bbR^s$. The latter situation arises when generating lognormal (and normal) random fields and is thus referred to as the lognormal case. For the lognormal case the only theoretical results are by means of randomly shifted lattice rules (RLR) which then give convergence close to $O(n^{-1})$ in approximating the integral.

For the uniform case we can apply randomly shifted lattice rules (RLR), obtaining a convergence close to $O(n^{-1})$, or interlaced polynomial lattice rules (IPLR), obtaining a convergence close to $O(n^{-\alpha})$ for an interlacing factor of $\alpha$. For interlaced polynomial lattice rules this interlacing factor must be an integer greater than 1. Theoretically $\alpha$ can be as big as one wants, but we are limited by the precision of the float representation as we need $m \times \alpha$ bits to represent the points if we want $n = 2^m$. Therefore the most realistic values of $\alpha$ are probably 2 and 3.

We provide two Python scripts, lat-cbc.py (see section RLR) and polylat-cbc.py (see section IPLR) (which are in fact symbolic links to spod-cbc.py), to construct lattice rules and interlaced polynomial lattice rules, respectively, in which the following generalized SPOD (smoothness driven product and order dependent) bound on the mixed derivatives of the integrand is assumed: for all $\bsnu \in \{0, ..., \alpha\}^s$, \begin{align}\label{eq:general-bound}\tag{1} \left| \partial^\bsnu F (\bsy) \right| \,\lesssim\, \Big( (|\bsnu|+a_1)! \Big)^{d_1} \prod_{j=1}^s (a_2 \, \Bj)^{\nu_j}\, \exp(a_3\,\Bj|y_j|) \,, \end{align} for some integers $\alpha \ge 1$ and $a_1 \ge 0$, real numbers $a_2 \gt 0$, $a_3 \ge 0$ and $d_1 \ge 0$, and a sequence of positive numbers $\Bj$, corresponding to the values of $b_j$, $\overline{b}_j$, $\beta_j$ or $\overline{\beta}_j$, appropriate for the setting, see the article for full details. For single-level algorithms the integrand is $F (\bsy) = G(u_h^s(\cdot,\bsy))$, while for multi-level algorithms the integrand at level $\ell$ is $F(\bsy) = G((u_{h_\ell}^s-u_{h_{\ell-1}}^s)(\cdot,\bsy))$. These parameters will then result into the following weights $\gamma_\setu$:

a. RLR (only order $\alpha = 1$ in the context of this software currently):
\begin{align*} \gamma_\setu &= \Big( \big( ( |\setu| + a_1 )! \big)^{d_1} \prod_{j \in \setu} \frac{a_2 \, b_j}{\sqrt{\rho(\lambda)}} \Big)^{2/(1+\lambda)} \end{align*} with $\rho(\lambda) = 2\zeta(2\lambda) / (2\pi^2)^\lambda$ and $\lambda = 1 / \min(2-2\delta, 2d_2-1) \in (1/2, 1]$ for a decay $d_2 \in \{2,3,\ldots\}$ of the $b_j$ and a choice of $\delta \in (0, 1/2)$. The default choice for $\delta = 0.125$ and for $d_2 = 2$ (i.e., $b_j = c\,j^{-d_2}$). The convergence rate then is $n^{-1/(2\lambda)}$.
b. IPLR (with interlacing factor $\alpha \in \{2,3,\ldots\}$, only uniform case currently):
\begin{align*} \gamma_\setu &= \sum_{\bsnu_\setu \in \{1,\ldots,\alpha\}^{|\setu|}} \big((|\bsnu|_\setu+a_1)!\big)^{d_1} \, \prod_{j\in\setu} 2^{\delta(\nu_j,\alpha)} \, (a_2 \, b_j)^{\nu_j} \end{align*} with $\lambda \in (1/\min(\alpha, d_2), 1]$. The convergence rate then is $n^{-1/\lambda}$.

An overview of all parameters and their description for the lat-cbc.py and the polylat-cbc.py scripts is given in the following table and we give examples of usage in the next two sections.

snumber of dimensions
mnumber of points given by $2^m$ (or $p^m$ in case of optional argument p for lattice rules)
poptional
  • for lattice rules $n=p^m$, prime, defaults to $p=2$
  • for polynomial lattice rules this is the primitive modulus polynomial of degree $m$ (the code uses a table of default polynomials)
alphaoptional
  • no effect for lattice rules, $\alpha = 1$
  • integer interlacing factor for polynomial lattice rules, $\alpha \ge 2$ (defaults to $\alpha=2$)
a1optional,
defaults to 0
integer offset for factorial,
e.g., in our analysis, $a_1=0$ for single-level and $a_1=5$ for multi-level
a2optional,
defaults to 1
scaling in the product (can be Python expression)
e.g., in our analysis, $a_2=1$ for uniform and $a_2=1/\ln 2$ for single-level lognormal and $a_2=2$ for multi-level lognormal
a3optional,
defaults to 0
boundary behaviour for the lognormal case ($a_3=0$ means we are in the uniform case)
e.g., in our analysis, $a_3=1$ for single-level lognormal and $a_3=9$ for multi-level lognormal
d1optional,
defaults to 1
extra power on the factorial factor ($d_1=0$ implies product weights)
d2optional,
defaults to 2
decay of the $\Bj$ sequence, $d_2 \gt 1$
boptional,
defaults to $cj^{-d_2}$
the $\Bj$ sequence as a Python expression, see text (alternatively as numerical values through a file with b_file)
coptional,
defaults to 1
in case no b and b_file are given, $\Bj$ is set to $cj^{-d_2}$
b_fileoptionalfile name containing numerical values for the sequence $\Bj$
outoptionaloutput directory to write results to

The summary of bounds from the analysis of the article corresponds to taking $d_1 = 1$. For randomly shifted lattice rules the order of convergence is limited to 1 and therefore $\alpha = 1$. For interlaced polynomial lattice rules we need $\alpha \ge 2$. The uniform case corresponds to taking $a_3 = 0$. The lognormal case corresponds to taking $a_3 \gt 0$, with $a_3=1$ and $a_3=9$ for the single-level and multi-level algorithms, respectively. Our analysis lead to $a_1=0$ and $a_1=5$ for the single-level and multi-level algorithms, respectively. We have $a_2 = 1$ in the uniform case, while in the lognormal case we have $a_2=1/\ln 2$ and $a_2=2$ for the single-level and multi-level algorithms, respectively. To cater for other potential integrands which satisfy the generalized bound \eqref{eq:general-bound}, our scripts can take general values of $a_1$, $a_2$, $a_3$ and $d_1$ as input.

To specify the sequence $\Bj$ the user has two main options. Either the user provides a Python expression (with access to variables j and v, to stand for the values of $j$ and $\nu_j$) as the argument to command line option b, or the user provides the name of an input file containing numerical values for each of the $\Bj$ by means of the b_file option. (Other possibilities are available, including a configuration file, but are not discussed here for conciseness.)

We remark that the analysis in the article takes into account the truncation from infinite dimensions to $s$ dimensions. Therefore it is essential to have an idea of the summability of the infinite sequence $\Bj$. For this, take $p_* \in (0,1)$ for which $\sum_{j=1}^\infty \Bj^{\;\,{p_*}} \lt \infty$. We would like $p_*$ to be as small as possible to obtain the fastest convergence of the integral. Asit is more convenient to work with the reciprocal value, the script expects a value $d_2 \gt 1$. This is called the “decay” of the sequence $\Bj$.

The theoretical QMC convergence rate in the context of PDE problems, with the implied constant independent of $s$, is roughly of order $n^{-\min(1,d_2-1/2)}$ for randomly shifted lattice rules, and $n^{-\min(\alpha,d_2)}$ for interlaced polynomial lattice rules with interlacing factor $\alpha\ge 2$.

The analysis in the article can be extended to handle the bound \eqref{eq:general-bound} with a general exponent $d_1$ on the factorial factor, provided that $d_2 \gt d_1$ (to ensure that the implied constant in the error estimate is bounded independently of $s$). The case $d_1 = 0$ will lead to product weights $\gamma_\setu$, in which case the CBC construction could be performed at lower cost.

Randomly shifted lattice rules

A synopsis of how to call the Python script lat-cbc.py to construct a randomly shifted lattice rule with $n=2^m$ points is

./lat-cbc.py --s={s} --m={m} [--a1={a1}] [--a2={a2}] [--a3={a3}] --d2={d2}
             [--b="{bound-function}" | --b_file={file_name} | --c={c}]

In particular, the default value of $a_3 = 0$ specifies the uniform case, while any value of $a_3 \gt 0$ specifies the lognormal case.

We give some examples on how to call the script:

## uniform case, 100-dimensional rule, 2^10 points and with specified bounds b:
./lat-cbc.py --s=100 --m=10 --d2=3 --b="0.1 * j**-3 / log(j+1)"
## as above, but multi-level and with bounds from file:
./lat-cbc.py --s=100 --m=10 --a1=5 --d2=3 --b_file=bounds.txt
## lognormal case, 100-dimensional rule, 2^10 points and with algebraic decay:
./lat-cbc.py --s=100 --m=10 --a2="1/log(2)" --a3=1 --d2=3 --c=0.1
## as above, but multi-level and with bounds from file:
./lat-cbc.py --s=100 --m=10 --a1=5 --a2=2 --a3=9 --d2=3 --b_file=bounds.txt

This will produce several files in the output directory. The most important one is z.txt which contains the generating vector. These points then need to be randomly shifted for the theory to apply. In the lognormal case, the randomly shifted points should be mapped to $\bbR^s$ by applying the inverse of the cumulative normal distribution function component-wise.

Codes are available in Python latticeseq_b2.py, Matlab/Octave latticeseq_b2.m, and C++ latticeseq_b2.hpp and latticeseq_b2.cpp to generate lattice points. An example usage in Matlab is given below:

load z.txt                      % load generating vector
latticeseq_b2('init0', z)       % initialize the procedural generator
Pa = latticeseq_b2(20, 512);    % first 512 20-dimensional points
Pb = latticeseq_b2(20, 512);    % next 512 20-dimensional points

With respect to the multi-level algorithm there are two important features of these lattice rules: they are lattice sequences in terms of the number of points, and they are constructed by a component-by-component algorithm which allows a rule constructed for $s$ dimensions to be used for a lower number of dimensions. This means the construction only has to be done once for the maximum number of points $\max_{0\le\ell\le L} n_\ell$ and the maximum number of dimensions $s_L$, since the parameters in \eqref{eq:general-bound} are the same for all levels.

Interlaced polynomial lattice rules

A synopsis of how to call the Python script polylat-cbc.py to construct an interlaced polynomial lattice rule with $n=2^m$ and interlacing factor $\alpha\ge 2$ is

./polylat-cbc.py --s={s} --m={m} --alpha={alpha} [--a1={a1}] [--a2={a2}]
             [--b="{bound-function}" | --b_file={file_name} | --d2={d2} --c={c}]

We expect the theoretical convergence rate to be of order close to $n^{-\min(\alpha,d_2)}$.

We give some examples on how to call the script:

## 100-dimensional rule, 2^10 points, interlacing 3 and with specified bounds b:
./polylat-cbc.py --s=100 --m=10 --alpha=3 --b="0.1 * j**-3 / log(j+1)"
## as above, but multi-level and with bounds from file:
./polylat-cbc.py --s=100 --m=10 --alpha=3 --a1=5 --b_file=bounds.txt

Several files will be saved into the output directory. The most important one is Bs.col which contains the generating matrices of the interlaced polynomial lattice rule. (Also the generating matrices of the non-interlaced polynomial lattice rule are available in the file Cs.col.)

Codes are available in Python digitalseq_b2g.py, Matlab/Octave digitalseq_b2g.m, and C++ digitalseq_b2g.hpp and digitalseq_b2g.cpp to generate these points. For interlacing to work correctly, the product $\alpha m$ should be no more than the number of available bits. We note that the IEEE double precision type only has 53 bits available and Matlab uses this type to do its calculations. As a compromise (which comes with no guarantee) we load the generating matrices truncated to 53 bits precision, which are available in the file Bs53.col. Similarly, to cater for the extended long double precision in C++ we provide a file Bs64.col. For instance, with interlacing factor $4$ we can have up to $2^{13}$ points in Matlab and up to $2^{16}$ points in C++ using long double. The Python point generator is implemented such that it can use arbitrary precision. One can also change the C++ generator to use arbitrary precision.

Below we give an example to illustrate how to feed the output from the construction script into the point generator. At the same time we experiment on the effect of truncating the generating matrices. First construct the generating matrices using the Python script and then save these points (in long double precision) to the file points.txt using the C++ example program:

./polylat-cbc.py --s=10 --m=15 --alpha=4 --b="0.1 * j**-4" --out=.
./digitalseq_b2g <Bs64.col >points.txt

In this example of $2^{15}$ points with interlacing factor $4$, we need $4\times 15 = 60$ bits of precision, which can be realized in full in C++ using long double. Now we use the generating matrices (truncated to 53 bits) in Matlab, make a plot, and compare these points to the full precision points we just created on the command line:

load Bs53.col                      % load generating matrices
s = 10; m = 15;
digitalseq_b2g('init0', Bs53)      % initialize the procedural generator
Pa = digitalseq_b2g(s, pow2(m-1)); % first half of the points
Pb = digitalseq_b2g(s, pow2(m-1)); % second half of the points
s1 = 2; s2 = 10;                   % pick some dimensions to show
plot(Pa(s1,:), Pa(s2,:), 'b.', Pb(s1,:), Pb(s2,:), 'r.')
axis([0 1 0 1]); axis square

load points.txt  % compare with the C++ generated points in long double
points = points';
Pc = points(:,1:pow2(m-1));
Pd = points(:,pow2(m-1)+(1:pow2(m-1)));
norm(Pc - Pa)    % this should be in the order of 1e-14
norm(Pd - Pb)    % and this as well...

Here the effect of truncating the generating matrices appears to be empirically insignificant, but the higher order QMC convergence theory no longer applies and there is no guarantee how well they would perform in practice.

Interlaced Sobol' points

We note that since the point generators operate using generating matrices, they can be used to generate any other digital sequence, interlaced or not. We provide the generating matrices for an implementation of the Sobol' sequence from [JK08] with 21201 dimensions (as the file sobol_Cs.col), as well as the generating matrices for interlaced Sobol' sequences with interlacing factor $\alpha = 2,3,4,5$ (e.g., sobol_alpha3_Bs53.col). An example usage in Matlab to generate the points is given below:

load sobol_alpha3_Bs53.col                 % load generating matrices
digitalseq_b2g('init0', sobol_alpha3_Bs53) % initialize the procedural generator
Pa = digitalseq_b2g(10, 1024);             % first 1024 10-dimensional points
Pb = digitalseq_b2g(10, 1024);             % next 1024 10-dimensional points

Further resources

References

[CKN06]
R. Cools, F. Y. Kuo, and D. Nuyens, Constructing embedded lattice rules for multivariate integration SIAM J. Sci. Comput., 28 (2006), 2162 - 2188.
[DKLNS14]
J. Dick, F. Y. Kuo, Q. T. Le Gia, D. Nuyens, and Ch. Schwab, Higher order QMC Galerkin discretization for parametric operator equations, SIAM J. Numer. Anal., 52 (2014), 2676 - 2702.
[JK08]
S. Joe and F. Y. Kuo, Constructing Sobol' sequences with better two-dimensional projections, SIAM J. Sci. Comput., 30 (2008), 2635 - 2654.
[KN16]
F. Y. Kuo and D. Nuyens, Application of quasi-Monte Carlo methods to elliptic PDEs with random diffusion coefficients — a survey of analysis and implementation, Foundations of Computational Mathematics, (2016).
[Nuy14]
D. Nuyens, The construction of good lattice rules and polynomial lattice rules, In: Uniform Distribution and Quasi-Monte Carlo Methods (P. Kritzer, H. Niederreiter, F. Pillichshammer, A. Winterhof, eds.), Radon Series on Computational and Applied Mathematics Vol. 15, De Gruyter, 2014, pp. 223 - 256.
[NC06a]
D. Nuyens and R. Cools, Fast algorithms for component-by-component construction of rank-1 lattice rules in shift-invariant reproducing kernel Hilbert spaces, Math. Comp., 75 (2006), 903 - 920.
[NC06b]
D. Nuyens and R. Cools, Fast component-by-component construction of rank-1 lattice rules with a non-prime number of points, J. Complexity, 22 (2006), 4 - 28.