[Sun Grid Engine]멀티 GPU 딥러닝을 위해서1

Jay
2 min readOct 22, 2019

--

Sun Grid Engine

목적: 단일 PC를 이용하여 얻기 어려운 성능을 여러 PC를 묶어서 사용 할 수 있도록 클러스터를 만드는데, 클러스터를 구성한 PC간의 통신을 원활하게 해줄 수 있는 역할을 함

사용방법

  • .sh파일을 만들어서 qsub *.sh 로 클러스터에 명령을 제출
  • 여기서 .sh파일은 shell script

구성

#!/bin/bash#$ -pe mpi 1
#$ -l gpu=4
#$ -q shared.q
#$ -N mnist_test
#$ -o mnist_test/argtest.out
#$ -e mnist_test/argtest.err
## load environment
source /appl/intel/compilers_and_libraries_2017/linux/bin/compilervars.sh intel64
module load mpi/intel/openmpi-4.0.0
module load cuda/cuda9.0
module load cudampi/openmpi-4.0.0_cuda9.0
module load python/python-3.7.2
## excuting command
python3 argtest.py --value $1 10

원래 shell script에서는 #로 시작하면 무조건 comment처리가 되므로 아무 영향력이 없다. 그러나 Sun Grid Engine의 경우 #$ 로 시작하여 명령을 전달한다.

따라서 위 recipe는 위에는 SGE 세팅, 아래는 일반적인 shell script를 의미하며, python 실행시 필요한 모듈을 부르고, 실행커맨드를 돌린 것

Bash 스크립트의 여러 문법

--

--

Jay
Jay

Written by Jay

Brain Neural Network : Where neuroscience meets machine learning

No responses yet