Interface to the BrianQC GPU module by the BrianQC team¶
Code author: Gergely Kis
Section author: Gergely Kis
Please contact BrianQC at https://brianqc.com/ to download the BrianQC GPU module and obtain a license.
Note that there are several prerequisites for using BrianQC, including having a supported GPU available in the computing node and having the proper GPU drivers installed. Please refer to the BrianQC manual for a full list of prerequisites.
When installing BrianQC, choose the SDK installation by setting the
BRIANQC_SDK_INSTALL envoronment variable to 1.
Building BrianQC’s user-built components¶
After the installation, build BrianQC’s example and sample programs, which also creates the wrapper library and CMake configuration files required to build PSI4 with BrianQC.
Create a build directory to keep the source tree clean.
cd <brianqc_install_path> mkdir build cd build
Build the examples and samples.
Test the installation by starting a small calculation. Make sure to set the
BRIANQC_INSTALL_PATHenvironment variable to <brianqc_install_path>!
export BRIANQC_INSTALL_PATH=<brianqc_install_path> bin/sample_hf_and_dft --molecule ../share/qc_molecules/cis-decalin.raw --basis ../share/basis_sets/cc-pvdz
Building PSI4 with BrianQC¶
When CMake-ing PSI4, set the ENABLE_BrianQC CMake variable to 1 and set the BrianQC_DIR CMake variable to the path where BrianQC’s components have been built (usually <brianqc_install_path>/build), then build PSI4 normally.
Using BrianQC from PSI4¶
To use BrianQC, the
BRIANQC_INSTALL_PATH environment variable
must be set to the full path of your BrianQC installation.
There are two ways to enable BrianQC for a specific calculation:
setting the BRIANQC_ENABLE input option to True;
BRIANQC_ENABLEenvironment variable to 1.
If both the input option and the environment variable are specified, then the environment variable takes precedence.
When to enable BrianQC¶
The operation of BrianQC is transparent from a user’s point of view; every internal computation is either performed by PSI4 (if unsupported by BrianQC), or taken over by BrianQC, yielding the same result to within the required precision. In particular, BrianQC will respect all of PSI4’s usual precision parameters, like INTS_TOLERANCE and E_CONVERGENCE.
BrianQC can speed up a number of internal computations, including Fock and gradient computation. Thus, BrianQC will speed up any calculation involving those terms, such as
HF and DFT single point energies
HF and DFT geometry optimizations
HF and DFT frequency analysis
Note that not every term of every calculation can be handled by BrianQC, thus, the actual speedup depends on the specifics of the calculation.
Necessary and recommended option values¶
To ensure that a calculation works with BrianQC, the following options need to be set when enabling BrianQC:
BrianQC currently only handles the C1 molecular symmetry point group. Thus, if the molecule has any symmetries (which PSI4 would detect by default), the input geometry must contain the line
symmetry c1to force PSI4 to disregard the symmetry.
To achieve peak performance, the following settings are recommended when enabling BrianQC:
By default, PSI4 uses density-fitted preiterations for SCF, which BrianQC doesn’t handle yet. To ensure that no non-BrianQC-accelerated iterations are performed, disable the preiterations by setting DF_SCF_GUESS to False.
By default, PSI4 uses a disk-based Fock building, but BrianQC currently only accelerates direct Fock builds. To ensure that Fock building is accelerated by BrianQC, set SCF_TYPE to direct.
Whether to enable using the BrianQC GPU module
Toggle for type of BrianQC installation. See https://s3.amazonaws.com/streamnovation-brianqc-manual/BrianQC_Manual_v1_1_0.pdf for details.
Location of BrianQC installation. See https://s3.amazonaws.com/streamnovation-brianqc-manual/BrianQC_Manual_v1_1_0.pdf for details.
Runtime toggle of whether to use BrianQC.