llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.22k stars 11.65k forks source link

Compilation Segmentation fault on 17.0 of VV lsms_triangular_packing.cpp on Nvidia and AMD systems #60611

Open fel-cab opened 1 year ago

fel-cab commented 1 year ago
$ clang++ -I./ompvv -lm -std=c++11 -O3 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a -fopenmp-version=50 tests/5.0/application_kernels/lsms_triangular_packing.cpp
DeclRefExpr for Decl not entered in LocalDeclMap?
UNREACHABLE executed at /gpfs/alpine/csc372/scratch/cabarcasf/ums012/llvm_git/llvm-project/clang/lib/CodeGen/CGExpr.cpp:2846!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: /autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -emit-llvm-uselists -disable-free -clear-ast-before-backend -main-file-name lsms_triangular_packing.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=/ccs/home/cabarcasf/SOLLVE/CrusherRegularTests/sollve_vv -resource-dir /autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/lib/clang/17 -I ./ompvv -c-isystem /sw/crusher/ums/ums012/llvm/17.0.0-20230206/include -cxx-isystem /sw/crusher/ums/ums012/llvm/17.0.0-20230206/include -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7 -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/x86_64-suse-linux -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/backward -internal-isystem /autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/lib/clang/17/include -internal-isystem /usr/local/include -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir=/ccs/home/cabarcasf/SOLLVE/CrusherRegularTests/sollve_vv -ferror-limit 19 -fopenmp -fopenmp-version=50 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/lsms_triangular_packing-203f06.bc -x c++ tests/5.0/application_kernels/lsms_triangular_packing.cpp
1.  <eof> parser at end of file
2.  Per-file LLVM IR generation
3.  tests/5.0/application_kernels/lsms_triangular_packing.cpp:69:1: Generating code for declaration 'ulmBLAS::trlspack'
 #0 0x00000000036bb1c1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x36bb1c1)
 #1 0x00000000036b8ba4 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f30c82848c0 __restore_rt (/lib64/libpthread.so.0+0x168c0)
 #3 0x00007f30c6aebcdb raise (/lib64/libc.so.6+0x4acdb)
 #4 0x00007f30c6aed375 abort (/lib64/libc.so.6+0x4c375)
 #5 0x00000000036198ea (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x36198ea)
 #6 0x0000000003e7f138 clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e7f138)
 #7 0x0000000003e7a9f7 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e7a9f7)
 #8 0x0000000003e849b6 clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*, clang::CodeGen::CodeGenFunction::TypeCheckKind) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e849b6)
 #9 0x0000000003ec7b40 (anonymous namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) CGExprScalar.cpp:0:0
#10 0x0000000003ec2dfb (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) CGExprScalar.cpp:0:0
#11 0x0000000003ec5393 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) CGExprScalar.cpp:0:0
#12 0x0000000003ec7555 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3ec7555)
#13 0x0000000003e67396 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e67396)
#14 0x0000000003e8714b clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(clang::BinaryOperator const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e8714b)
#15 0x0000000003e7a50f clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e7a50f)
#16 0x0000000003e85b01 clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3e85b01)
#17 0x0000000003b38791 emitPreCond(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&, clang::Expr const*, llvm::BasicBlock*, llvm::BasicBlock*, unsigned long) (.part.0) CGStmtOpenMP.cpp:0:0
#18 0x0000000003b54b38 clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)> const&, clang::Expr*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b54b38)
#19 0x0000000003b5515c void clang::CodeGen::RegionCodeGenTy::CallbackFn<emitTargetTeamsDistributeParallelForRegion(clang::CodeGen::CodeGenFunction&, clang::OMPTargetTeamsDistributeParallelForDirective const&, clang::CodeGen::PrePostActionTy&)::'lambda'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)>(long, clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) CGStmtOpenMP.cpp:0:0
#20 0x0000000003f614fd clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f614fd)
#21 0x0000000003f61624 (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0
#22 0x0000000003f588c1 clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f588c1)
#23 0x0000000003b3acfd void clang::CodeGen::RegionCodeGenTy::CallbackFn<emitTargetTeamsDistributeParallelForRegion(clang::CodeGen::CodeGenFunction&, clang::OMPTargetTeamsDistributeParallelForDirective const&, clang::CodeGen::PrePostActionTy&)::'lambda0'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)>(long, clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) CGStmtOpenMP.cpp:0:0
#24 0x0000000003f614fd clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f614fd)
#25 0x0000000003f61624 (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0
#26 0x0000000003b645c1 clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt const&, clang::SourceLocation) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b645c1)
#27 0x0000000003f9354b emitParallelOrTeamsOutlinedFunction(clang::CodeGen::CodeGenModule&, clang::OMPExecutableDirective const&, clang::CapturedStmt const*, clang::VarDecl const*, llvm::omp::Directive, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&) CGOpenMPRuntime.cpp:0:0
#28 0x0000000003f93c13 clang::CodeGen::CGOpenMPRuntime::emitTeamsOutlinedFunction(clang::OMPExecutableDirective const&, clang::VarDecl const*, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f93c13)
#29 0x0000000003b479e0 emitCommonOMPTeamsDirective(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&) (.constprop.0) CGStmtOpenMP.cpp:0:0
#30 0x0000000003b47e15 void clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective(clang::OMPTargetTeamsDistributeParallelForDirective const&)::'lambda'(clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)>(long, clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&) CGStmtOpenMP.cpp:0:0
#31 0x0000000003f614ca clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f614ca)
#32 0x0000000003f61624 (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) CGOpenMPRuntime.cpp:0:0
#33 0x0000000003b645c1 clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt const&, clang::SourceLocation) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b645c1)
#34 0x0000000003f94412 std::_Function_handler<llvm::Function* (llvm::StringRef), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool, clang::CodeGen::RegionCodeGenTy const&)::'lambda'(llvm::StringRef)>::_M_invoke(std::_Any_data const&, llvm::StringRef&&) CGOpenMPRuntime.cpp:0:0
#35 0x00000000068e7874 llvm::OpenMPIRBuilder::emitTargetRegionFunction(llvm::OffloadEntriesInfoManager&, llvm::TargetRegionEntryInfo&, std::function<llvm::Function* (llvm::StringRef)>&, int, int, bool, llvm::Function*&, llvm::Constant*&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x68e7874)
#36 0x0000000003f719d8 clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f719d8)
#37 0x0000000003f578c0 clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunction(clang::OMPExecutableDirective const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3f578c0)
#38 0x0000000003b36d1d emitCommonOMPTargetDirective(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&, clang::CodeGen::RegionCodeGenTy const&) (.constprop.0) CGStmtOpenMP.cpp:0:0
#39 0x0000000003b372b2 clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective(clang::OMPTargetTeamsDistributeParallelForDirective const&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b372b2)
#40 0x0000000003b1bf14 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b1bf14)
#41 0x0000000003b74dea clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b74dea)
#42 0x0000000003b87977 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3b87977)
#43 0x0000000003bdc95d clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3bdc95d)
#44 0x0000000003bd73f5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3bd73f5)
#45 0x0000000003be19b3 clang::CodeGen::CodeGenModule::EmitDeferred() (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3be19b3)
#46 0x0000000003be1908 clang::CodeGen::CodeGenModule::EmitDeferred() (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3be1908)
#47 0x0000000003be4686 clang::CodeGen::CodeGenModule::Release() (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x3be4686)
#48 0x000000000498acda (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#49 0x0000000004988315 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x4988315)
#50 0x0000000005670169 clang::ParseAST(clang::Sema&, bool, bool) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x5670169)
#51 0x0000000004227c19 clang::FrontendAction::Execute() (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x4227c19)
#52 0x00000000041ad7d6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x41ad7d6)
#53 0x00000000042f06b8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0x42f06b8)
#54 0x0000000000bc10ee cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0xbc10ee)
#55 0x0000000000bbd22e ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#56 0x0000000000bbdb4b clang_main(int, char**) (/autofs/nccs-svm1_sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin/clang-17+0xbbdb4b)
#57 0x00007f30c6ad62bd __libc_start_main (/lib64/libc.so.6+0x352bd)
#58 0x0000000000bb820a _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122:0
clang-17: error: unable to execute command: Aborted
clang-17: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 17.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /sw/crusher/ums/ums012/llvm/17.0.0-20230206/bin
clang-17: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-17: note: diagnostic msg: /tmp/lsms_triangular_packing-8185e2.cpp
clang-17: note: diagnostic msg: /tmp/lsms_triangular_packing-b02ef3.cpp
clang-17: note: diagnostic msg: /tmp/lsms_triangular_packing-8185e2.sh
clang-17: note: diagnostic msg: 

********************

lsms_triangular_packing-.zip

llvmbot commented 1 year ago

@llvm/issue-subscribers-clang-codegen