### Module (최신 3.2.10) 2016/3/22일 기준
http://modules.sourceforge.net/
### 공식 페이지 인듯
https://sourceforge.net/projects/modules/files/
### 소스포지 다운로드 하는곳
### RedHat 7은 CD mount 해서 yum으로 설치 가능
[root@node001 ~]# echo $MODULESHOME
/usr/share/Modules ### module home 경로 확인
[root@node001 ~] cd $MODULESHOME
[root@node001 Modules]# ls
bin init modulefiles
### init/.modulespath 파일에서 modulefile 불러오는 경로 지정함. 경로 추가만 하면됨.
### modulefiles/ 는 modulefile 있는곳. 다른곳 지정 가능함.
### 종류 별로 폴더를 만들어서 관리하면 편할듯.
[root@node001 init]# module av
---------------------------------- /usr/share/Modules/modulefiles ----------------------------------
dot module-git module-info modules null use.own
------------------------------------- /tmp/Modules/modulefiles -------------------------------------
compiler/gcc-4.8.2 mpi/intel-5.1.3 mpi/openmpi-1.10.2
compiler/icc-16.0.2 mpi/mvapich2-2.1
### 아래 내용은 compuiler와 mpi(mpich) 설정 사항 참고하면 됨.
[root@head001 compiler]# cat gcc-4.8.5
#%Module1.0###################################################################
proc ModulesHelp { } {
puts stderr "\tAdditional info:"
puts stderr "\t 1. Major environment variables is set up like these:"
puts stderr "\t CC=gcc CXX=g++ FC=gfortran F90=gfortran"
}
module-whatis "This module is for use of GNU compiler 4.8.5"
# Tcl script use only
set version 4.8.5
set gnu_prefix /applic/compilers/gcc
set gcc_prefix /applic/compilers/gcc/$version
setenv COMPILER_PREFIX $gnu_prefix
setenv COMPILER gnu
setenv COMPILER_VER $version
setenv FORTRAN_TYPE gfortran
setenv CC gcc
setenv CXX g++
setenv FC gfortran
setenv F90 gfortran
# there may be a bug in modules where it sets MANPATH to /usr/man?
# iff MANPATH isn't already defined.. weird
catch {set cur_manpath $env(MANPATH)}
if {![info exists cur_manpath]} { setenv MANPATH /usr/share/man }
#this is so that we can easily figure out the directory that mpi lives in as it
#is a subdirectory to the compiler
setenv MPIBASEDIR $gcc_prefix/mpi
### MPI 경우 compiler가 사전에 PATH가 잡혀있는지 확인하는 부분이 추가되어있음.
[root@head001 mpi]# cat mpich-3.2
#%Module1.0###################################################################
proc ModulesHelp { } {
puts stderr "\tuse example:"
puts stderr "\t $ module load compiler/gcc-4.8.5 [module-info name]\n"
}
# prereq of compiler (makes sure COMPILER and COMPILER_VER exist)
catch {set COMPILER $env(COMPILER)}
catch {set COMPILER_VER $env(COMPILER_VER)}
if {![info exists COMPILER] || ![info exists COMPILER_VER]} {
# we should never get here... _could_ default to loading compiler/gcc?
puts stderr "\t[module-info name] Load Error: COMPILER env vars were not properly defined"
puts stderr "\t[module-info name] is need a compiler"
puts stderr "\tPlease set environment using the $ module load compiler/gcc-4.8.5 [module-info name]\n"
break
exit 1
}
# for Tcl script use only
set name mpich
set version 3.2
set prefix $env(MPIBASEDIR)/$name/$version
if {![file exists $prefix]} {
puts stderr "\t[module-info name] Load Error: $prefix does not exist"
break
exit 1
}
module-whatis "loads the $name environment"
setenv MPI $name
setenv MPI_VER $version
setenv MPICH_HOME $prefix
setenv MPIHOME $prefix
setenv MPI_HOME $prefix
prepend-path PATH $prefix/bin
prepend-path LD_LIBRARY_PATH $prefix/lib
append-path MANPATH $prefix/share/man
# MVAPICH2 CPU Affinity Set
setenv MV2_USE_AFFINITY 0
setenv MV2_ENABLE_AFFINITY 0
'Server > Linux' 카테고리의 다른 글
ctags, vi를 이용한 함수 찾기 (0) | 2016.05.20 |
---|---|
linux 검색 방법 (1) | 2016.05.20 |
gcc 설치하기 (RedHat 7.0) (0) | 2016.03.29 |
linux IP 설정시 (0) | 2015.12.22 |
sftp 사용법 (0) | 2014.07.02 |