BerkeleyGW¶
The BerkeleyGW package is a set of computer codes that calculates the quasiparticle properties and the optical responses of a large variety of materials from bulk periodic crystals to nanostructures such as slabs, wires and molecules. The package takes as input the mean-field results from various electronic structure codes such as the Kohn-Sham DFT eigenvalues and eigenvectors computed with Abinit, Octopus, PARSEC, Quantum ESPRESSO, RMGDFT, Siesta, and TPBW.
Availability and Supported Architectures at NERSC¶
BerkeleyGW is available at NERSC as a provided support level package. Version 4.x includes support for GPUs.
Versions Supported¶
| Perlmutter GPU | Perlmutter CPU |
|---|---|
| 4.x | 4.x |
Use the module avail berkeleygw command to see a full list of available sub-versions.
Application Information, Documentation, and Support¶
BerkeleyGW is freely available and can be downloaded from the BerkeleyGW home page. See the online documentation for the user manual, tutorials, examples, and links to previous workshops and literature articles. For troubleshooting, see the BerkeleyGW Help Forum. For help with issues specific to the NERSC module, please file a support ticket.
Using BerkeleyGW at NERSC¶
Use the module avail command to see which versions are available and
module load <version> to load the environment:
nersc$ module avail berkeleygw
--------------------------- NERSC Modules ---------------------------
berkeleygw/4.0-gcc-12.3 berkeleygw/4.0-nvhpc-23.9 (g,D)
Where:
g: built for GPU
D: Default Module
nersc$ module load berkeleygw/4.0-nvhpc-23.9
Sample Job Scripts¶
See the example jobs page for additional examples and information about jobs.
Tip
In some cases the epsilon module will fail while trying to access
a file in HDF5 format. To prevent this, add
export HDF5_USE_FILE_LOCKING=FALSE to the job script.
Building BerkeleyGW from Source¶
Some users may be interested in modifying the BerkeleyGW build
parameters and/or building BerkeleyGW themselves. BerkeleyGW can be
downloaded as a tarball from the download page.
Build instructions are included in the Makefile and in README.md in the
BerkeleyGW main directory. Before building, one must load the appropriate modules
and create a configuration file in the BerkeleyGW main directory. Sample
configuration files, found in the config directory, can be copied
into the main directory, edited, and renamed as arch.mk. Sample
configuration file headers also contain recommendations of the modules
to load.
Building BerkeleyGW on Perlmutter for GPUs
The following arch.mk file may be used to build BerkeleyGW 4.0
targeting GPUs on Perlmutter:
Building BerkeleyGW on Perlmutter for CPUs
The following arch.mk file may be used to build BerkeleyGW 4.0
targeting CPUs on Perlmutter:
After creating arch.mk in the BGW main directory, build using the following
commands:
Note
As of July 2025, new GPU builds made using the current programming
environment can fail at runtime with floating point exception errors.
To work around, build BerkeleyGW with the cpe/23.03 module loaded,
and then load the PrgEnv-nvidia, cray-fftw, and cpe-23.03 modules
in your job script at runtime.
Related Applications¶
User Contributed Information¶
Please help us improve this page
Users are invited to contribute helpful information and corrections through our GitLab repository.