2012년 12월 29일 토요일

font change in xterm


Create or Modify ~/.Xdefaults

and

Input added as follows:

XTerm*faceName: Dejavu Sans Mono


2012년 12월 28일 금요일

openmpi install


  1. ssh 공개키 기반으로 설정(http://sehwa4444.egloos.com/2815833)
    1. mpirun 명령어를 실행 시킬 node 에서 수행하면 됨
    2. 키 생성
      1. ssh-keygen -t dsa
      2. chmod 600 .ssh/id_dsa
    3. pub 파일 원격 host에 전송
      1. scp .ssh/id_dsa.pub node0@node1:
      2. ssh node0@node1 mkdir .ssh
      3. ssh node0@node1 chmod 700 .ssh
      4. ssh node0@node1 mv id_dsa.pub .ssh/authorized_keys
      5. ssh node0@node1 chmod 644 .ssh/authorized_keys
  2. openmpi 관련 프로그램 설치(모든 노드 공통 사항)
    1. apt-get install openmpi-bin openmpi-doc libopenmpi-dev
  3. host 파일 수정
    1. mpirun 명령어를 실행 시킬 node 에만 적용 하면 됨
    2. #  vim /etc/hosts
      192.168.206.128 node0
      192.168.206.129 node1
      192.168.206.130 node2
  4. mpi 클러스터 실행
    1. mpirun -np 3 -host node0,node1,node2 hostname
      또는
      mpirun -np 3 --hostfile host_lists hostname
      으로 실행 host_lists 파일에는 실행하고자 하는 노드들을 지정
    2. # cat host_lists
      node0 slots=1 max_slots=4
      node1 slots=1 max_slots=4
      node2 slots=1 max_slots=4
    3. 실행 결과
      node0-virtual-machine
      node1-virtual-machine
      node2-virtual-machine

모든 노드들은 동일한 사용자 계정이 있어야 한다(각 노드(node0, node1, node2)에는 node0 라는 사용자 계정이 있음).
또, 실행 하고자 하는 프로그램이 각각 노드들에서 단독으로 실행 할 수 있는 환경이이야 한다. 즉, 리소스와 경로들이 노드마다 상이하면 안된다.
따라서 NFS 로 모든 노드들이 접근 할 수 있는 폴더를 만들어서 사용하면 된다.
 

qmake + qt + cuda + win32 + linux


# CUDA configure <<
CUDA_SOURCES = pluralscatter.cu
cuda.input = CUDA_SOURCES
NVCC_FLAGS = -arch=sm_20 -c

CONFIG(debug, debug|release) {
    DESTDIR = debug/
    NVCC_FLAGS += -G -g
}
CONFIG(release, debug|release) {
    DESTDIR = release/
    NVCC_FLAGS += -O3
}

win32 {
    QMAKE_LIBDIR += $(CUDA_PATH)/lib/Win32
    LIBS += cuda.lib cudart.lib curand.lib
    NVCC = $(CUDA_PATH)\\bin\\nvcc.exe
    NVCC_FLAGS += -m32 --cl-version 2010 --use-local-env
    CONFIG(debug, debug|release) {
        NVCC_FLAGS += -Xcompiler \"/EHsc /nologo /Od /Zi /MDd\"
    }
    CONFIG(release, debug|release) {
        NVCC_FLAGS += -Xcompiler \"/EHsc /nologo /O2 /Zi /MD\"
    }
    DESTDIR_TARGET = $$DESTDIR${QMAKE_FILE_BASE}_cuda.obj
}
unix {
    QMAKE_LIBDIR += $(CUDA)/lib64
    LIBS += -lcuda -lcudart -lcurand
    NVCC = $(CUDA)/bin/nvcc
    NVCC_FLAGS += -m64
    DESTDIR_TARGET = ${QMAKE_FILE_BASE}_cuda.o
}

cuda.commands = $$NVCC $$NVCC_FLAGS ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
cuda.output = $$DESTDIR_TARGET
QMAKE_EXTRA_COMPILERS += cuda
# CUDA configure >>