- HTML 40.5%
- C++ 38.9%
- C 14.5%
- Cuda 1.5%
- JavaScript 1.5%
- Other 3.1%
| example | ||
| include | ||
| Random123 | ||
| ising2D_cl.cl | ||
| ising2D_cl.cpp | ||
| ising2D_io.hpp | ||
| Makefile | ||
| muca.hpp | ||
| README.md | ||
CLMuca
This is an OpenCL port of cudamuca - an implementation of the parallel multicanonical Monte Carlo sampling method (Article).
Requirements
- OpenCL capable GPU
- OpenCL 1.0+
- C++11 compatible compiler (tested with GNU compiler)
- recent version Linux (tested) (maybe MacOs, Windows)
Building
make cl
Usage
Usage :
./ising2D_cl [mt] [-s seed] [-p nupdates] [-i dev] -L size -W workers
-m turns on modifyWeights, default: false
-p final production run (set number of updates, if selected), default: 0
-L sets the system size, required parameter
-s sets the initial seed, default: 1000
-i select device from list of available GPUs, optional parameter, default: automatic
-W sets the number of workers, required parameter
example run:
ising2D_cl -L 8 -m -W 26624 -i 2
File description
Random123/
Random123 is a library of "counter-based" random number generators
from D. E. Shaw Research: https://www.deshawresearch.com/resources_random123.html
ising2D_cl.cpp
Host-part C++ implementation of the two-dimensional Ising model on GPUs using OpenCL, ported from the GPU version of cudamuca.
ising2D_cl.cl
OpenCL-GPU-part implementation of the two-dimensional Ising model on GPUs using OpenCL, ported from the GPU version of cudamuca.
ising_io.hpp
This file includes all methods for reading and parsing command line arguments as well as output generated by the main program.
muca.hpp
In this header all the functions related to the multicanonical sampling algorithm are implementated.
-
Cuda related code
- Update weights
- modify weights (linear extrapolation on the sides)
-
Histogram methods
- get histogram range
-
Flatness criteria
- Chebychev
- Kullback-Leibler
Generated output
The subdirectory example/ includes sample outputs generated on a Tesla K20m using the following command:
ising2d_cl -L 16 -W 26624
stats.dat
This file is used to store all simulational parameters as well as statistics of the simulation.
Information included in this file is:
- system size
- random number seed
- number of workers
- number of updates per workers
- number of iterations until convergence
- total time of simulation
- average spin flip time
- number of thermalization updater per worker
- number of measurement updates per worker
- total number of updates per worker
run_iterations.dat
In this file all iterations until convergence (flat histogram) are accumulated.
The header includes the iteration number, width of the covered energy range, number of measurement updates and the Kullback-Leibler parameter.
A table with energy bins, current MUCA weights and histogram entries follows for each iteration.