2017-03-27 23 views
0

GPU의 토크 할당에 이상한 문제가 있습니다.CUDA_VISIBLE_DEVICES이 0이 아니면 토크 작업에서 GPU를 찾을 수 없습니다

두 개의 NVIDIA GTX Titan X GPU가있는 단일 시스템에서 Torque 6.1.0을 실행 중입니다. 나는 스케줄링을 위해 pbs_sched를 사용하고있다. 다음과 같이 휴식 NVIDIA-SMI 출력은 다음과 같습니다

#PBS -S /bin/bash 
#PBS -l nodes=1:ppn=1:gpus=1:reseterr:exclusive_process 

echo "CUDA_VISIBLE_DEVICES: $CUDA_VISIBLE_DEVICES" 
~/test/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release/deviceQuery 

deviceQuery는 CUDA와 함께 제공되는 유틸리티입니다 다음과 같이

+-----------------------------------------------------------------------------+ 
| NVIDIA-SMI 375.39     Driver Version: 375.39     | 
|-------------------------------+----------------------+----------------------+ 
| GPU Name  Persistence-M| Bus-Id  Disp.A | Volatile Uncorr. ECC | 
| Fan Temp Perf Pwr:Usage/Cap|   Memory-Usage | GPU-Util Compute M. | 
|===============================+======================+======================| 
| 0 GeForce GTX TIT... Off | 0000:03:00.0  On |     N/A | 
| 22% 40C P8 15W/250W |  0MiB/12204MiB |  0% E. Process | 
+-------------------------------+----------------------+----------------------+ 
| 1 GeForce GTX TIT... Off | 0000:04:00.0  Off |     N/A | 
| 22% 33C P8 14W/250W |  0MiB/12207MiB |  0% E. Process | 
+-------------------------------+----------------------+----------------------+ 

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

내가 GPU 할당을 평가하는 간단한 테스트 스크립트가 있습니다. 명령 줄에서 실행하면 두 GPU를 모두 올바르게 찾습니다. 다음과 같이 명령 줄에서 하나의 장치로 제한 할 때 ...

CUDA_VISIBLE_DEVICES=0 ~/test/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release/deviceQuery 
#or 
CUDA_VISIBLE_DEVICES=1 ~/test/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release/deviceQuery 

... 또한 하나 또는 다른 GPU를 올바르게 찾습니다.

qsub를 사용하여 test.sh를 대기열에 제출할 때 다른 작업이 실행되고 있지 않으면 다시 제대로 작동합니다. 여기에 출력이있다 : 그러나

CUDA_VISIBLE_DEVICES: 0 
~/test/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release/deviceQuery Starting... 

CUDA Device Query (Runtime API) version (CUDART static linking) 

Detected 1 CUDA Capable device(s) 

Device 0: "GeForce GTX TITAN X" CUDA Driver Version/Runtime Version   8.0/8.0 CUDA Capability Major/Minor version number: 5.2 Total amount of global memory:     12204 MBytes (12796887040 bytes) (24) Multiprocessors, (128) CUDA Cores/MP:  3072 CUDA Cores GPU Max Clock rate:     1076 MHz (1.08 GHz) Memory Clock rate:        3505 Mhz Memory Bus Width:        384-bit L2 Cache Size:         3145728 bytes Maximum Texture Dimension Size (x,y,z)   1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096) Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers Total amount of constant memory:    65536 bytes Total amount of shared memory per block:  49152 bytes Total number of registers available per block: 65536 Warp size:          32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block:   1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch:   2147483647 bytes Texture alignment:        512 bytes Concurrent copy and kernel execution:   Yes with 2 copy engine(s) Run time limit on kernels:      No Integrated GPU sharing Host Memory:   No Support host page-locked memory mapping:  Yes Alignment requirement for Surfaces:   Yes Device has ECC support:      Disabled Device supports Unified Addressing (UVA):  Yes Device PCI Domain ID/Bus ID/location ID: 0/3/0 Compute Mode: 
    < Exclusive Process (many threads in one process is able to use ::cudaSetDevice() with this device) > 

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX TITAN X Result = PASS 

, (이 = 1 CUDA_VISIBLE_DEVICES 할당 된 경우 즉) 작업이 이미 gpu0에서 실행중인 경우, 작업은 GPU에서 찾을 수 없습니다. 출력 :

CUDA_VISIBLE_DEVICES: 1 
~/test/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release/deviceQuery Starting... 

CUDA Device Query (Runtime API) version (CUDART static linking) 

cudaGetDeviceCount returned 38 
-> no CUDA-capable device is detected 
Result = FAIL 

누구나 무슨 일이 일어나고 있는지 알고 계십니까?

+0

6.1-dev에서 많은 GPU/CUDA 수정 사항을 보았습니다. 그 지점에 대해 그것이 어떻게 행동하는지보기 위해 노력할 가치가 있습니다. – clusterdude

+0

감사합니다. @clusterdude. 나는 6.1-dev를 사용할 수 없었지만 6.1.1에도 같은 문제가있다. – Shaun

답변

0

나는 내 자신의 문제를 해결했다고 생각하지만, 불행히도 한 번에 두 가지를 시도했다. 돌아가서 어떤 문제가 해결되었는지 확인하고 싶지 않습니다. 다음 중 하나입니다 :

  1. 빌드하기 전에 토크의 configure 스크립트에서 --enable-cgroups 옵션을 제거하십시오.

  2. 설치 토크에서 다음 단계를 실행중인 프로세스 :

    만들 패키지

    쉬 torque-package-server-linux-x86_64.sh --install

    쉬 토크 패키지 찰떡 궁합 linux-x86_64.sh --install

    쉬 torque-package-clients-linux-x86_64.sh --install

두 번째 옵션의 경우 토크 설치 지침에이 단계가 제대로 문서화되어 있습니다. 그러나, 난 단지 하나의 노드 (계산 노드와 서버가 동일한 기계)를 가지고 간단한 설치가 있습니다. 나는 'make install'이 그 패키지가 설치 한 모든 것을 그 단일 노드에 대해해야한다고 생각했지만, 아마도 나는 잘못 생각했다.