Debian Codegraph @

tcgmsg/examples/README

raw
1 TCGMSG Examples
2 ===============
3
4 These example programs are realisitic (?) models of actual applications or
5 algorithms from chemical-physics. They should make cleanly once the Makefile
6 has been appropriately modified (which is done automatically for all supported
7 machines). Serial and shared-memory parallel (and possibly CM and Linda)
8 versions are also available but not included here.
9
10 The programs may be run using the csh script demo in this directory The script
11 takes a single argument which is the name of the desired demo (scf, md, mc,
12 jacobi, grid). The script uses a template PROCGRP file (template.p) to
13 generate the actual PROCGRP file used ... its makes a default file if one does
14 not exist ... look in that for details.
15
16 Self Consistent Field (scf)
17 ---------------------------
18
19 This SCF code is a cleaned up and much enhanced version of the one in Szabo
20 and Ostlund. It uses distributed primitive 1s gaussian functions as a basis
21 (thus emulating use of s,p,... functions) and computes integrals to
22 essentially full accuracy. It is a direct SCF (integrals are computed each
23 iteration using the Schwarz inequality for screeing). An atomic denisty is
24 used for a starting guess. Damping and level shifting are used to aid
25 convergence.
26
27 Rather than complicate the program with code for parsing input the include
28 file 'cscf.h' and block data file 'blkdata.f' contain all the data and thus
29 there are three versions, one for each of the available problem sizes. The
30 three sizes correpsond to 15 basis functions (Be), 30 basis functions (Be2)
31 and 60 basis functions (tetrahedral Be4).
32
33 [In addition to these three cases there are files for 60, 120 and 240
34 functions, which are not built by default (type 'make extra' for
35 these). These are 4, 8 and 16 Be atoms, respectively, arranged in a line.]
36
37 The O(N**4) step has been parallelized with the assumption that each process
38 can hold all of the density and fock matrices which is reasonable for up to
39 O(1000) basis functions on most workstations networks and many MIMD machines
40 (e.g. iPSC-i860). The work is dynamically load-balanced, with tasks
41 comprising 10 sets of integrals (ij|**) (see TWOEL() and NXTASK() in scf.f).
42
43 The work of O(N**3) has not been parallelized, but has been optimized to use
44 BLAS and a tweaked Jacobi diagonalizer with dynamic threshold selection.
45
46 Molecular Dynamics (md)
47 -----------------------
48
49 This program bounces a few thousand argon atoms around in a box with periodic
50 boundary conditions. Pairwise interactions (Leonard-Jones) are used with a
51 simple integration of the Newtonian equations of motion. This program is
52 derived from the serial code of Deiter Heerman, but many modifications have
53 been made. Prof. Frank Harris has a related FORTRAN 9X Connection Machine
54 version.
55
56 The O(N) work constructing the forces has been parallelized, as has the
57 computation of the pair distribution function. The neighbour list is computed
58 in parallel every 20 steps with a simple static decomposition. This then
59 drives the parallelization of the forces computation. To make the simulation
60 bigger increase the value of mm in the parameter statement at the top of md.f
61 (mm=8 gives 2048 particles, mm=13 gives 8878). Each particle interacts with
62 about 80 others, and the neighbor list is computed for about 130 neighbors to
63 allow for movement before it is updated.
64
65 Monte Carlo (mc)
66 ----------------
67
68 This code evaluates the energy of the simplest explicitly correlated
69 electronic wavefunction for the He atom ground state using a variational
70 monte-carlo method without importance sampling. It is completely boringly
71 parallel and for realistic problem sizes gives completely linear speed-ups for
72 several hunderd processes. You have to give it the no. of moves to
73 equilibrate the system for (neq) and the no. of moves to compute averages over
74 (nstep). Apropriate values for a very short run are 200 and 500 respectively.
75
76 Jacobi iterative linear equation solver (jacobi)
77 ------------------------------------------------
78
79 Uses a naive jacobi iterative algorithm to solve a linear equation. This
80 algorithm is not applicable to real linear equations (sic) and neither is it
81 the most parallel algorithm available. The code as implemented here gets 780+
82 MFLOP on a 128 node iPSC-i860 ... a paltry 30% efficiency, but it is not hard
83 to improve upon either.
84
85 All the time is spent in a large matrix vector product which is statically
86 distributed across the processes. You need to give it the matrix dimension
87 (pick as big as will fit in memory).
88
89 Solution of Laplace's equation on a 2-D grid (grid)
90 ---------------------------------------------------
91
92 Solve Laplace's eqn. on a 2-D square grid subject to b.c.s on the boundary.
93 Use 5 point discretization of the operator and a heirarchy of grids with
94 red/black gauss seidel w-relaxation. This is not the most efficient means of
95 solving this equation (probably should use a fast-poisson solver) but it
96 provides a 'real-world' example of spatial decomposition determining the
97 parallel decomposition. It is also the only example of a full application in
98 C that is included here.
99
100 If the code is compiled with -DPLOT and run with the option '-plot XXX', where
101 XXX is one of 'value', 'residual' or 'error', then grids are dumped at
102 intervals to the file 'plot' (in the directory of process zero). This file
103 may be displayed with the X11-R4/5 program xpix. Xpix is not built
104 automatically and must be extracted and built from the shar file in this
105 directory.