[flang-commits] [flang] [flang][OpenMP] Enable delayed privatization for `omp parallel` by default (PR #90945)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Tue Jun 11 12:11:11 PDT 2024
luporl wrote:
Fujitsu testsuite results:
Before:
```
Total Discovered Tests: 32226
Passed : 30911 (95.92%)
Failed : 1112 (3.45%)
Executable Missing: 203 (0.63%)
```
After:
```
Total Discovered Tests: 32226
Passed : 30913 (95.93%)
Failed : 1072 (3.33%)
Executable Missing: 241 (0.75%)
```
2 tests now pass:
```
test-suite :: Fujitsu/Fortran/0134/Fujitsu-Fortran-0134_0199.test
test-suite :: Fujitsu/Fortran/0292/Fujitsu-Fortran-0292_0009.test
```
But several failures became "executable missing", which means the compilation failed.
With the patch applied, after the build stage I see a bunch of core files.
It would be nice to take a look at these crashes.
This is one of them:
```
FAILED: Fujitsu/Fortran/0007/CMakeFiles/Fujitsu-Fortran-0007_0019.dir/0007_0019.f90.o Fujitsu/Fortran/0007/Fujitsu-Fortran-0007_0019.d/m0.mod Fujitsu/Fortran/0007/Fujitsu-Fortran-0007_0019.d/m1.mod
/home/leandro.lupori/git/flang-luporl/install/bin/flang-new -I/home/leandro.lupori/git/llvm-test-suite/Fujitsu/Fortran/0007 -module-dirFujitsu/Fortran/0007/Fujitsu-Fortran-0007_0019.d -fopenmp -c Fujitsu/Fortran/0007/CMakeFiles/Fujitsu-
Fortran-0007_0019.dir/0007_0019.f90-pp.f90 -o Fujitsu/Fortran/0007/CMakeFiles/Fujitsu-Fortran-0007_0019.dir/0007_0019.f90.o
flang-new: /home/leandro.lupori/git/flang-luporl/llvm-project/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp:1789: Operation *parentLLVMModule(Operation *): Assertion `module && "unexpected operation outside of a module"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/leandro.lupori/git/flang-luporl/install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -I /home/leandro.lupori/git/llvm-test-suite/Fujitsu/Fortran/0007 -mrelocation-model pic -pic-level 2
-pic-is-pie -target-cpu generic -target-feature +outline-atomics -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -module-dir Fujitsu/Fortran/0007/Fujitsu-Fortran-0007_0019.d -fopenmp -resource-dir /home/leandro.lup
ori/git/flang-luporl/install/bin/.. -mframe-pointer=non-leaf -o Fujitsu/Fortran/0007/CMakeFiles/Fujitsu-Fortran-0007_0019.dir/0007_0019.f90.o -x f95-cpp-input Fujitsu/Fortran/0007/CMakeFiles/Fujitsu-Fortran-0007_0019.dir/0007_0019.f90-p
p.f90
#0 0x0000aaaad364ba68 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e57a68)
#1 0x0000aaaad36498b4 llvm::sys::RunSignalHandlers() (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e558b4)
#2 0x0000aaaad364c460 SignalHandler(int) Signals.cpp:0:0
#3 0x0000ffffbb7bf5c0 (linux-vdso.so.1+0x5c0)
#4 0x0000ffffbb2df200 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x0000ffffbb29a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
#6 0x0000ffffbb287130 abort ./stdlib/abort.c:81:7
#7 0x0000ffffbb293fd0 __assert_fail_base ./assert/assert.c:89:7
#8 0x0000ffffbb294040 __assert_perror_fail ./assert/assert-perr.c:31:1
#9 0x0000aaaad5ae0910 parentLLVMModule(mlir::Operation*) LLVMDialect.cpp:0:0
#10 0x0000aaaad5ae084c mlir::LLVM::AddressOfOp::getGlobal(mlir::SymbolTableCollection&) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x52ec84c)
#11 0x0000aaaad55d2260 convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) LLVMToLLVMIRTranslation.cpp:0:0
#12 0x0000aaaad583b580 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5047580)
#13 0x0000aaaad583c098 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5048098)
#14 0x0000aaaad50bc274 inlineConvertOmpRegions(mlir::Region&, llvm::StringRef, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&, llvm::SmallVectorImpl<llvm::Value*>*) OpenMPToLLVMIRTranslation.cpp:0:0
#15 0x0000aaaad50bfe8c llvm::IRBuilderBase::InsertPoint llvm::function_ref<llvm::IRBuilderBase::InsertPoint (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value&, llvm::Value&, llvm::Value*&)>::callback_fn<co
nvertOmpParallel(mlir::omp::ParallelOp, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&)::$_2>(long, llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value&, llvm::Value&, llvm::Value*&) OpenMPToLLVMIRTrans
lation.cpp:0:0
#16 0x0000aaaad6c23ba0 llvm::OpenMPIRBuilder::createParallel(llvm::OpenMPIRBuilder::LocationDescription const&, llvm::IRBuilderBase::InsertPoint, llvm::function_ref<void (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoin
t)>, llvm::function_ref<llvm::IRBuilderBase::InsertPoint (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value&, llvm::Value&, llvm::Value*&)>, std::function<void (llvm::IRBuilderBase::InsertPoint)>, llvm::Val
ue*, llvm::Value*, llvm::omp::ProcBindKind, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x642fba0)
#17 0x0000aaaad50af298 convertHostOrTargetOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
#18 0x0000aaaad583b580 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5047580)
#19 0x0000aaaad583c098 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5048098)
#20 0x0000aaaad50ba794 convertOmpOpRegions(mlir::Region&, llvm::StringRef, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&, mlir::LogicalResult&, llvm::SmallVectorImpl<llvm::PHINode*>*) OpenMPToLLVMIRTranslation.cpp:0:0
#21 0x0000aaaad50be1d0 void llvm::function_ref<void (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint)>::callback_fn<convertOmpParallel(mlir::omp::ParallelOp, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&)::$_1>
(long, llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint) OpenMPToLLVMIRTranslation.cpp:0:0
#22 0x0000aaaad6c230b8 llvm::OpenMPIRBuilder::createParallel(llvm::OpenMPIRBuilder::LocationDescription const&, llvm::IRBuilderBase::InsertPoint, llvm::function_ref<void (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoin
t)>, llvm::function_ref<llvm::IRBuilderBase::InsertPoint (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value&, llvm::Value&, llvm::Value*&)>, std::function<void (llvm::IRBuilderBase::InsertPoint)>, llvm::Val
ue*, llvm::Value*, llvm::omp::ProcBindKind, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x642f0b8)
#23 0x0000aaaad50af298 convertHostOrTargetOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
#24 0x0000aaaad583b580 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5047580)
#25 0x0000aaaad583c098 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x5048098)
#26 0x0000aaaad583f1c0 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x504b1c0)
#27 0x0000aaaad5841038 mlir::LLVM::ModuleTranslation::convertFunctions() (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x504d038)
#28 0x0000aaaad584304c mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef, bool) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x504f04c)
#29 0x0000aaaad3683c60 Fortran::frontend::CodeGenAction::generateLLVMIR() (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e8fc60)
#30 0x0000aaaad36867f4 Fortran::frontend::CodeGenAction::executeAction() (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e927f4)
#31 0x0000aaaad3678244 Fortran::frontend::FrontendAction::execute() (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e84244)
#32 0x0000aaaad36637f4 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e6f7f4)
#33 0x0000aaaad367bff4 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2e87ff4)
#34 0x0000aaaad32bb42c fc1_main(llvm::ArrayRef<char const*>, char const*) (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2ac742c)
#35 0x0000aaaad32b9cb8 main (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2ac5cb8)
#36 0x0000ffffbb2873fc __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#37 0x0000ffffbb2874cc call_init ./csu/../csu/libc-start.c:128:20
#38 0x0000ffffbb2874cc __libc_start_main ./csu/../csu/libc-start.c:379:5
#39 0x0000aaaad32b9770 _start (/home/leandro.lupori/git/flang-luporl/install/bin/flang-new+0x2ac5770)
flang-new: error: unable to execute command: Aborted (core dumped)
flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
flang-new version 19.0.0git (git at github.com:luporl/llvm-project.git 33c2f9ce4fd76dc48ed8b934be51badb075b6e57)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/leandro.lupori/git/flang-luporl/install/bin
Build config: +assertions
flang-new: note: diagnostic msg:
```
https://github.com/llvm/llvm-project/pull/90945
More information about the flang-commits
mailing list