Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- 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

- 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
- Modify the setup.py file.
- Modify the as_setup.py file.
- Open as_setup.py.
vi as_setup.py
- 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.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open as_setup.py.
- Modify the setup.cfg file.
- Open setup.cfg.
vi setup.cfg
- 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.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open setup.cfg.
- Modify the products.py file.
- Open products.py.
vi products.py
- 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.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open products.py.
- Go to the Code_Aster source package and decompress the ASTER installation package.
cd SRC/ tar xvf aster-14.6.0.tgz
- Modify the /bibfor/wscript file.
- Open /bibfor/wscript.
vi aster-14.6.0/bibfor/wscript
- 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.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open /bibfor/wscript.
- Modify the /bibpyt/Utilitai/Utmess.py file.
- Open /bibpyt/Utilitai/Utmess.py.
vi ./aster-14.6.0/bibpyt/Utilitai/Utmess.py
- Press i to enter the insert mode and modify the content in line 224:
curr_idmess = idmess.split("\0") x = curr_idmess[0].split("_")
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open /bibpyt/Utilitai/Utmess.py.
- 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
- Perform the compilation.
cd /path/to/CODE-ASTER/aster-full-src-14.6.0 echo y | python3 setup.py --prefix=/path/to/CODE-ASTER

Parent topic: Code_Aster 14.6.0 Porting Guide (openEuler 21.03)
