일단 geoDB를 다운로드 하고 저장해준다음

$ wget ftp://ftp.mrunix.net/pub/webalizer/geodb/geodb-latest.tgz

$ tar -xvf geodb-latest.tgz

$ sudo mkdir /usr/share/GeoDB

$ sudo mv GeoDB.dat /usr/share/GeoDB/

webalizer의 설정을 변경!

$ sudo vi /etc/webalizer/webalizer.conf

GeoDB           yes

GeoDBDatabase   /usr/share/GeoDB/GeoDB.dat 

그리고 실행하면 나온다.

$ sudo webalizer 



---

7a. Why does the country section show only 100% unresolved?

Most likely because your web server is not doing name lookups and simply logging IP addresses. In order to determine the top level domain of the remote site, the program needs a resolved hostname, not an IP address. The simple fix is to just turn on name lookups on your web server so it starts logging names. Otherwise, you can pre-process your logs with something like the logresolve program supplied with apache or similar utilities, or you can use the Webalizers built in DNS lookup code (see 7b below). Another alternative is to enable the geolocation services, which will lookup the geographic location of IP addresses. You can use either the Webalizers native geolocation support (GeoDB) which supports both IPv4 and IPv6 addresses, or optionally, GeoIP support from MaxMind Inc. While geolocation support will give you accurate country information, other aspects of the analysis may suffer, such as search string analysis (which depends on resolved hostnames to identify the various search engines).


7b. My Server doesn't do name lookups. Will The Webalizer?

Yes. The Webalizer fully supports both IPv4 and IPv6 reverse DNS lookup support. See the DNS.README file for additional information. If you don't enable hostname lookups on your web server, or use the geolocation services provided by The Webalizer, you will get '100% Unresolved/Unknown' country totals. This is because your log files only have IP addresses and not names. While it is recommended that you let your web server handle the DNS lookups, DNS support can be used for those sites where DNS resolution is not an option.


[링크 : http://www.webalizer.org/faq.html]


The webalizer has the ability to perform reverse DNS lookups,  and

fully supports both IPv4 and IPv6 addressing schemes.  This document

attempts to explain how it works, and some things that you should be

aware of when using the DNS lookup features.


Note: The Reverse DNS feature may be enabled or disabled at compile

      time.  DNS lookup code is enabled by default.  You can run The

      Webalizer using the '-vV' command line options to determine what

      options are enabled in the version you are using. 

[링크 : ftp://ftp.mrunix.net/pub/webalizer/DNS.README]

[링크 : http://www.webalizer.org/webalizer.1.html]

[링크 : ftp://ftp.mrunix.net/pub/webalizer/geodb/]


$ webalizer -vV

Webalizer V2.23-08 (Linux 4.4.38-v7+ armv7l) locale

Copyright 1997-2013 by Bradford L. Barrett

Mod date: 26-Aug-2013  Options: DNS/GeoDB GeoIP

Default GeoDB dir : /usr/share/GeoDB

Default config dir: /etc/webalizer



+

GeoIP 라는게 있어서 켜봤는데 차이가 없어서 다시 보니 GeoDB가 설정되면 GeoIP는 무시된다. 라네?

# The GeoIP option enables or disables the use of geolocation

# services provided by the GeoIP library (http://www.maxmind.com),

# if available.  Values may be 'yes' or 'no, with 'no' being the

# default.  Note: if GeoDB is enabled, then this option will have

# no effect (GeoDB will be used regardless of this setting).


#GeoIP no


# GeoIPDatabase specifies an alternate database filename to use by the

# GeoIP library.  If an absolute path is not given as part of the name

# (ie: starts with a leading '/'), then the name is relative to the

# default output directory. This option should not normally be needed.


#GeoIPDatabase /usr/share/GeoIP/GeoIP.dat 


GeoIP의 경우에는 패키지로 관리되니, 

수작업으로 GeoDB 업데이트 할바에는 GeoIP를 활성화 해주는게 나을지도 모르겠다.

$ apt-file search GeoIP

geoip-database: /usr/share/GeoIP/GeoIP.dat

geoip-database: /usr/share/GeoIP/GeoIPv6.dat

geoip-database-contrib: /usr/share/GeoIP/GeoIP.dat

geoip-database-contrib: /usr/share/GeoIP/GeoIPASNum.dat

geoip-database-contrib: /usr/share/GeoIP/GeoIPASNumv6.dat

geoip-database-contrib: /usr/share/GeoIP/GeoIPv6.dat

geoip-database-contrib: /usr/share/GeoIP/GeoLiteCity.dat

geoip-database-contrib: /usr/share/GeoIP/GeoLiteCityv6.dat

geoip-database-extra: /usr/share/GeoIP/GeoIPASNum.dat

geoip-database-extra: /usr/share/GeoIP/GeoIPCity.dat 


+

[링크 : https://www.siteground.com/tutorials/geoip/]

[링크 : https://www.maxmind.com/download/geoip/api/php-20120410/geoip.inc]

Posted by 구차니

micro USB가 접촉이 안좋아서 분해를 해보아도 손댈곳이 없어서 다시 조립 ㅠ

일단은 다행히도.. 샤오미 정품 LG 셀을 사용하는 녀석으로 보인다.


배터리를 충전시키는 큰 USB 커넥터 쪽으로 살며시 넣어서 들어 올리면 깔끔하게 떼어지고

빼보니 다행히도 LG셀에 스폿용접이 이쁘게 잘되어 있는 정품인듯

엄청나게 흔들렸네.. 커넥터는 뒷면에 있어서 검은 녀석을 분리해야 하는데 좌우로 걸쇠가 있어서

그쪽 구멍에 드라이버를 넣어 밖으로 걲어주면 자연스럽게 나온다.

분해하면 이렇게 나오는데.. 딱히 부품도 안보이는 상태, 시리얼 번호는 일단 가림

그리고 이쪽 면에는 배터리 보호를 위한 온도센서가 보이는 듯?


메인으로 보이는 칩이 두녀석 있었는데

bq24195 / ti 421 / ahgs

bq24195 I2C Controlled 2.5-A /4.5-A Single Cell USB/Adapter Charger

with 5.1 V at 1 A /5.1 V at 2.1 A Synchronous Boost Operation

[링크 : http://www.ti.com/lit/ds/symlink/bq24195.pdf] 배터리 충전 ic


abov 1409 / 97f1204smbn

[링크 : http://pdf.datasheetcatalog.com/datasheet/sanyo/ds_pdf_e/LB1409.pdf] << 확신은 없음


ABOV SEMICONDUCTOR Co., Ltd. 8-BIT MICROCONTROLLERS

[링크 : http://composter.com.ua/documents/Xiaomi/MC97F1204.pdf] 엌ㅋㅋ? 얜가보네

[링크 : http://www.abov.co.kr/]

MC97F1204.pdf


[링크 : http://blog.naver.com/tt_zone/220517867761]

[링크 : http://comterman.tistory.com/1100]

[링크 : http://tcom.tistory.com/76]


+

[링크 : http://www.hardwarezone.com.sg/review-xiaomi-16000mah-mi-power-bank-review-...-fast]


전반적으로 충전용 칩을 마이컴이 i2c로 제어하면서 온도센서(adc)와 led(gpio) 제어해주는 단순한 구조.

SBC와 같이 셀단위 제어라던가 셀 끊는 부품들은 없는 것으로 봐서...

노트북용 배터리가 비쌀수 밖에 없구나 싶다.

Posted by 구차니

float 보단 decimal(11,2) 이런식으로 소수점 지원하는 10진수가 무난하려나?


[링크 : http://stackoverflow.com/questions/13030368/best-data-type-to-store-money-values-in-mysql]

[링크 : https://dev.mysql.com/doc/refman/5.7/en/fixed-point-types.html]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

db designer  (0) 2017.03.14
데이터베이스 구조 버전관리  (0) 2017.02.13
mysql 다국어 문자길이  (0) 2017.02.06
mysql select case insensitive  (0) 2017.02.06
mysql event (schedule)  (0) 2017.02.05
Posted by 구차니

utf8에서 char(20) 이면

한영 구분 없이 20자인가?

그러고 보면 dbms에서 null문자는 빼고 처리하나보네?


문자열 중간에 null 넣으면 어떻게 되려나 궁금하네 ㅋㅋㅋ


[링크 : http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=64686]

[링크 : https://dev.mysql.com/doc/refman/5.7/en/string-literals.html]

Posted by 구차니

char형은 문자열이라 대소문자 구분하지 않고

binary형은 대소문자를 구분한다

[링크 : https://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html]


collate를 이용해 대소문자 구분여부를 변경할수있다

그리고 _cs는 case sensitive collation

_ci는 case insensitive collation의 접미인듯

[링크 : http://stackoverflow.com/questions/3936967/mysql-case-insensitive-select]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mysql 통화관련 변수타입  (0) 2017.02.07
mysql 다국어 문자길이  (0) 2017.02.06
mysql event (schedule)  (0) 2017.02.05
mysql 테이블 내 일정 문자열 치환하기  (0) 2017.01.26
mysql 암호화 방법들...?  (0) 2017.01.16
Posted by 구차니
Programming/ffmpeg2017. 2. 6. 15:37

윈도우용 live555 + ffmpeg 프로그램 만들일이 생길것 같아 미리 조사중..



퍼포먼스를 위해서 sdl을 이용하는 녀석.. live555를 통한 rtsp는 제외 된 듯

sdl / ffmpeg / vs2010

[링크 : https://sourceforge.net/projects/simplestffmpegplayer/]

    [링크 : https://sourceforge.net/u/leixiaohua1020/wiki/Home/]

[링크 : https://www.libsdl.org/]


113MB ... ㄷㄷㄷ

[링크 : https://www.imc-store.com.au/Articles.asp?ID=278]


먼가 빈약해 보이는데..

sdl / ffmpeg / live555 / visual studio

[링크 : https://github.com/yuvalk/demoLive555withFFMPEG]

'Programming > ffmpeg' 카테고리의 다른 글

ffmpeg 예제 소스 분석  (0) 2017.02.10
ffmpeg 3.2 소스관련  (0) 2017.02.10
ffmpeg - vlc cache 설정관련  (0) 2017.02.10
ffmpeg + opengl  (0) 2017.02.09
ffmpeg / ffplay 딜레이 관련 분석  (0) 2017.02.09
Posted by 구차니
Programming/web 관련2017. 2. 6. 14:12

서버 마다 다른건가... lighttpd에서는 GET만 하면 400 에러가 발생하고

GET 다음 Host까지 해주어야 응답을 해준다.

+

GET /bin/login?User=Peter+Lee&pw=123456&action=login HTTP/1.1

Host: 127.0.0.1:8000 


POST /bin/login HTTP/1.1

Host: 127.0.0.1:8000

Accept: image/gif, image/jpeg, */*

Referer: http://127.0.0.1:8000/login.html

Accept-Language: en-us

Content-Type: application/x-www-form-urlencoded

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Content-Length: 37

Connection: Keep-Alive

Cache-Control: no-cache

   

User=Peter+Lee&pw=123456&action=login 


[링크 : https://www.ntu.edu.sg/home/ehchua/programming/webprogramming/HTTP_Basics.html]


GET

/test/demo_form.asp?name1=value1&name2=value2

POST

POST /test/demo_form.asp HTTP/1.1

Host: w3schools.com

name1=value1&name2=value2 

[링크 : http://www.w3schools.com/Tags/ref_httpmethods.asp]

[링크 : https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html]



S.N.Method and Description
1GET

The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.

2HEAD

Same as GET, but transfers the status line and header section only.

3POST

A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.

4PUT

Replaces all current representations of the target resource with the uploaded content.

5DELETE

Removes all current representations of the target resource given by a URI.

6CONNECT

Establishes a tunnel to the server identified by a given URI.

7OPTIONS

Describes the communication options for the target resource.

8TRACE

Performs a message loop-back test along the path to the target resource.

[링크 : https://www.tutorialspoint.com/http/http_methods.htm]

[링크 : https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]

'Programming > web 관련' 카테고리의 다른 글

http digest  (0) 2017.03.03
http header  (0) 2017.03.02
해싱 salt  (0) 2017.01.27
NPAPI / PPAPI - VLC ...  (0) 2016.01.14
HTML5 video player 720p/1080p 재생여부  (0) 2016.01.13
Posted by 구차니

대충 요약하면..

event 라는 mysql 내의 기능을 쓰거나

cron등으로 mysql에 sql을 사용해서 강제로 구동하거나

둘중에 하나?


[링크 : http://stackoverflow.com/questions/9621355/how-to-schedule-a-mysql-query]





[링크 : https://dev.mysql.com/doc/refman/5.5/en/create-event.html]

Posted by 구차니
Programming/openMPI2017. 2. 5. 12:39

음.. 구조를 일단 파악을 해봐야 하나..

odroid 쪽은 mpich2 패키지가 없네.. 버전이 달라서 그런가?

아무튼 mpiexec나 mpirun 나 둘다 똑같이 실행파일이 연결되네

lrwxrwxrwx 1 root root 24  2월  5 12:43 /usr/bin/mpirun -> /etc/alternatives/mpirun*

lrwxrwxrwx 1 root root 25  2월  5 12:43 /usr/bin/mpiexec -> /etc/alternatives/mpiexec*

lrwxrwxrwx 1 root root 21  2월  5 12:43 /etc/alternatives/mpirun -> /usr/bin/mpirun.mpich*

lrwxrwxrwx 1 root root 22  2월  5 12:43 /etc/alternatives/mpiexec -> /usr/bin/mpiexec.mpich* 

lrwxrwxrwx 1 root root 13  2월  7  2016 /usr/bin/mpirun.mpich -> mpiexec.hydra*

lrwxrwxrwx 1 root root 13  2월  7  2016 /usr/bin/mpiexec.mpich -> mpiexec.hydra*


$ mpiexec --help


Usage: ./mpiexec [global opts] [local opts for exec1] [exec1] [exec1 args] : [local opts for exec2] [exec2] [exec2 args] : ...


Global options (passed to all executables):


  Global environment options:

    -genv {name} {value}             environment variable name and value

    -genvlist {env1,env2,...}        environment variable list to pass

    -genvnone                        do not pass any environment variables

    -genvall                         pass all environment variables not managed

                                          by the launcher (default)


  Other global options:

    -f {name}                        file containing the host names 


호스트 파일은 아래와 같이 넣는데 얘도 winbind 적용 가능하려나?

ub3:4  # this will spawn 4 processes on ub3

ub2:2  # this will spawn 2 processes on ub2

ub1    # this will spawn 1 process on ub1

ub0    # this will spawn 1 process on ub0 


[링크 : https://help.ubuntu.com/community/MpichCluster]

    [링크 : http://www.brianjp93.com/blog/building-a-beowulf-cluster-ubuntu-1404-server-lts/]

[링크 : https://www.digitalocean.com/.../how-to-create-a-beowulf-cluster-using-ubuntu-12-04-vps-instances]

[링크 : http://techtinkering.com/2009/12/02/setting-up-a-beowulf-cluster-using-open-mpi-on-linux/]

설정방법을 대충보니...

빌드 돌릴 녀석이 host node가 되고, 얘가 nfs로 공유할 디렉토리를 생성해서 work node들이 여기를 연결

빌드에는 ssh를 key적용해서 암호없이도 할 수 있도록 해야 하는 듯..

옛날에 있던 녀석이니.. rlogin이나 telnet으로는 안되려나?


$ mpiexec -info

HYDRA build details:

    Version:                                 3.2

    Release Date:                            Wed Nov 11 22:06:48 CST 2015

    CC:                              gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro 

    CXX:                             g++   -Wl,-Bsymbolic-functions -Wl,-z,relro 

    F77:                             gfortran  -Wl,-Bsymbolic-functions -Wl,-z,relro 

    F90:                             gfortran  -Wl,-Bsymbolic-functions -Wl,-z,relro 

    Configure options:                       '--disable-option-checking' '--prefix=/usr' '--build=arm-linux-gnueabihf' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--libexecdir=${prefix}/lib/arm-linux-gnueabihf' '--disable-maintainer-mode' '--disable-dependency-tracking' '--enable-shared' '--enable-fortran=all' '--disable-rpath' '--disable-wrapper-rpath' '--sysconfdir=/etc/mpich' '--libdir=/usr/lib/arm-linux-gnueabihf' '--includedir=/usr/include/mpich' '--docdir=/usr/share/doc/mpich' '--with-hwloc-prefix=system' 'CPPFLAGS= -Wdate-time -D_FORTIFY_SOURCE=2 -I/build/mpich-52KREu/mpich-3.2/src/mpl/include -I/build/mpich-52KREu/mpich-3.2/src/mpl/include -I/build/mpich-52KREu/mpich-3.2/src/openpa/src -I/build/mpich-52KREu/mpich-3.2/src/openpa/src -D_REENTRANT -I/build/mpich-52KREu/mpich-3.2/src/mpi/romio/include' 'CFLAGS= -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -O2' 'CXXFLAGS= -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -O2' 'FFLAGS= -g -O2 -fstack-protector-strong -O2' 'FCFLAGS= -g -O2 -fstack-protector-strong -O2' 'build_alias=arm-linux-gnueabihf' 'MPICHLIB_CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' 'MPICHLIB_CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'MPICHLIB_CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' 'MPICHLIB_FFLAGS=-g -O2 -fstack-protector-strong' 'MPICHLIB_FCFLAGS=-g -O2 -fstack-protector-strong' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'FC=gfortran' 'F77=gfortran' 'MPILIBNAME=mpich' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'LIBS=-lpthread '

    Process Manager:                         pmi

    Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist

    Topology libraries available:            hwloc

    Resource management kernels available:   user slurm ll lsf sge pbs cobalt

    Checkpointing libraries available:       blcr

    Demux engines available:                 poll select 


'Programming > openMPI' 카테고리의 다른 글

openMPI 서비스 설치하기...?  (0) 2019.04.02
opempi 패키지  (0) 2017.02.04
openmpi with heterogenerous  (0) 2017.02.03
openmpi with openmp  (0) 2017.02.03
OpenMP 그리고 OpenMPI  (2) 2011.09.19
Posted by 구차니
Programming/openMPI2017. 2. 4. 22:58

멀 깔아야 서버가 되려나?


$ sudo apt-cache search openmpi

gromacs-openmpi - Molecular dynamics sim, binaries for OpenMPI parallelization

libblacs-openmpi1 - Basic Linear Algebra Comm. Subprograms - Shared libs. for OpenMPI

libhdf5-openmpi-8 - Hierarchical Data Format 5 (HDF5) - runtime files - OpenMPI version

libhdf5-openmpi-8-dbg - Hierarchical Data Format 5 (HDF5) - OpenMPI Debug package

libhdf5-openmpi-dev - Hierarchical Data Format 5 (HDF5) - development files - OpenMPI version

libmeep-lam4-7 - library for using parallel (OpenMPI) version of meep

libmeep-lam4-dev - development library for using parallel (OpenMPI) version of meep

libmeep-mpi-default-dev - development library for using parallel (OpenMPI) version of meep

libmeep-mpi-default7 - library for using parallel (OpenMPI) version of meep

libmeep-mpich2-7 - library for using parallel (OpenMPI) version of meep

libmeep-mpich2-dev - development library for using parallel (OpenMPI) version of meep

libmeep-openmpi-dev - development library for using parallel (OpenMPI) version of meep

libmeep-openmpi7 - library for using parallel (OpenMPI) version of meep

libopenmpi-dev - high performance message passing library -- header files

libopenmpi1.6 - high performance message passing library -- shared library

libopenmpi1.6-dbg - high performance message passing library -- debug library

libscalapack-openmpi1 - Scalable Linear Algebra Package - Shared libs. for OpenMPI

meep-lam4 - software package for FDTD simulation, parallel (OpenMPI) version

meep-mpi-default - software package for FDTD simulation, parallel (OpenMPI) version

meep-mpich2 - software package for FDTD simulation, parallel (OpenMPI) version

meep-openmpi - software package for FDTD simulation, parallel (OpenMPI) version

mpqc-openmpi - Massively Parallel Quantum Chemistry Program (OpenMPI transitional package)

netpipe-openmpi - Network performance tool using OpenMPI

octave-openmpi-ext - Transitional package for parallel computing in Octave using MPI

openmpi-bin - high performance message passing library -- binaries

openmpi-checkpoint - high performance message passing library -- checkpoint support

openmpi-common - high performance message passing library -- common files

openmpi-doc - high performance message passing library -- man pages

openmpi1.6-common - high performance message passing library -- common files

openmpi1.6-doc - high performance message passing library -- man pages

openmpipython - MPI-enhanced Python interpreter (OpenMPI based version)

yorick-full - full installation of the Yorick interpreter and add-ons

yorick-mpy-openmpi - Message Passing Yorick (OpenMPI build) 


$ sudo apt-cache search mpich

gromacs-mpich - Molecular dynamics sim, binaries for MPICH parallelization

libhdf5-mpich-8 - Hierarchical Data Format 5 (HDF5) - runtime files - MPICH2 version

libhdf5-mpich-8-dbg - Hierarchical Data Format 5 (HDF5) - Mpich Debug package

libhdf5-mpich-dev - Hierarchical Data Format 5 (HDF5) - development files - MPICH version

libhdf5-mpich2-dev - Hierarchical Data Format 5 (HDF5) - development files - MPICH version

libmeep-mpi-default-dev - development library for using parallel (OpenMPI) version of meep

libmeep-mpi-default7 - library for using parallel (OpenMPI) version of meep

libmeep-mpich2-7 - library for using parallel (OpenMPI) version of meep

libmeep-mpich2-dev - development library for using parallel (OpenMPI) version of meep

libmpich-dev - Development files for MPICH

libmpich12 - Shared libraries for MPICH

libmpich2-3 - Shared libraries for MPICH2

libmpich2-dev - Transitional dummy package for MPICH development files

libmpl-dev - Development files for mpl part of MPICH

libmpl1 - Shared libraries for mpl part of MPICH

libopa-dev - Development files for opa part of MPICH

libopa1 - Shared libraries for opa part of MPICH

libscalapack-mpi-dev - Scalable Linear Algebra Package - Dev. files for MPICH

meep-mpi-default - software package for FDTD simulation, parallel (OpenMPI) version

meep-mpich2 - software package for FDTD simulation, parallel (OpenMPI) version

mpb-mpi - MIT Photonic-Bands, parallel (mpich) version

mpi-default-bin - Standard MPI runtime programs (metapackage)

mpi-default-dev - Standard MPI development files (metapackage)

mpich - Implementation of the MPI Message Passing Interface standard

mpich-doc - Documentation for MPICH

mpich2 - Transitional dummy package

mpich2-doc - Transitional dummy package for MPICH documentation

mpich2python - MPI-enhanced Python interpreter (MPICH2 based version)

netpipe-mpich2 - Network performance tool using MPICH2 MPI

scalapack-mpi-test - Scalable Linear Algebra Package - Test files for MPICH

scalapack-test-common - Test data for ScaLAPACK testers

yorick-full - full installation of the Yorick interpreter and add-ons

yorick-mpy-mpich2 - Message Passing Yorick (MPICH2 build)


$ sudo apt-cache search mpirun

lam-runtime - LAM runtime environment for executing parallel programs

mpi-default-bin - Standard MPI runtime programs (metapackage) 

[링크 : https://likymice.wordpress.com/2015/03/13/install-open-mpi-in-ubuntu-14-04-13-10/]


$ sudo apt-get install libcr-dev mpich2 mpich2-doc 

[링크 : https://jetcracker.wordpress.com/2012/03/01/how-to-install-mpi-in-ubuntu/]


mpich와 mpich2는 별 차이가 없네? 그래도 2는 1을 포함하는 듯

$ sudo apt-get install mpich

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  gfortran gfortran-4.9 hwloc-nox libcr0 libgfortran-4.9-dev libhwloc-plugins

  libhwloc5 libmpich-dev libmpich12 libmpl-dev libmpl1 libopa-dev libopa1

  ocl-icd-libopencl1

Suggested packages:

  gfortran-doc gfortran-4.9-doc libgfortran3-dbg blcr-dkms

  libhwloc-contrib-plugins blcr-util mpich-doc opencl-icd

The following NEW packages will be installed:

  gfortran gfortran-4.9 hwloc-nox libcr0 libgfortran-4.9-dev libhwloc-plugins

  libhwloc5 libmpich-dev libmpich12 libmpl-dev libmpl1 libopa-dev libopa1

  mpich ocl-icd-libopencl1

0 upgraded, 15 newly installed, 0 to remove and 3 not upgraded.

Need to get 6,879 kB of archives.

After this operation, 25.5 MB of additional disk space will be used.

Do you want to continue? [Y/n] 

$ sudo apt-get install mpich2

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  gfortran gfortran-4.9 hwloc-nox libcr0 libgfortran-4.9-dev libhwloc-plugins

  libhwloc5 libmpich-dev libmpich12 libmpl-dev libmpl1 libopa-dev libopa1

  mpich ocl-icd-libopencl1

Suggested packages:

  gfortran-doc gfortran-4.9-doc libgfortran3-dbg blcr-dkms

  libhwloc-contrib-plugins blcr-util mpich-doc opencl-icd

The following NEW packages will be installed:

  gfortran gfortran-4.9 hwloc-nox libcr0 libgfortran-4.9-dev libhwloc-plugins

  libhwloc5 libmpich-dev libmpich12 libmpl-dev libmpl1 libopa-dev libopa1

  mpich mpich2 ocl-icd-libopencl1

0 upgraded, 16 newly installed, 0 to remove and 3 not upgraded.

Need to get 6,905 kB of archives.

After this operation, 25.6 MB of additional disk space will be used.

Do you want to continue? [Y/n]


그냥 실행하는게 없으니 에러나네?

$ mpirun

[mpiexec@raspberrypi] set_default_values (ui/mpich/utils.c:1528): no executable provided

[mpiexec@raspberrypi] HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1739): setting default values failed

[mpiexec@raspberrypi] main (ui/mpich/mpiexec.c:153): error parsing parameters 


대충 소스 받아서 돌려보니 되긴한데.. 다른 서버를 구축해서 하는건 또 나중에 해봐야지..

$ mpicc mpi.c -o hello

$ mpirun -np 2 ./hello

Hello world from process 0 of 2

Hello world from process 1 of 2 


-np는 number of processes

$ mpirun --help


Usage: ./mpiexec [global opts] [local opts for exec1] [exec1] [exec1 args] : [local opts for exec2] [exec2] [exec2 args] : ...


Global options (passed to all executables):


  Global environment options:

    -genv {name} {value}             environment variable name and value

    -genvlist {env1,env2,...}        environment variable list to pass

    -genvnone                        do not pass any environment variables

    -genvall                         pass all environment variables not managed

                                          by the launcher (default)


  Other global options:

    -f {name}                        file containing the host names

    -hosts {host list}               comma separated host list

    -wdir {dirname}                  working directory to use

    -configfile {name}               config file containing MPMD launch options



Local options (passed to individual executables):


  Local environment options:

    -env {name} {value}              environment variable name and value

    -envlist {env1,env2,...}         environment variable list to pass

    -envnone                         do not pass any environment variables

    -envall                          pass all environment variables (default)


  Other local options:

    -n/-np {value}                   number of processes

    {exec_name} {args}               executable name and arguments



Hydra specific options (treated as global):


  Launch options:

    -launcher                        launcher to use (ssh rsh fork slurm ll lsf sge manual persist)

    -launcher-exec                   executable to use to launch processes

    -enable-x/-disable-x             enable or disable X forwarding


  Resource management kernel options:

    -rmk                             resource management kernel to use (user slurm ll lsf sge pbs cobalt)


  Processor topology options:

    -topolib                         processor topology library (hwloc)

    -bind-to                         process binding

    -map-by                          process mapping

    -membind                         memory binding policy


  Checkpoint/Restart options:

    -ckpoint-interval                checkpoint interval

    -ckpoint-prefix                  checkpoint file prefix

    -ckpoint-num                     checkpoint number to restart

    -ckpointlib                      checkpointing library (blcr)


  Demux engine options:

    -demux                           demux engine (poll select)


  Other Hydra options:

    -verbose                         verbose mode

    -info                            build information

    -print-all-exitcodes             print exit codes of all processes

    -iface                           network interface to use

    -ppn                             processes per node

    -profile                         turn on internal profiling

    -prepend-rank                    prepend rank to output

    -prepend-pattern                 prepend pattern to output

    -outfile-pattern                 direct stdout to file

    -errfile-pattern                 direct stderr to file

    -nameserver                      name server information (host:port format)

    -disable-auto-cleanup            don't cleanup processes on error

    -disable-hostname-propagation    let MPICH auto-detect the hostname

    -order-nodes                     order nodes as ascending/descending cores

    -localhost                       local hostname for the launching node

    -usize                           universe size (SYSTEM, INFINITE, <value>)


Please see the intructions provided at

http://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager

for further details 


'Programming > openMPI' 카테고리의 다른 글

openMPI 서비스 설치하기...?  (0) 2019.04.02
ubuntu mpich cluster  (0) 2017.02.05
openmpi with heterogenerous  (0) 2017.02.03
openmpi with openmp  (0) 2017.02.03
OpenMP 그리고 OpenMPI  (2) 2011.09.19
Posted by 구차니