Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- virtual
- h5py
- tab space
- portforwarding
- jupyter
- cython
- hyperref
- gfortran
- datascience
- Matplotlib
- HDF5
- MAC
- openmp
- arXiver
- HFS+
- conda
- polyglot
- LaTeX
- SSH
- GSL
- c++
- vim
- mpi4py
- Anaconda
- python
- intel compiler
- cygwin
- vi
- Visual Studio
- Windows
Archives
- Today
- Total
Astro Coke
[HDF5] Trouble shooting (+fortran) 본문
After completing the installation with cmake, sometimes it is needed to update the library path,
export LD_LIBRARY_PATH=/directory/hdf5/lib/installed:$LD_LIBRARY_PATH
One issue I had was that even though I enabled Fortran setup in CMake option during the installation,
fortran-hdf5 libraries were not working. This is simply because the link of "include" should be directed to "shared".
For example,
ifort test_hdf5.f90 -I/home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0/include -L/home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0/lib -lhdf5_fortran
This caused an error like:
/home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0/h5fc
dir is /home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0
Package hdf5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `hdf5.pc'
to the PKG_CONFIG_PATH environment variable
Package 'hdf5', required by 'hdf5_fortran-1.12.0', not found
test.hdf5: file not recognized: file format not recognized
The change was simply adding "shared" folder in the "include (-I)", which has all "*.mod" files.
ifort test_hdf5.f90 -I/home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0/include/shared -L/home/wanga/CMake-hdf5-1.12.0/HDF_Group/HDF5/1.12.0/lib -lhdf5_fortran
'Computer Setup' 카테고리의 다른 글
[Python] Install polyglot on Mac (0) | 2022.10.06 |
---|---|
[NAS] read/write HFS+ (mac OS) USB Drive from a synology system (0) | 2021.09.25 |
[Jupyter] Shutdown by port number (0) | 2021.07.08 |
[Globus] Command-line Globus (in beluga cluster) (0) | 2021.05.17 |
[Linux] create separate tar files from multiple folders (files) (0) | 2021.01.19 |