stgf is a community code employed for outer-region R-matrix calculations, describing electron-impact collisional processes. It is widely recognised that the original version of stgf was written by M.J. Seaton in 1983, but through constant refinement over the next decades by worldwide contributors has evolved into its current form that more reflects modern coding practice and current computer architectures. Despite its current wide acceptance, it was never formally published.Therefore, we present an updated high-performance parallel version of pstgf, that balances the requirements of small university clusters, yet can exploit the computational power of cutting edge supercomputers. There are many improvements over the original stgf, but most noticeably, the full introduction of MQDT options that provide subsequent integration with ICFT (Intermediate Coupling Frame Transformation) codes, and for either Breit–Pauli/DARC (Dirac Atomic R-matrix Codes), better load balancing, high levels of vectorisation and simplified output. Semantically, the program is full Fortran 90 in conjunction with MPI (Message Passing Interface) though has CUDA Fortran options for the most numerically intensive code sections. Program summaryProgram Title: RMATRX-PSTGFCPC Library link to program files:http://dx.doi.org/10.17632/3j55fmr86g.1Licensing provisions: GNU Lesser General Public License v2.1Programming language: Fortran 90Nature of problem: The R-matrix outer region code, pstgf directly calculates various electron-impact driven processes such as excitation and ionisation, or provides K-matrices for input for subsequent ICFT, differential or magnetic sub-level codes. As the problem size increases, there is an associated increase in the input/output, the numerical computation and unbalanced workload, especially for electron-impact energies where the number of open-channels is of a similar size to the number of closed. The code has been significantly modified to address these issues.pstgf interfaces the R-matrix inner region with the outer region, with the R-matrix acting as intermediary between the two regions. The outer region expresses an electron moving in the multi-pole expansion of the target and predominantly employs Coulomb functions, perturbed or otherwise to achieve this. This is a computationally expensive task, as the R-matrix must be formed for every energy point of every partial wave.Solution method: An approach that permutes both the partial wave and energy of the incident electron has been implemented. In this version, each processor does not calculate the same incident energy point for each partial wave, but rather distributes all energy points across all processors. This achieves better load-balancing of the work between cores and avoids the case where an overloaded single processor has to always calculate in the energy range where there are approximately the same number of half-open or half-closed channels, which is numerically intensive.Additional comments including restrictions and unusual features: Dimension parameters used to define arrays and matrices within pstgf (PARAM file) have been removed, all array dimensions are dynamically allocatable based upon the H.DAT file and set to the exact dimension. A CUDA subroutine for matrix multiplications using GPUs has been included, it can be activated or deactivated commenting this module in the source. Users of serial version stgf or older parallel versions of pstgf can move to current version without any modification in the input files.[1] M.J. Seaton, Coulomb functions for attractive and repulsive potentials and for positive and negative energies, Comp. Phys. Comm. 146 (2) (2002) 225–249. doi:https://doi.org/10.1016/S0010-4655(02)00275-8.[2] M.J. Seaton, Quantum defect theory, Rep. Prog. Phys. 46 (2) (1983) 167.doi:https://doi.org/10.1088/0034-4885/46/2/002.
Read full abstract