15–16 May 2023
Wigner Datacenter - Wigner Research Centre for Physics
Europe/Budapest timezone

Generating small random grids with a given number of occupied sites

16 May 2023, 12:10
20m
Wigner Datacenter - Wigner Research Centre for Physics

Wigner Datacenter - Wigner Research Centre for Physics

Wigner RCP 1121 Budapest, Konkoly-Thege Miklós rd 29-33, Hungary
Lecture Session VI

Speaker

István Borsos (Centre for Energy Research)

Description

Some applications of Monte Carlo simulation require the generation of a
large number of small grids of bits (e.g. tiles or boards of 32 by 32 bits) with a
given number of bits set to one, the rest is set to zero. Conventional sequential
algorithms generate them by randomly selecting empty sites until the given
number of set sites is reached, which is not an efficient solution. In this talk
we present a solution that uses the special capabilities of either CPU or GPU
to generate them at a high speed. In the CUDA implementation the tiles are
generated warpwise (with the use of warp shuffles) thereby eliminating the loop
divergence of threads. This realization allows us also to reduce the use of shared
memory, the computation is performed in registers, only the PRNG states are
stored in local memory.

Primary author

István Borsos (Centre for Energy Research)

Presentation materials