# Quantum Espresso-6.4 (GPU 버전) 설치

이 문서에서는 KISTI 뉴론 시스템에서 qe-6.4버전을 컴파일하는 방법을 예시로 소개합니다.

## **가. 설치 환경**

| 구분            | 내용                    |
| ------------- | --------------------- |
| 대상 시스템        | 뉴론                    |
| OS Version    | 리눅스 / CentOS 7.9      |
| CPU           | Intel Xeon E5-2670 v2 |
| 컴파일러          | PGI 2019 Version      |
| MPI           | Openmpi 3.1.0 Version |
| <p>기타<br></p> | CUDA 10.0             |

## **나. 설치 전 환경 설정**

뉴론시스템에서는 PATH, LD\_LIBRARY\_PATH 설정을 손쉽게 하기 위해서 환경설정 툴인 Module이 구성되어 있으며 이하 설치 소개에서는 module load 를 이용한 환경설정 방법으로 안내 드립니다.

**\[ 환경 설정 ]**

```shell-session
$ module load pgi/19.1 cuda/10.0 cudampi/openmpi-3.1.0
```

## **다. 설치 과정**

설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략합니다. (다운로드 : <https://gitlab.com/QEF/q-e/-/releases>)

\[설치과정]

```shell-session
$ tar xvf q-e-gpu-qe-gpu-6.4a1.tar.gz
$ cd q-e-gpu-qe-gpu-6.4a1
$ export F90FLAGS="-fast -Ktrap=fp -Mcache_align -Mpreprocess -Mlarge_arrays -mp -tp=px"
$ export FFLAGS="-fast -Ktrap=fp -mp -tp=px"
$ ./configure --prefix=${HOME}/QE/6.4 \
--with-cuda=/apps/cuda/10.0 --with-cuda-cc=70 --with-cuda-runtime=10.0 --enable-openmp
$ vi make.inc

-----아래 내용으로 수정 -----
CFLAGS = -fast -tp=px -Mpreprocess $(DFLAGS) $(IFLAGS)
FOX_FLAGS = -fast -tp=px -Mcache_align -Mpreprocess -Mlarge_arrays

$ make pw
```

## 라.뉴론에서 QE 사용을 위한 SLURM 작업 스크립트 예제

뉴론에서 작업을 제출하기 위해서는 SLURM 작업 스크립트를 사용하여야 하며 작업 스크립트 예시는 아래와 같습니다. (작업 스크립트 예제 경로: /apps/applications/test\_samples/QE/)

\[작업스크립트 예제(qe\_job.sh)]

```bash
#!/bin/sh
#SBATCH -J "QE-GPU"
#SBATCH -p cas_v100_2
#SBATCH -N 1
#SBATCH -n 20
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH -t 00:30:00
#SBATCH --gres=gpu:2
#SBATCH --comment qe

ulimit -a unlimited

export NO_STOP_MESSAGE=yes

## Setting for gpu acceleration off

#### export USEGPU=no

# QE run parameters
NGPU=2

NPOOL=1

# Node-specific parameters
GPU_PER_SOCKET=1

CORES_PER_SOCKET=10

NCORE_PER_RANK=$(($/$))

export OMP_NUM_THREADS=$

export MKL_NUM_THREADS=$

srun --cpu_bind=none -n $ -c $ pw.x -input ./pw.in -npool $
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-ksc.gitbook.io/blog/install/neuron/quantum-espresso/quantum-espresso-6.4-install-gpu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
