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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Install the dependencies.
    yum -y install zlib* lapack* blas* python3.aarch64 python3-devel.aarch64 cmake3 boost-python* boost boost-devel numpy* python-numpy flex bison tcl tk

  3. Go to the installation directory of the main program, decompress the installation package, and go to the directory.
    cd /path/to/CODE-ASTER
    tar -xvf aster-full-src-14.6.0-1.noarch.tar.gz
    cd aster-full-src-14.6.0
  4. Modify the setup.py file.
    1. Open setup.py.
      vi setup.py
    2. Press i to go to the insert mode and add the aarch64 option to line 354.

      After performing 4.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Modify the as_setup.py file.
    1. Open as_setup.py.
      vi as_setup.py
    2. Press i to go to the insert mode and add the aarch64 option to line 1538.
      'aarch64': 'shell|script|aarch64',

      Note that the number of indented spaces in each statement must be the same.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Modify the setup.cfg file.
    1. Open setup.cfg.
      vi setup.cfg
    2. Press i to go to the insert mode and add the following content to line 94.
      CC='/opt/aarch64/compiler/gcc-9.3.1-2020.12-aarch64-linux/gcc'
      CXX='/opt/aarch64/compiler/gcc-9.3.1-2020.12-aarch64-linux/g++'
      F90='/opt/aarch64/compiler/gcc-9.3.1-2020.12-aarch64-linux/gfortran'
      LD=F90
      CXXFLAGS="-std=c++11"
      CXXLIB='-L/opt/aarch64/compiler/gcc-9.3.1-2020.12-aarch64-linux/lib64 -lstdc++'

      Modify the file based on the actual installation location of GCC for openEuler.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Modify the products.py file.
    1. Open products.py.
      vi products.py
    2. Press i to enter the insert mode and modify the content in line 187.
      conf_cmd = ("export F77=$F90; "

      Note that the number of indented spaces in each statement must be the same.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Go to the Code_Aster source package and decompress the ASTER installation package.
    cd SRC/
    tar xvf aster-14.6.0.tgz
  9. Modify the /bibfor/wscript file.
    1. Open /bibfor/wscript.
      vi aster-14.6.0/bibfor/wscript
    2. Press i to enter the insert mode and modify the content in line 103.
      if self.env.DEST_CPU == 'x86_64' or self.env.DEST_CPU == 'aarch64':

      Note that the number of indented spaces in each statement must be the same.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  10. Modify the /bibpyt/Utilitai/Utmess.py file.
    1. Open /bibpyt/Utilitai/Utmess.py.
      vi ./aster-14.6.0/bibpyt/Utilitai/Utmess.py
    2. Press i to enter the insert mode and modify the content in line 224:
      curr_idmess = idmess.split("\0")
      x = curr_idmess[0].split("_")

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  11. Update the ASTER source package and delete temporary files.
    tar cvzf aster-14.6.0.tgz aster-14.6.0
    rm -rf aster-14.6.0
  12. Perform the compilation.
    cd /path/to/CODE-ASTER/aster-full-src-14.6.0
    echo y | python3 setup.py --prefix=/path/to/CODE-ASTER