본문 바로가기
프로그래밍 언어/CUDA

[CUDA] 클러스터의 계산노드 nouveau 문제점 해결

by Physics 2020. 12. 28.
728x90

현재 상황 및 문제점:

1. 현재 상황 

•Diskless cluster로 구성된 마스터 서버와 계산노드들이 존재
      - 해당 Diskless cluster의 디렉토리 구조는 아래의 링크를 참조하기 바람
      - 마스터 서버의 /computation_node/nfsroot를 모든 계산노드들이 NFS 마운트를 통해서 자신의 “/” 루트 디렉토리로 인식
•계산노드와 마스터 서버에 CUDA를 설치하여 GPU를 통한 병렬 계산을 하고자 한다.
•마스터 서버에는 CUDA 11.1 및 Nvidia 그래픽 드라이버가 정상적으로 설치가 되었다.
      -  CUDA 11.1이 설치된 경로: /usr/local/cuda-11.1
•계산노드들은 마스터 서버의 /usr 디렉토리를 자신의 /usr 디렉토리에 NFS 마운트하였기 때문에, CUDA 11.1를 불러올 수 있음

2. 문제점

•문제점 1: 계산노드들의 루트 디렉토리 내에 Nvidia 그래픽 드라이버가 설치되이있지 않으므로, cuda를 정상적으로 실행시킬 수 없음.   
•문제점 2: 계산노드들의 루트 디렉토리 내에 Nvidia graphic driver를 설치하는 경우, nouveau graphic driver에 의해서 문제점이 발생한다.

아래는 계산노드의 /var/log/nvidia-installer.log 중 오류 부분에 대한 내용이다.

ERROR: The Nouveau kernel driver is currently in use by your system.  This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding.  Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf.  Please be sure you have rebooted your system since these files were written.  If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file.  Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

 

위의 nouveau 드라이버에 대한 문제점을 해결하기 위해서, 웹상에서 알려진 방법을 먼저 사용했지만, 소용이 없었고, 위와 같은 에러 메시지가 계속 발생하였다. 위에서 언급한 웹상에서 알려진 일반적인 방법이란 아래와 같다. [1][2][3]

- 우분투 OS에서 nouveau graphic driver 충돌 문제 해결방법

1) /etc/modprobe.d/blacklist.conf 파일 내에 blacklist nouveau 추가 

$ vim /etc/modprobe.d/blacklist.conf
...
# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac

blacklist nouveau

 

2) nouveau 비활성화 

$ echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
$ update-initramfs -u

 

3) 재부팅


위의 방법은 우리와 같은 Diskless cluster가 아닌 일반적인 데스크탑에서 적용이 되는 방법이라 우리의 계산노드의 경우에는 적용이 되지 않은 것 같았다. 즉, 위 방법을 통해서 재부팅을 하게되는 경우, 계산노드들의 nouveau 그래픽 드라이버이 멈춰야 하지만, 재부팅을 하더라도 해당 그래픽 드라이버가 계속 사용된다. 구글링을 통해서 자료를 조사하던 중, 아래의 사이트 [4]에서 힌트를 받아서 우리의 문제점을 해결하게 되었다. 

해결책은 계산노드들이 pxe 부팅을 할 때부터 nouveau 그래픽 드라이버를 시작하지 않도록 설정하는 것이다. 계산노드들의 pxe 부팅 옵션을 설정하기 위해서 아래처럼 /tftpboot/pxelinux.cfg/default에서 APPEND 부분에 "nomodeset"을 추가한다. 

DEFAULT linux
LABEL   linux
KERNEL  vmlinuz-5.4.0-42-generic
APPEND  rootstype=nfs4  root=/dev/nfs4  initrd=initrd.img-5.4.0-42-generic nfsroot=192.168.0.1:/computation_node/nfsroot    ip=dhcp rw nomodeset

 

설정을 변경 후, 마스터 서버의 tftp 서버를 재시작하고 계산노드들을 재부팅하자. 이후 cuda-11.1.run 파일로부터 Ndivia 그래픽 카드를 설치를 하면, 다음과 같이 정상적으로 설치가 된다. 

===========
= Summary =
===========

Driver:   Installed
Toolkit:  Not Selected
Samples:  Not Selected

 

아래는 nvidia-smi 명령어를 통해서 각각의 계산노드에 설치된 그래픽 카드를 확인하였다.  

- 계산노드 1

(base) root@node11:/home/cmt323/download_folder/CUDA# nvidia-smi
Sun Dec 27 22:15:28 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.23.05    Driver Version: 455.23.05    CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 750 Ti  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   50C    P0     2W /  38W |      0MiB /  2001MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

 

- 계산노드 2

cmt323@node09:~$ nvidia-smi
Sun Dec 27 22:23:17 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.23.05    Driver Version: 455.23.05    CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GT 710      Off  | 00000000:01:00.0 N/A |                  N/A |
| N/A   34C    P0    N/A /  N/A |      0MiB /  2001MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Reference
[1] altinukshini.wordpress.com/2011/07/28/how-to-install-nvidia-drivers-in-ubuntu-linux/
[2] kyumdoctor.tistory.com/28
[3] jinyongjeong.github.io/2016/11/22/ubuntu_graphic_driver_install/
[4] https://blog.neonkid.xyz/66

728x90

댓글