Comments (6)
Ha! Adding -o qasm:shared=True
actually works 🎉 Thank you!
from qe-compiler.
Great, I still view this as a temporary workaround as it should be enabled by default (@kevinhartman?)
from qe-compiler.
Same with debug build. Backtrace with more info here:
❯ lldb ./test/unittest/unittest-qss-compiler
(lldb) target create "./test/unittest/unittest-qss-compiler"
Current executable set to '/Users/tinow/zi/git/ibm/qss-compiler/build-debug/test/unittest/unittest-qss-compiler' (arm64).
(lldb) run
Process 42068 launched: '/Users/tinow/zi/git/ibm/qss-compiler/build-debug/test/unittest/unittest-qss-compiler' (arm64)
Process 42068 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000105c8d88c unittest-qss-compiler`std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__insert_node_at(this=0x00000001071f36c0, __parent=0x00000001071f36c8, __child=0x00000001071f36c8, __new_node=0x0000600000c040f0) at __tree:2078:25
2075 __new_node->__parent_ = __parent;
2076 // __new_node->__is_black_ is initialized in __tree_balance_after_insert
2077 __child = __new_node;
-> 2078 if (__begin_node()->__left_ != nullptr)
2079 __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_);
2080 _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child);
2081 ++size();
Target 0: (unittest-qss-compiler) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000105c8d88c unittest-qss-compiler`std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__insert_node_at(this=0x00000001071f36c0, __parent=0x00000001071f36c8, __child=0x00000001071f36c8, __new_node=0x0000600000c040f0) at __tree:2078:25
frame #1: 0x0000000105e7f2a4 unittest-qss-compiler`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__tree_node<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__emplace_unique_key_args<unsigned int, std::__1::pair<unsigned int, QASM::ASTDeclarationContext const*> >(this=0x00000001071f36c0, __k=0x000000016fdfd098, __args=0x000000016fdfd098) at __tree:2096:9
frame #2: 0x0000000105e7f1ac unittest-qss-compiler`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__tree_node<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__emplace_unique_extract_key[abi:v15006]<std::__1::pair<unsigned int, QASM::ASTDeclarationContext const*> >(this=0x00000001071f36c0, __x=0x000000016fdfd098, (null)=__extract_key_first_tag @ 0x000000016fdfcee7) at __tree:1207:14
frame #3: 0x0000000105e7f128 unittest-qss-compiler`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__tree_node<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__emplace_unique[abi:v15006]<std::__1::pair<unsigned int, QASM::ASTDeclarationContext const*> >(this=0x00000001071f36c0, __x=0x000000016fdfd098) at __tree:1171:16
frame #4: 0x0000000105e7f0a8 unittest-qss-compiler`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__tree_node<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__insert_unique[abi:v15006]<std::__1::pair<unsigned int, QASM::ASTDeclarationContext const*>, void>(this=0x00000001071f36c0, __v=0x000000016fdfd098) at __tree:1277:16
frame #5: 0x0000000105e7beb8 unittest-qss-compiler`std::__1::pair<std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__tree_node<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, void*>*, long> >, bool> std::__1::map<unsigned int, QASM::ASTDeclarationContext const*, std::__1::less<unsigned int>, std::__1::allocator<std::__1::pair<unsigned int const, QASM::ASTDeclarationContext const*> > >::insert[abi:v15006]<std::__1::pair<unsigned int, QASM::ASTDeclarationContext const*>, void>(this=0x00000001071f36c0 size=0, __p=0x000000016fdfd098) at map:1234:29
frame #6: 0x0000000105e7bb1c unittest-qss-compiler`QASM::ASTDeclarationContextTracker::Init() at ASTDeclarationContext.cpp:54:12
frame #7: 0x0000000105b87a7c unittest-qss-compiler`QASM::ASTDeclarationContextTracker::Instance() at ASTDeclarationContext.h:214:7
frame #8: 0x0000000105d7aea4 unittest-qss-compiler`QASM::ASTIdentifierNode::ASTIdentifierNode(this=0x00000001071f3b38, Id="char", STy=ASTTypeChar, B=8) at ASTIdentifier.h:129:7
frame #9: 0x0000000105d12eac unittest-qss-compiler`QASM::ASTIdentifierNode::ASTIdentifierNode(this=0x00000001071f3b38, Id="char", STy=ASTTypeChar, B=8) at ASTIdentifier.h:133:27
frame #10: 0x0000000105f21244 unittest-qss-compiler`::__cxx_global_var_init() at ASTIdentifier.cpp:39:20
frame #11: 0x0000000105f260e4 unittest-qss-compiler`_GLOBAL__I_000201 at ASTIdentifier.cpp:0
frame #12: 0x00000001ae8837c4 dyld`invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 156
frame #13: 0x00000001ae8c8214 dyld`invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 340
frame #14: 0x00000001ae8bb524 dyld`invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 524
frame #15: 0x00000001ae8682d8 dyld`dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 296
frame #16: 0x00000001ae8ba548 dyld`dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
frame #17: 0x00000001ae8c7bf4 dyld`dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 516
frame #18: 0x00000001ae88369c dyld`dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 176
frame #19: 0x00000001ae883950 dyld`dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 216
frame #20: 0x00000001ae883ae8 dyld`dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 328
frame #21: 0x00000001ae8a64b8 dyld`dyld4::APIs::runAllInitializersForMain() + 480
frame #22: 0x00000001ae86cdd8 dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3500
frame #23: 0x00000001ae86bdc4 dyld`start + 2404
from qe-compiler.
Due to issues with the qss-qasm parser you must build with shared libraries, have you tried building with conan install .. --profile default --update --build=outdated -o qasm:shared
?
from qe-compiler.
See this comment #82 (comment)
from qe-compiler.
We ought to make it the default, at least for macOS. Here are our options:
- Make it default, but for macOS, only. This should be doable within our conanfile.
- Make it default for everything. This is unfortunately not straightforward, since there are issues with dynamically linking to Qasm on Linux. This is likely an issue/bug with our Qasm Conan recipe that could be fixed with some effort.
(Note that we link GMP, MPFR, and MPC themselves dynamically on all platforms, but QASM statically by default today).
from qe-compiler.
Related Issues (20)
- Default Conan profile on Ubuntu 22 uses libstdc++ instead of libstdc++11. HOT 1
- Expose `compile()` via a new library based on `QSSCLib`
- VariableEliminationPass (quir-eliminate-variables) causing test failures on M1 HOT 2
- libzip build issue on vanilla Ubuntu 22.04 HOT 2
- CMake project target CXX build issue on vanilla Ubuntu 22.04 HOT 3
- Building conan cache is slow on vanilla Ubuntu 22.04 HOT 2
- Compiler CLI --direct and python_lib compile_str() doesn't work HOT 1
- Lowering to Pulse Dialect HOT 2
- Python bindings to QSSC AST/IR
- [feature request] alternative to --config CLI flag
- Upgrade MLIR interfaces to work with LLVM 16.
- Rename from qss (quantum systems software) to qe (quantum engine) - compiler
- ThreadedCompilationManager is not threadsafe for multiple concurrent calls
- Parametric performance regression with update to LLVM 17
- Need to add Codeowners file
- Mock tests are failing with debug builds
- Add support for operation precedance in expression
- Failure to parse classical expressions with binary and unary operations combined
- question: how to develop based on qe-compiler HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qe-compiler.