|
1 | 1 | # Quantum ESPRESSO
|
2 | 2 |
|
3 |
| -https://www.quantum-espresso.org |
4 |
| - |
5 |
| -An environment that provides the latest version of Quantum ESPRESSO, along with the libraries and tools required to build a different or custom version of Quantum ESPRESSO. |
6 |
| -At the moment a GPU-build environment is provided without a ScaLAPACK. |
7 |
| - |
8 |
| -The following environment views are provided: |
9 |
| - |
10 |
| -=== "GH200" |
11 |
| - |
12 |
| - * default : QuantumESPRESSO/7.3.1 itself + dependencies |
13 |
| - * develop : only dependencies |
14 |
| - |
15 |
| - The following modules are provided: |
16 |
| - |
17 |
| - * cmake/3.27.7 |
18 |
| - * nvhpc/24.1 |
19 |
| - * quantum-espresso/7.3.1 |
20 |
| - * cray-mpich/8.1.29 |
21 |
| - * fftw/3.3.10 |
22 |
| - * git/2.42.0 |
23 |
| - * nvpl-lapack/0.2.0 |
24 |
| - * gcc/12.3.0 |
25 |
| - * libxc/6.2.2 |
26 |
| - * nvpl-blas/0.1.0 |
27 |
| - |
28 |
| -=== "A100" |
29 |
| - |
30 |
| - * default : QuantumESPRESSO/7.1 itself + dependencies |
31 |
| - * develop : only dependencies |
32 |
| - |
33 |
| - The following modules are provided: |
34 |
| - |
35 |
| - * cmake/3.26.3 |
36 |
| - * cray-mpich/8.1.25-nvhpc |
37 |
| - * cuda/11.8.0 |
38 |
| - * fftw/3.3.10 |
39 |
| - * gcc/11.3.0 |
40 |
| - * libxc/5.2.3 |
41 |
| - * nvhpc/22.11 |
42 |
| - * openblas/0.3.23 |
43 |
| - * patchelf/0.17.2 |
44 |
| - * quantum-espresso/7.1 |
45 |
| - |
46 |
| - |
47 |
| -# Building a custom version |
48 |
| - |
49 |
| -## Using modules |
50 |
| - |
51 |
| -=== "GH200" |
52 |
| - |
53 |
| - ```bash |
54 |
| - uenv start quantumespresso/v7.3.1 |
55 |
| - uenv modules use |
56 |
| - module load cmake \ |
57 |
| - fftw \ |
58 |
| - nvhpc \ |
59 |
| - nvpl-lapack \ |
60 |
| - nvpl-blas \ |
61 |
| - cray-mpich \ |
62 |
| - netlib-scalapack \ |
63 |
| - libxc |
64 |
| - |
65 |
| - mkdir build && cd build |
66 |
| - FC=mpif90 CXX=mpic++ CC=mpicc cmake .. \ |
67 |
| - -DQE_ENABLE_MPI=ON \ |
68 |
| - -DQE_ENABLE_OPENMP=ON \ |
69 |
| - -DQE_ENABLE_SCALAPACK:BOOL=OFF \ |
70 |
| - -DQE_ENABLE_LIBXC=ON \ |
71 |
| - -DQE_ENABLE_CUDA=ON \ |
72 |
| - -DQE_ENABLE_PROFILE_NVTX=ON \ |
73 |
| - -DQE_CLOCK_SECONDS:BOOL=OFF \ |
74 |
| - -DQE_ENABLE_MPI_GPU_AWARE:BOOL=OFF \ |
75 |
| - -DQE_ENABLE_OPENACC=ON |
76 |
| - make -j20 |
77 |
| - ``` |
78 |
| - |
79 |
| -=== "A100" |
80 |
| - |
81 |
| - ```bash |
82 |
| - uenv start quantumespresso/v7.1 |
83 |
| - uenv modules use |
84 |
| - module load cmake \ |
85 |
| - cray-mpich |
86 |
| - cuda \ |
87 |
| - fftw \ |
88 |
| - gcc \ |
89 |
| - libxc \ |
90 |
| - nvhpc \ |
91 |
| - openblas |
92 |
| - mkdir build && cd build |
93 |
| - FC=mpif90 CXX=mpic++ CC=mpicc cmake .. \ |
94 |
| - -DQE_ENABLE_MPI=ON \ |
95 |
| - -DQE_ENABLE_OPENMP=ON \ |
96 |
| - -DQE_ENABLE_SCALAPACK:BOOL=OFF \ |
97 |
| - -DQE_ENABLE_LIBXC=ON \ |
98 |
| - -DQE_ENABLE_CUDA=ON \ |
99 |
| - -DQE_CLOCK_SECONDS:BOOL=OFF \ |
100 |
| - -DQE_ENABLE_MPI_GPU_AWARE:BOOL=OFF \ |
101 |
| - -DQE_ENABLE_OPENACC=ON |
102 |
| - make -j20 |
103 |
| - ``` |
104 |
| - |
105 |
| -## Using spack |
106 |
| - |
107 |
| -1. Clone spack using the same version that has been used to build the uenv. |
108 |
| -```bash |
109 |
| -uenv start quantumespresso/v7.3.1 |
110 |
| -# clone the same spack version as has been used to build the uenv |
111 |
| -git clone -b $(jq -r .spack.commit /user-environment/meta/configure.json) $(jq -r .spack.repo /user-environment/meta/configure.json) $SCRATCH/spack |
112 |
| -``` |
113 |
| - |
114 |
| -2. Activate spack with the uenv configured as upstream |
115 |
| -```bash |
116 |
| -# ensure spack is using the uenv as upstream repository (always required) |
117 |
| -export SPACK_SYSTEM_CONFIG_PATH=/user-environment/config |
118 |
| -# active spack (always required) |
119 |
| -. $SCRATCH/spack/share/spack/setup-env.sh |
120 |
| -``` |
121 |
| - |
122 |
| -3. Create an anonymous environment for QE |
123 |
| -```bash |
124 |
| -spack env create -d $SCRATCH/qe-env |
125 |
| -spack -e $SCRATCH/qe-env add quantum-espresso%nvhpc +cuda |
126 |
| -spack -e $SCRATCH/qe-env config add packages:all:prefer:cuda_arch=90 |
127 |
| -spack -e $SCRATCH/qe-env develop -p /path/to/your/QE-src quantum-espresso@=develop |
128 |
| -spack -e $SCRATCH/qe-env concretize -f |
129 |
| -``` |
130 |
| -Check the output of `spack concretize -f`. All dependencies should have been picked up from spack upstream, marked eiter by a green `[^]` or `[e]`. |
131 |
| -Next we create a local filesystem view, this instructs spack to create symlinks for binaries and libraries in a local directory `view`. |
132 |
| -```bash |
133 |
| -spack -e $SCRATCH/qe-env env view enable view |
134 |
| -spack -e $SCRATCH/qe-env install |
135 |
| -``` |
136 |
| -To recompile QE after editing the source code re-run `spack -e $SCRATCH/qe-env install`. |
137 |
| - |
138 |
| -4. Run `pw.x` using the filesystem view generated in 3. |
139 |
| -```bash |
140 |
| -uenv start quantumespresso/v7.3.1 |
141 |
| -MPICH_GPU_SUPPORT_ENABLED=1 srun [...] $SCRATCH/qe-env/view/bin/pw.x < pw.in |
142 |
| -``` |
143 |
| -Note: The `pw.x` is linked to the uenv, it won't work without activating the uenv, also it will only work with the exact same version of the uenv. The physical installation path is in `$SCRATCH/spack`, deleting this directory will leave the anonymous spack environment created in 3. with dangling symlinks. |
144 |
| - |
145 |
| - |
146 |
| - |
147 | 3 |
|
| 4 | +This page has moved to the [CSCS Documentation](https://eth-cscs.github.io/cscs-docs/software/sciapps/quantumespresso/#building-qe-from-source) |
148 | 5 |
|
0 commit comments