install ubuntu/Debian (if you install server version, you need to know ip-address, DNS name-server, Gateway)
see debian tips debian_tips
This is for Ubuntu desktop version. For server, network setting is done during installation
a. system > preferences > Network Connection
b. Auto eth0 > edit
c. IPv4 setting > input address, netmask, Gateway, DNS server
d. Apply
e. restart
f. check networking (internet browser)
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install ssh
$sudo /etc/init.d/vsftpd restart
[편집]Change ssh port
$vi /etc/ssh/sshd_config
Port number change ( number should be larger than 1024)
$/etc/init.d/ssh restart
Installing base packages : gcc, mpb, h5utils, et. al. (before installing package, check mirror site mirror site)
$sudo apt-get install make g++ gfortran h5utils hdf5-tools harminv mpb mpb-doc manpages-dev imagemagick gnuplot gnuplot-doc vim gsl-bin libgsl0-dev
If you want to downgrade gcc, g++ version (check the version in terminal as "gcc --version")
$apt-get remove gcc g++ (remove the newest version)
$apt-get install gcc-4.4 g++-4.4 (instll the old version)
$ln -s /usr/bin/gcc-4.4 /usr/bin/gcc (link gcc compiler with the old version)
$ln -s /usr/bin/gc++-4.4 /usr/bin/g++ (link gcc compiler with the old version)
This is for Debian system
1. download file : wget http://npl.kongju.ac.kr/fftw-3.3.4.tar.gz or FFTW3 homepage
2. unzip
$ cd install
$ tar -zxvf fftw-3.3.4.tar.gz
$ cd fftw-3.3.4
3. install
$ ./configure
$ make
$ su (type passwd)
$ make install
4. Run
$ gfortran -o fft.out fft1D.f90 -I /usr/local/include -lfftw3
This is MIT's FDTD version
$sudo apt-get install meep (this is meep 0.20.3)
$sudo apt-get install mpich2
id@com:~$ touch ~/.mpd.conf
id@com:~$ echo secretword=something >> ~/.mpd.conf
id@com:~$ chmod 600 ~/.mpd.conf
id@com:~$ mpd &
This is for Ubuntu
Install BLAS
id@com:~$ wget http://www.netlib.org/blas/blas.tgz
id@com:~$ gunzip blas.tgz
id@com:~$ tar xf blas.tar
id@com:~$ cd BLAS
id@com:~$ make
id@com:~$ ar rv libblas.a *.o
id@com:~$ su -c "cp libblas.a /usr/local/lib"
Install LABLAS (or OpenBLAS)
id@com:~$ wget http://www.netlib.org/lapack/lapack-3.7.0.tgz
id@com:~$ tar -zxvf lapack-3.7.0.tgz
id@com:~$ cd lapack-3.7.0
id@com:~$ cp make.inc.example make.inc
id@com:~$ make lapacklib
id@com:~$ sudo cp liblapack.a /usr/lib/liblapack.a
id@com:~$ wget http://github.com/xianyi/OpenBLAS/archive/v0.2.19.tar.gz < for download check OpenBLAS
id@com:~$ tar -zxvf v0.2.19.tar.gz
id@com:~$ cd OpenBLAS-0.2.19/
id@com:~$ make
Install libctl
id@com:~$ wget http://ab-initio.mit.edu/libctl/libctl-3.2.2.tar.gz
id@com:~$ tar -zxvf libctl-3.2.2.tar.gz
id@com:~$ cd libctl-3.2.2
id@com:~$ ./configure
id@com:~$ make
id@com:~$ make install
Install mpb
id@com:~$ wget http://ab-initio.mit.edu/wiki/index.php/MPB_download
id@com:~$ cd mpb-1.5
id@com:~$ ./configure (for breaking symmetry for magneto material ./configure --with-inv-symmetry or ./configure --with-hermitian-eps)
id@com:~$ make
id@com:~$ su -c "make install"
for breaking symmetry (or for magneto material)
id@com:~$ make distclean
id@com:~$ ./configure --with-inv-symmetry (or ./configure --with-hermitian-eps)
id@com:~$ make
id@com:~$ su -c "make install"
[편집]installation
download FDTD program
make directory "bin" at your home directory
copy pFDTD directory using ftp program at home directory(see linux connection)
go to pFDTD directory
compile the program
[편집]터미널 창에서 보기
id@com:~$ cd // go home directory
id@com:~$ mkdir ~/bin // make "bin" directory
id@com:~$ wget http://npl.kongju.ac.kr/FDTD_X.tar.gz // download FDTD
id@com:~$ tar xvfz FDTD_X.tar.gz // unzip file
id@com:~$ cd FDTD_X_0998 // go to the FDTD directory
id@com:~/FDTD_X_0998$ make // compile
id@com:~/FDTD_X_0998$ make install
[편집]pFDTD 패스 설정
id@com:~$ cd // go home
id@com:~$ vi .bashrc // open .bashrc
add below line at any
alias pFDTD='~/bin/pFDTD'
restart terminal
[편집]Run code
id@com:~$ pFDTD main.c // run in monitor
id@com:~$ pFDTD main.c >& log.dat & // run in background
[편집]MPI installation
download FDTD program
make directory "lib" and "include" at your home/install directory
copy MPIFDTD zip file using ftp program at home directory(see linux connection)
go to MPIFDTD directory
compile the program
[편집]터미널 창에서 보기
id@com:~$ cd install // go to install directory
id@com:~$ mkdir ~/lib ~/include // make "lib" directory
for new version :MPIFDTD_KNU_v141
id@com:~$ wget http://npl.kongju.ac.kr/MPIFDTD_KNU_v141.tar.gz // download FDTD or copy zip file using ftp program
id@com:~$ tar xvfz MPIFDTD_KNU_v141.tar.gz // unzip file
id@com:~$ cd MPIFDTD_KNU_v141 // go to the FDTD directory
id@com:~/MPIFDTD_KNU_v141$ make // compile
id@com:~/MPIFDTD_KNU_v141$ make install
[편집]Run code
Change the library head
if your id is ABC then at the second line of code "main.c" should be changed by
#include "/home/ABC/include/KNUMPIFDTD141.h
Modify the code as you want
make run.sh as following (if you make once, then you can use it by copying file)
id@com:~$vi run.sh
type below and save it
# for nanolaser 1, 2, 5
mpicc.mpich2 -c O3 main.c
mpicc.mpich2 -o main main.o -lm -L ~/lib -lKNUMPIFDTD141
mpirun -np 4 ./main >& log.dat &
# for nanolaser 4, 6
impicc -c O4 main.c
impicc -o main main.o -lm -L ~/lib -lKNUMPIFDTD141
impirun -np 4 ./main >& log.dat &
# for nanolaser 3
mpicc -c -O4 main.c
mpicc -o main main.o -lm -L ~/lib -lKNUMPIFDTD141
mpirun -np 4 ./main >& log.dat &
change the authority of "run.sh" file by
id@com:~$chmod 700 run.sh
run FDTD
id@com:~$./run.sh
[편집]Install intel compiler
Download 'noncommercial intel compiler link'
click on anything including 'Intel® C++ Compiler'
you will get email from intel to download compiler with "license number"
in all process, use su (apt-get install == aptitude install)
(you can also download to type on terminal intel compiler 'wget http://npl.kongju.ac.kr/parallel_studio_xe_2016_update3_online.sh' with license number 2JXL-WX7WZXMR until Jul. 14 2017)
1. apt-get install rpm build-essential
2. apt-get install libstdc++6
3. apt-get install ia32-libs libpng-dev
also install hdf5 utils(down) & libalis
hdf5 install direction : see website see Quick install
and cp all *.lib > /usr/lib/
*.h > /usr/include/ (원래 깔리는 directory가 /user/local/hdf5/include/ 임)
* > /usr/bin/
libs install direction : ??
Go to the folder which contains the downloaded file and then
4. tar xvzf l_cproc_p_11.1.072_intel64.tgz / or tar xvzf l_ccompxe_2013.5.192.tgz
5. cd l_cproc_p_11.1.072_intel64 / or cd l_ccompxe_2013.5.192
6. sudo ./install.sh
Follow the installation instructions:
7. choose Option 1 to install Intel compiler,
8. choose Option 1 to proceed with a serial number.
9. type in the serial number (case-sensitive) given in the email. (NSWP-WTSZCJJV). Choose 1 for a default install.
10. Press Enter to read the license agreement. The spacebar speeds through this quickly. Type 'accept' to accept the license agreement.
11. At some point the installation may stop to ask for some 'optional' packages to be installed. Skip this warning.
After the installation is finished go to the terminal and:
12. cd
13. vi .bashrc
the vim editor will open ".bashrc" file,
go to the end of this file and add the following lines:
PATH="/opt/intel/Compiler/11.1/072/bin/intel64:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/Compiler/11.1/072/lib/intel64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
or for l_ccompxe_2013.5.192
PATH="/opt/intel/bin/:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/lib/intel64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
in nanolaser3, 6 (for new debian system : jessie)
Make directory /tmp/psxe_staging_area/ and downloaded file from nanolaser5 using su and install (file @ nanolaser5/install/)
4r. scp -r -P 7777 jinkyu@114.71.250.157:/home/jinkyu/install/parallel_studio_xe_2017_update4_composer_edition_for_cpp_online/ /tmp/psxe_staging_area/
5r. cd /tmp/psxe_staging_area/parallel_studio_xe_2017_update4_composer_edition_for_cpp_online/
6r. ./install.sh
[편집]Install alis program
1. Download to type on terminal 'wget http://npl.kongju.ac.kr/alis-1.0.8m.tar.gz' or 'wget http://npl.kongju.ac.kr/alis-1.0.8m.tar.gz'
2. unzip file id@com~$ tar -zxvf alis-1.0.8m.tar.gz
3. install id@com~$ cd alis-1.0.8m
id@com~/alis-1.0.8m$ make
id@com~/alis-1.0.8m$ su (type pw)
id@com~/alis-1.0.8m$ make install
[편집]Run code
Prepare code like main.c
Run code using alis command in screen terminal
id@com~$ alis main.c
Run in background
id@com~$ alis main.c >& log.dat &
[편집] Multi run code with 'run.sh'
run.sh 파일을 이용하여 다양한 방식으로 여러 번의 FDTD 계산을 parameter 바꿔가며 실행하기
먼저 c code 에 parameter를 외부 입력인자로 받아 계산하도록 셋팅한다. (예 : main.c 코드 내 입력인자를 argv 를 이용할 것)
parameter 가 1개일 때 (aa)
int aa = atof(argv[1]); // 변수 입력 부분
...
world W = createWorld(Dom, Res, Sur, "%s-a%d", argv[0], aa); // world 이름 설정 - 디렉토리 이름
parameter 가 2개일 때 (aa, bb)
int aa = atof(argv[1]), bb = atof(argv[2]);; // 변수 입력 부분
...
world W = createWorld(Dom, Res, Sur, "%s-a%d-b%d", argv[0], aa, bb); // world 이름 설정 - 디렉토리 이름
run.sh 파일을 만든다.
id@com~$ vi run.sh
run.sh 파일을 vi 편집기로 아래와 같이 편집한다.
parameter 가 1개일 때 (예: parameter 의 값이 a=1, 2, 3 ...)
#!/bin/bash
alis main.c 1
alis main.c 2
alis main.c 3
...
parameter 가 2개일 때 (예: parameter 의 값이 a=1, 2, 3 ..., b=10, 20, 30...)
#!/bin/bash
alis main.c 1 10
alis main.c 2 20
alis main.c 3 30
...
참고. parameter를 for 문으로 변경하며 돌릴 수 있음. (예: parameter a=1 ~ 10, b=10~100일 때)
#!/bin/bash
for ((a=1; a<=10 ; a=a+1));
do
for ((b=10; b<=100; b=b+10));
do
alis main.c $a $b
done
done
run.sh 파일을 실행파일로 권한을 부여한다.
id@com~$ chmod 700 run.sh
run.sh 파일을 실행한다.
id@com~$ ./run.sh
[[편집]Manual
Homepage at H.G. Park's Lab : [1]
Print version : 파일:Alis-manual.pdf