📄 readme
字号:
These example programs are realisitic (?) models of actual applicationsor algorithms from chemical-physics. They should make cleanly oncethe Makefile has been appropriately modified (which is doneautomatically for all supported machines). Serial and shared-memoryparallel (and possibly CM and Linda) versions are also available butnot included here. The programs may be run using the csh script demo in this directoryThe script takes a single argument which is the name of the desireddemo (scf, md, mc, jacobi, grid). The script uses a template PROCGRPfile (template.p) to generate the actual PROCGRP file used ... itsmakes a default file if one does not exist ... look in that fordetails.1) Self Consistent Field (scf) This SCF code is a cleaned up and much enhanced version of the onein Szabo and Ostlund. It uses distributed primitive 1s gaussianfunctions as a basis (thus emulating use of s,p,... functions) andcomputes integrals to essentially full accuracy. It is a direct SCF(integrals are computed each iteration using the Schwarz inequalityfor screeing). An atomic denisty is used for a starting guess.Damping and level shifting are used to aid convergence. Rather than complicate the program with code for parsing input theinclude file 'cscf.h' and block data file 'blkdata.f' contain all thedata and thus there are three versions, one for each of the availableproblem sizes. The three sizes correpsond to 15 basis functions (Be),30 basis functions (Be2) and 60 basis functions (tetrahedral Be4).[In addition to these three cases there are files for 60, 120 and 240functions, which are not built by default (type 'make extra' forthese). These are 4, 8 and 16 Be atoms, respectively, arranged in a line.] The O(N**4) step has been parallelized with the assumption thateach process can hold all of the density and fock matrices which isreasonable for up to O(1000) basis functions on most workstationsnetworks and many MIMD machines (e.g. iPSC-i860). The work isdynamically load-balanced, with tasks comprising 10 sets of integrals(ij|**) (see TWOEL() and NXTASK() in scf.f). The work of O(N**3) has not been parallelized, but has beenoptimized to use BLAS and a tweaked Jacobi diagonalizer with dynamicthreshold selection.2) Molecular Dynamics (md) This program bounces a few thousand argon atoms around in a boxwith periodic boundary conditions. Pairwise interactions(Leonard-Jones) are used with a simple integration of the Newtonianequations of motion. This program is derived from the serial code ofDeiter Heerman, but many modifications have been made. Prof. FrankHarris has a related FORTRAN 9X Connection Machine version. The O(N) work constructing the forces has been parallelized, ashas the computation of the pair distribution function. The neighbourlist is computed in parallel every 20 steps with a simple staticdecomposition. This then drives the parallelization of the forcescomputation. To make the simulation bigger increase the value of mmin the parameter statement at the top of md.f (mm=8 gives 2048particles, mm=13 gives 8878). Each particle interacts with about 80others, and the neighbor list is computed for about 130 neighbors toallow for movement before it is updated.3) Monte Carlo (mc) This code evaluates the energy of the simplest explicitlycorrelated electronic wavefunction for the He atom ground state usinga variational monte-carlo method without importance sampling. It iscompletely boringly parallel and for realistic problem sizes givescompletely linear speed-ups for several hunderd processes. You haveto give it the no. of moves to equilibrate the system for (neq) andthe no. of moves to compute averages over (nstep). Apropriate valuesfor a very short run are 200 and 500 respectively.4) Jacobi iterative linear equation solver (jacobi) Uses a naive jacobi iterative algorithm to solve a linearequation. This algorithm is not applicable to real linear equations(sic) and neither is it the most parallel algorithm available. Thecode as implemented here gets 780+ MFLOP on a 128 node iPSC-i860 ... apaltry 30% efficiency, but it is not hard to improve upon either. All the time is spent in a large matrix vector product which isstatically distributed across the processes. You need to give it thematrix dimension (pick as big as will fit in memory).5) Solution of Laplace's equation on a 2-D grid (grid) Solve Laplace's eqn. on a 2-D square grid subject to b.c.s on theboundary. Use 5 point discretization of the operator and a heirarchyof grids with red/black gauss seidel w-relaxation. This is not themost efficient means of solving this equation (probably should use afast-poisson solver) but it provides a 'real-world' example of spatialdecomposition determining the parallel decomposition. It is also theonly example of a full application in C that is included here. If the code is compiled with -DPLOT and run with the option'-plot XXX', where XXX is one of 'value', 'residual' or 'error', thengrids are dumped at intervals to the file 'plot' (in the directory ofprocess zero). This file may be displayed with the X11-R4/5 programxpix. Xpix is not built automatically and must be extracted and builtfrom the shar file in this directory.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -