Programming with threads
Hi-index | 0.00 |
We present the first parallel, object-oriented C++ implementation of the dynamic recursion method. The recursion method is a means to tridiagonalize sparse matrices efficiently and is useful for a wide number of problems in physics. Dynamic recursion describes an optimization of the standard recursion method by operating only with a dynamically varying subset of basis vectors--reducing memory needs and allowing the computation of very large systems. We show how a graph-based data structure permits storing and multiplying sparse matrices and vectors efficiently. We use a tree structure to cope with the dynamically changing basis set, manifested by perpetual creation and elimination of vector components and matrix elements. A "workpile" approach is employed to allow thread-based parallel execution. Systems with up to 107 matrix elements have been simulated with the current implementation and the Anderson metal-insulator transition has been studied as a test-bed project.