21 Star 26 Fork 94

src-openEuler / gcc

 / 详情

[22.03 SP3 RC2][codedb]-O3 -flto -flto-partition=one -fipa-struct-reorg=3 选项导致SU2运行Segmentation fault

已验收
缺陷
创建于  
2023-12-14 10:30

【标题描述】-O3 -flto -flto-partition=one -fipa-struct-reorg=3 选项导致SU2运行Segmentation fault

一、缺陷信息
【环境信息】
软件信息

  • OS版本及分支信息:openEuler-22.03-LTS-SP3
  • 内核信息:5.10.0-176.0.0.89.oe2203sp3.aarch64
  • 发现问题的组件版本信息:gcc-10.3.1-38.oe2203sp3.aarch64
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-multilib-list=lp64 --enable-bolt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 (GCC)

【问题复现步骤】
1.配置环境变量:

export CC="gcc -O3 -flto -flto-partition=one -fipa-struct-reorg=3"
export CXX="g++ -O3 -flto -flto-partition=one -fipa-struct-reorg=3"
export FC="gfortran -O3 -flto -flto-partition=one -fipa-struct-reorg=3"

2.安装openmpi:

下载openmpi源码包:https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.4.tar.gz
安装依赖包:yum install numactl-devel-* systemd-devel-*
tar -xvf  openmpi-4.0.4.tar.gz
cd openmpi-4.0.4
./configure --prefix=PATH/openmpi-4.0.4 --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default --enable-mpi-cxx --enable-mpi-fortran --with-cma --enable-mpi1-compatibility
make -j96
make install

export PATH=PATH/openmpi-4.0.4/bin:$PATH
export LD_LIBRARY_PATH=PATH/openmpi-4.0.4/lib:$LD_LIBRARY_PATH

3.安装HDF5

下载HDF5源码包:https://www.hdfgroup.org/downloads/hdf5/source-code/
tar -xvf hdf5-1.12.0.tar.gz
cd hdf5-1.12.0
./configure --prefix=PATH/hdf5 --enable-parallel  CC=mpicc FC=mpifort CXX=mpicxx
make -j96
make install
export HDF5_ROOT=PATH/HDF5/

4.安装SU2

下载SU2源码包:https://github.com/su2code/SU2/releases?page=3,选择6.0.1版本
安装依赖:yum install numpy.aarch64 -y
tar zxvf SU2-6.0.1.tar.gz
cd SU2-6.0.1
./bootstrap
./configure --prefix=PATH/SU2 CXXFLAGS="-O3 -std=c++11 -march=armv8.2-a -mtune=tsv110" --enable-mpi --with-cc=mpicc --with-cxx=mpicxx --with-HDF5-lib=PATH/HDF5/lib --with-HDF5-include=PATH/HDF5/include
make -j96
make install

export SU2_RUN=PATH/SU2/bin
export SU2_HOME=PATH/SU2
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$SU2_RUN

5.运行SU2,算例文件su2code.github.io-master.zip私下分享

unzip su2code.github.io-master.zip
cd su2code.github.io-master
mkdir testcase
cd testcase
cp -rf /path/to/CASE/su2code.github.io-master/testcase /Inviscid_Bump
cd ../Inviscid_Bump
rm -rf inv_channel.cfg
cp -r PATH/SU2-6.0.1/TestCases/euler/channel/inv_channel.cfg ./
mpirun --allow-run-as-root -np 2 SU2_CFD inv_channel.cfg

【实际结果】
输入图片说明
【其他相关附件信息】
应用编译安装流程可以参考:https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/prtg-osc/kunpengsu2_02_0001.html

评论 (2)

纪晓慧 创建了缺陷

Hi jixiaohuiyou, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Compiler, and any of the maintainers: @Noah , @eastb233 , @kuen , @Peilin Guo , @编译小伙 , @huangxiaoquan , @cf-zhao , @周磊 , @stubCode , @dingguangya , @Haijian.Zhang

openeuler-ci-bot 添加了
 
sig/Compiler
标签
纪晓慧 负责人设置为MC.5
纪晓慧 计划截止日期设置为2023-12-15
纪晓慧 计划开始日期设置为2023-12-14
纪晓慧 计划截止日期2023-12-15 修改为2023-12-19
纪晓慧 优先级设置为主要
MC.5 通过openeuler/gcc Pull Request !161任务状态待办的 修改为已完成

使用RC5转测repo,回归结果:通过
输入图片说明

纪晓慧 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc

搜索帮助