我要评分
获取效率
正确性
完整性
易理解

Installing HIO Bridge Target Libraries

HIO implements application acceleration by bridging target libraries. Table 1 lists the applications that support acceleration. To implement HIO acceleration, install the HIO bridge target libraries required for running applications according to Table 1.
Table 1 Mapping between application versions and target libraries

Application

Version

HIO Bridge Target Library

WRF

4.2.2

libpnetcdf.so

NEMO

30Nov2020

libnetcdf.so

Grapes

CMA-GFS V3.3

CMA-MESO V5.1

libmpi.so

LAMMPS

4.2

libhdf5.so or libpnetcdf.so

QE

6.4.1

libhdf5.so

Installing libhdf5.so

  1. Download the HDF5 source package hdf5-1.12.3.tar.gz.
  2. Use an SFTP tool to upload hdf5-1.12.3.tar.gz to the server and run the following command to decompress it:
    tar zxf hdf5-1.12.3.tar.gz
  3. Perform build and installation.
    1. Go to the HDF5 source code directory and create a build directory.
      cd hdf5-1.12.3
      mkdir build
    2. Perform the configuration.
      cd build
      ../configure --prefix=/path/to/hdf5-install
      • /path/to/hdf5-install indicates the installation directory of libhdf5.so. You are advised to use a directory different from that in 2.
      • For the installation directory during batch installation of target bridge libraries, see Basic Project Info > Shared Storage Directory Planning > Installation directory for HPCKit in the Kunpeng HPC Solution 26.1.RC1 LLD Template.
    3. Perform the compilation.
      make -j
    4. Perform the installation.
      make install
  4. Run the following command to check whether the installation directory contains the HDF5 dynamic libraries:
    ls /path/to/hdf5-install/lib

    If the following information is displayed, the HDF5 dynamic libraries exist in the installation directory, indicating that the installation is successful:

    1
    libhdf5.a  libhdf5_hl.a  libhdf5_hl.la  libhdf5_hl.so  libhdf5_hl.so.200  libhdf5_hl.so.200.1.1  libhdf5.la  libhdf5.settings  libhdf5.so  libhdf5.so.200  libhdf5.so.200.3.0
    

Installing libnetcdf.so

  1. Download the NetCDF source package netcdf-c-4.9.2.tar.gz.
  2. Use an SFTP tool to upload netcdf-c-4.9.2.tar.gz to the server and run the following command to decompress it:
    tar zxf netcdf-c-4.9.2.tar.gz
  3. Perform build and installation.
    1. Go to the NetCDF source code directory and create a build directory.
      cd netcdf-c-4.9.2
      mkdir build
    2. Perform the configuration.
      cd build
      ../configure --prefix=/path/to/netcdf-install
      • /path/to/netcdf-install indicates the installation directory of libnetcdf.so. You are advised to use a directory different from that in 2.
      • For the installation directory during batch installation of target bridge libraries, see Basic Project Info > Shared Storage Directory Planning > Installation directory for HPCKit in the Kunpeng HPC Solution 26.1.RC1 LLD Template.
    3. Perform the compilation.
      make -j
    4. Perform the installation.
      make install
  4. Run the following command to check whether the installation directory contains the NetCDF dynamic libraries:
    ls /path/to/netcdf-install/lib
    If the following information is displayed, the NetCDF dynamic libraries exist in the installation directory, indicating that the installation is successful:
    1
    libnetcdf.a  libnetcdf.la  libnetcdf.settings  libnetcdf.so  libnetcdf.so.19  libnetcdf.so.19.2.2  pkgconfig
    

Installing libpnetcdf.so

  1. Download the PnetCDF source package pnetcdf-1.12.1.tar.gz.
  2. Use an SFTP tool to upload pnetcdf-1.12.1.tar.gz to the server and run the following command to decompress it:
    tar zxf pnetcdf-1.12.1.tar.gz
  3. Perform build and installation.
    1. Go to the PnetCDF source code directory and create a build directory.
      cd pnetcdf-1.12.1
      mkdir build
    2. Perform the configuration.
      cd build
      export MPICC=/opt/HPCKit/latest/hmpi/gcc/release/hmpi/bin/mpicc
      ../configure --prefix=/path/to/pnetcdf-install --enable-shared
      • /path/to/pnetcdf-install indicates the installation directory of libpnetcdf.so. You are advised to use a directory different from that in 2.
      • /opt/HPCKit indicates the HPCKit installation directory.
      • For the installation directory during batch installation of target bridge libraries, see Basic Project Info > Shared Storage Directory Planning > Installation directory for HPCKit in the Kunpeng HPC Solution 26.1.RC1 LLD Template.
    3. Perform the compilation.
      make -j
    4. Perform the installation.
      make install
  4. Run the following command to check whether the installation directory contains the PnetCDF dynamic libraries:
    ls /path/to/pnetcdf-install/lib
    If the following information is displayed, the PnetCDF dynamic libraries exist in the installation directory, indicating that the installation is successful.
    1
    libpnetcdf.a  libpnetcdf.la  libpnetcdf.so  libpnetcdf.so.4  libpnetcdf.so.4.0.1  pkgconfig
    

Configuring Environment Variables for HIO Bridge Target Libraries

  • If the HIO bridge target libraries already exist in /usr/lib64, you do not need to configure environment variables. In other cases, you need to configure environment variables.
  • If the bridge libraries are not in the same directory, configure environment variables for each library individually.
  • The following describes how to configure the LD_LIBRARY_PATH environment variable for libpnetcdf.so.
  • Run the find command to search for the directory where the HIO bridge target libraries are located and configure the directory to the environment variable.
  • Valid only for the current session
    export LD_LIBRARY_PATH=/path/to/pnetcdf-install/lib:$LD_LIBRARY_PATH
  • Valid for the current user
    1. Run the following command to open the ~/.bashrc file:
      vim ~/.bashrc
    2. Press i to enter the insert mode and add the following command line to the end of the ~/.bashrc file:
      export LD_LIBRARY_PATH=/path/to/pnetcdf-install/lib:$LD_LIBRARY_PATH
    3. Press Esc to exit the insert mode and enter :wq! to save the settings and exit.
    4. Run the following command to apply the configuration immediately:
      source ~/.bashrc