Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Astro Coke

[Cygwin] hdf5 w/ gfortran 설치하기 본문

Computer Setup

[Cygwin] hdf5 w/ gfortran 설치하기

astrodoo 2019. 4. 5. 02:15

우선 hdf5 소스파일을 다운받는다.

 

https://portal.hdfgroup.org/display/support/Downloads

 

압축을 풀고,

 

아래의 순서와 같이 설치하면 된다.

 

1)

> export FC=gfortran

> ./configure --enable-fortran --prefix=hdf_install_directory

 

2)

> make 

> make check  (optional)

 

3)

> make install

 

이때 --prefix 로 설정된 폴더에 hdf5 가 생성되고 그 안에는

lib

include

bin

share

서브폴더들이 설치된다.

 

4)

.bashrc 에서 path에 위의 bin 폴더를 추가한다.

 

ex) export PATH=hdf_install_directory/bin:$PATH

 

bin folder 안에는 h5fc 가 있는데, 이 명령어는 include 와 library 를 자동 연결해 주므로 

편리하게 쓸 수 있다.

 

ex) 

> h5fc test_hdf5.f90

 

이는 다음의 명령과 같다

> gfortran test_hdf5.f90 -I hdf_install_directory/include -L hdf_install_directory/lib -l:libhdf5_fortran.dll.a