Update CMake to formally name the five levels of ABACUS executables (Useful Information for knowing Five Compilation Levels of ABACUS)#7236
Merged
mohanchen merged 1 commit intodeepmodeling:developfrom Apr 13, 2026
Conversation
Critsium-xy
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update CMake to formally name the five levels of ABACUS executables.
ABACUS Compilation Guide: From Basic to Advanced
1. Basic Concepts of Compilation
Compilation is the process of converting source code into executable files, which mainly includes the following steps:
Preprocessing – handles macro definitions and header file inclusions
Compilation – converts source code into assembly code
Assembly – converts assembly code into machine code
Linking – links multiple object files into an executable file
For large-scale scientific computing software such as ABACUS, the compilation process is more complex and requires handling various dependencies and configuration options.
2. Five Compilation Levels of ABACUS
ABACUS provides five compilation levels, from basic to advanced, to meet different computing requirements.
Level 1: pw (Plane-Wave)This level uses only the plane-wave basis set and disables the linear combination of atomic orbitals (LCAO). It is suitable for simple plane-wave calculations with fast speed and relatively low memory usage.
Level 2: basicThis level enables LCAO and provides basic quantum chemistry calculation functions. It is designed for fundamental electronic structure calculations of molecules and solids.
Level 3: std (Standard)Based on the Basic level, this level adds support for LibRI libraries for hybrid functional calculations. It is suitable for accurate electronic structure calculations and spectral simulations.
Level 4: ml (Machine Learning)Based on the Basic level, this level integrates machine learning algorithms. It is used for large-scale material screening and property prediction accelerated by machine learning.
Level 5: maxThis is the full-featured version that integrates all functions of the Std and ML levels, with testing enabled. It is intended for development and debugging of new features.
3. Naming Rules of Compilation Scripts
Numbers 1–5 represent the five compilation levels (PW, Basic, Std, ML, MAX).
Letters indicate parallelism and function types:
ser: serial versionpara: parallel versiongpu: GPU version4. Core Dependencies
Core Dependencies
FFTW3 for fast Fourier transform
BLAS / LAPACK for linear algebra operations
ScaLAPACK for parallel linear algebra
MPI for parallel computing
OpenMP for multi-threading
LibXC for exchange-correlation functionals
Advanced Dependencies
ELPA for eigenvalue solvers in LCAO
Cereal for serialization
LibRI and LibComm for hybrid functionals (Std, MAX)
LibTorch and libnpy for machine learning (ML, MAX)
CUDA for GPU acceleration
5. Version Selection
PW: Low hardware requirements; simple electronic structure calculations.
Basic: Medium requirements; standard LCAO calculations.
Std: Medium–high requirements; hybrid functional calculations.
ML: High requirements; machine learning–accelerated computations.
MAX: High requirements; full features for development and testing.
6. Compilation Workflow
Install dependencies (compiler, CMake, math libraries, etc.).
Create a build directory and run CMake with corresponding options.
Compile with make -j.
Install with make install.
7. Summary
ABACUS uses a five-level compilation system (PW, Basic, Std, ML, MAX) to support flexible configurations from basic to full functions. Correct compilation settings ensure computational efficiency and accuracy for materials simulation and scientific research.