This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

### Publishers

Scribd Selects Books

Hand-picked favorites from

our editors

our editors

Scribd Selects Audiobooks

Hand-picked favorites from

our editors

our editors

Scribd Selects Comics

Hand-picked favorites from

our editors

our editors

Scribd Selects Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

P. 1

FYP Poster|Views: 195|Likes: 2

Published by Lee James O'Riordan

Project Poster

Project Poster

See more

See less

https://www.scribd.com/doc/31556237/FYP-Poster

08/15/2011

text

original

Lee O’ Riordan (loriordan@gmail.com) Supervisor: Dr Kieran Murphy BSc (Hons) Physics with Computing 21 May, 2010 Department of Computing, Maths, and Physics, WIT Abstract

The massive parallelisation capability of GPUs is used to evaluate multi-dimensional integral representation of the partition function arising in the magnetic susceptibility of Heisenberg spin-chain models. A parallel implementation of a Mersenne-Twister pseudo-random number generator was used to generate Monte Carlo estimates of the integral. The resulting OpenCL implementation was 20 times faster than a comparable CPU implementation.

Results Accuracy

The Monte Carlo implementation was compared against known analytical formula in the special case of zero ﬁeld (ξ = 0). Both the relative error and the chi-squared error estimates behaved as expected.

·1019 Monte Carlo estimation Analytic formula ·10−4 Relative Error

Motivation

Z2−spin (0, K)

1

4

4 2 0 -2

2

Interested in modeling the behaviour of chains of N single domain magnetic particles. Important characteristic is the level of interaction between neighbouring particles — this is quantiﬁed by exchange parameters.

J1

1 2

2

-4 0 10 20 J1 30 40 50

J2

3

J3

JN−1

0

N

···

0

10

20 J1

30

40

50

3

4

Exchange parameters are not directly measurable but appear in the partition function representation of the magnetic susceptibility. Given experimental measurements of susceptibility (or simulated data generated with added noise) is it possible to recover the exchange parameter values?

Figure: Partition function (assuming zero-ﬁeld) analytical versus Monte Carlo estimate with exchange parameter 0 < J1 < 50.

Computational Effort

Sample Points TGen [ms] TInt [ms] 0·2 0·5 1·1 2·4 4·4 224·7 431·0 891·9 1745·2 3493·7 Relative Error 8.8E-4 6.9E-5 -7.4E-5 -1.5E-4 -9.0E-5 2.2E-3 1.2E-2 1.0E-3 1.0E-3 2.4E-4

CPU GPU 3

**Problem — Evaluating the Partition Function
**

Evaluation of the partition function is computationally expensive. For a chain of length N the partition function, ZN−Spin, can be represented by the 2N-dimensional integral [2] ZN−Spin = 1 (4π)N

2π θ1 =0 π 2π π

···

φ1 =0 θN =0 φN =0

exp

H kBT

N

**sin θl dθl dφl CPU
**

l=1

**where H, is the Hamiltonian of the system, represented by H kBT
**

N

= −ξ

i=1

cos θi−

1 kB T

N−1

5·0 2097152 4194304 7·3 8388608 17·4 16777216 42·1 33554432 95·3 2097152 44·2 4194304 62·5 8388608 94·4 16777216 173·7 33554432 330·8

GPU

Time [s]

2

1

0 0 1 2 3 Number of sample points ·107

**Jk sin θk sin θk+1 cos φk−φk+1 +cos θk cos θk+1
**

k=1

**Optimisation of OpenCL Implementation
**

The OpenCL implementation is decomposed into workgroups — the size of optimal workgroup is dependent on the number of computational cores (4 on CPU, 128 on GPU).

8,000 Total Kernel Time [ms] 0 100 200 300 Workgroup size 400 500 Total Kernel Time [ms] 1,400 1,200 1,000 800 600 400 200 0 0 50 100 150 Workgroup size 200 250

with ξ a dimensionless ﬁeld parameter and {Jk}N−1 = {J1, J2, . . . , JN−1} the k=1 unknown exchange parameters. Under the special (zero ﬁeld) case of ξ = 0, the partition function can be represented in terms of special functions. However, for arbitrary ξ there is no known simpliﬁcation.

**Solution — OpenCL based Mersenne-Twister
**

For a given ﬁeld parameter, ξ, and exchange parameters, the partition function is evaluated using: 24 1 A Monte Carlo sample-mean integration with up to 2 sample points (in 2N dimensional space) per evaluation. 2 Sample points generated using a parallel Mersenne-Twister pseudo-random number generator with period of 219937 − 1. 3 OpenCL implementation consisted of two main phases: Generation of sample points using Mersenne-Twister. Integration of ZN−Spin using generated sample points. in addition to some housekeep tasks (initial seeding, parallel summation of work-packet statistics, etc.). 4 OpenCL code executed on a ATI Radeon HD5850 GPU. {Jk}N−1, k=1

7,000

6,000

5,000

4,000

Figure: Kernal computational time against workgroup size — CPU (left) and GPU (right).

References

1

2

Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator, Matsumoto & Saito, 1998. Low-ﬁeld susceptibility of classical Heisenberg chains with arbitrary and different nearest-neighbour exchange, P J Cregg and J L Garcia-Palacios and P Svedlindh and K Murphy, 2008.

3 Minute Thesis

Moving the world, one atom at a time!

Thesis

Final Year Research Thesis

- Read and print without ads
- Download to keep your version
- Edit, email or read offline

C++ Lecture Notes

Final Year Research Thesis

A demonstration of Exact String Matching Algorithms with CUDA

CUDA 3.2 Math Libraries Performance

More C++

Optimizing Parallel Reduction

CUDA C Best Practices Guide

Thesis

CUDA Programming Within Mathematica

Cuda c Quickref

Implementation of Fast Fourier Transform (FFT) on Graphics Processing Unit (GPU)

PgCOn 2011 Parallel Image Searching

CUDA C Programming Guide

Cuda Seminar

Presentation CUDA

Structural Analysis at Berkeley

OpenCL_Programming

PostgreSQL OpenCL Procedural Language

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

You've been reading!

NO, THANKS

OK

scribd

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->