lana555 / dynamatic

MIT License
86 stars 38 forks source link

issues #5

Closed VPTT closed 2 years ago

VPTT commented 3 years ago

I was trying to run the elastic-circuits, however, I have faced some error:

opt: /home/vtt/llvm-6.0/include/polly/ScopInfo.h:983: polly::MemoryKind polly::MemoryAccess::getOriginalKind() const: Assertion `!getOriginalScopArrayInfo() || getOriginalScopArrayInfo()->getKind() == Kind' failed.
#0 0x000055e0283fcfca llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x000055e0283fb246 llvm::sys::RunSignalHandlers() /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Signals.cpp:50:0
#2 0x000055e0283fb37b SignalHandler(int) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Unix/Signals.inc:242:0
#3 0x00007fd80aea3980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007fd809f9bfb7 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x3efb7)
#5 0x00007fd809f9d921 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40921)
#6 0x00007fd809f8d48a (/lib/x86_64-linux-gnu/libc.so.6+0x3048a)
#7 0x00007fd809f8d502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#8 0x00007fd809d0c3f5 polly::MemoryAccess::getOriginalKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:984:0
#9 0x00007fd809d0c416 polly::MemoryAccess::isOriginalArrayKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:994:0
#10 0x00007fd809d0c436 polly::MemoryAccess::isArrayKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1004:0
#11 0x00007fd809d0c53b polly::ScopStmt::getArrayAccessOrNULLFor(llvm::Instruction const*) const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1473:0
#12 0x00007fd809d0c5bf polly::ScopStmt::getArrayAccessFor(llvm::Instruction const*) const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1489:0
#13 0x00007fd809d09f14 ScopMeta::addScopStmt(polly::ScopStmt&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:255:0
#14 0x00007fd809d08ac0 IndexAnalysisPass::processScop(polly::Scop&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:92:0
#15 0x00007fd809d0822e IndexAnalysisPass::runOnFunction(llvm::Function&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:21:0
#16 0x000055e027ea6208 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#17 0x000055e027ea6253 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, false, false, void> >::getNext() /home/vtt/Dynamic/Dynamatic/etc/llvm/include/llvm/ADT/ilist_node.h:67:0
#18 0x000055e027ea6253 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>::operator++() /home/vtt/Dynamic/Dynamatic/etc/llvm/include/llvm/ADT/ilist_iterator.h:159:0
#19 0x000055e027ea6253 llvm::FPPassManager::runOnModule(llvm::Module&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1540:0
#20 0x000055e027ea5a9f llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#21 0x000055e027685968 main /home/vtt/Dynamic/Dynamatic/etc/llvm/tools/opt/opt.cpp:765:0
#22 0x00007fd809f7ebf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7)
#23 0x000055e0276df91a _start (../../../llvm-6.0/bin/opt+0x3ac91a)
Stack dump:
0.  Program arguments: ../../../llvm-6.0/bin/opt -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S -use-lsq=false 
1.  Running pass 'Function Pass Manager' on module '_build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll'.
2.  Running pass 'Analyze array indices for intersecting sets' on function '@_Z5dummyii'
Makefile:14: recipe for target 'test_f' failed
make: [test_f] Aborted (core dumped) (ignored)
#-../../../llvm-6.0/bin/opt  -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass  _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S
rm *_freq.txt mapping.txt
mv print.txt _build/loop_array || true
mv: cannot stat 'print.txt': No such file or directory
#mv *_graph.dot _build/loop_array
mv *_graph.dot  _build/loop_array
mv: cannot stat '*_graph.dot': No such file or directory
Makefile:45: recipe for target 'graph_f' failed
make: *** [graph_f] Error 1

opt: /home/vtt/llvm-6.0/include/polly/ScopInfo.h:983: polly::MemoryKind polly::MemoryAccess::getOriginalKind() const: Assertion `!getOriginalScopArrayInfo() || getOriginalScopArrayInfo()->getKind() == Kind' failed. Makefile:14: recipe for target 'test_f' failed make: [test_f] Aborted (core dumped) (ignored) I don’t know how to solve these problem. Thank you very much for your help!

minseongg commented 3 years ago

I'm having the same problem. If you have solved it, could you share the workaround?

VPTT commented 3 years ago

I'm having the same problem. If you have solved it, could you share the workaround?

Sorry, I didn't solve this problem either. If you make progress, can we communicate?

Andrea-Guerrieri commented 3 years ago

Hi!

Thanks for your report. Is this happening on the VM or in your local installation? Can you please give me more details about the running platform and the specific example that cause this problem?

Thank you.

Andrea

lana555 commented 3 years ago

Hi,

It seems like the same problem as what was discussed here: https://github.com/lana555/dynamatic/issues/3

Could you perhaps try building LLVM in CMake Debug mode?

minseongg commented 3 years ago

I think it solved by building LLVM in CMake Debug mode. Thanks!