Closed 1tnguyen closed 5 months ago
What is the error?
I believe you can search our codebase for FIXME: https://github.com/NVIDIA/cuda-quantum/issues/1111
. Here is one example:
https://github.com/NVIDIA/cuda-quantum/blob/main/test/Remote-Sim/args_parsing.cpp#L11 .
I wonder if it's possible that it's also just missing the %cpp_std
from those tests?
The linked one [Ed: all of them] has a REQUIRES: c++20
which empirically avoids the broken configuration.
Still would be good to know what the failure mode actually is.
The linked one [Ed: all of them] has a
REQUIRES: c++20
which empirically avoids the broken configuration.Still would be good to know what the failure mode actually is.
I just checked. 3 tests pass when setting the appropriate --std=c++17 flag, the the failures for the others are the following:
These all run into the same issue, which looks related to serialization/deserialization (@1tnguyen I though we didn't have a new dependency there, do we?):
JIT session error: Symbols not found: [ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEcvSt17basic_string_viewIcS2_EEv ]
Failure value returned from cantFail wrapped call
Failed to materialize symbols: { (main, { _ZGVN5cudaq5types1h4nameB5cxx11E, _ZN9__gnu_cxx13new_allocatorISt7complexIdEED2Ev, _ZNSt12_Destroy_auxILb1EE9__destroyIPSt7complexIdEEEvT_S5_, _ZN5cudaq5types1x4nameB5cxx11E, _ZNSt5tupleIJSt6vectorImSaImEES0_ISt7complexIdESaIS4_EEEED2Ev, _ZNSt13unordered_mapISt6vectorIbSaIbEESt7complexIdESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S4_EEED2Ev, _ZN5cudaq9ResourcesC2Ev, _ZN5cudaq7details6futureC2Ev, _ZN5cudaq5types1h4nameB5cxx11E, _ZSt8_DestroyIPSt7complexIdEEvT_S3_, _ZNSt14_Optional_baseIPN5cudaq7spin_opELb1ELb1EEC2Ev, _ZNSt3mapIN5cudaq5pauliENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS1_ESaISt4pairIKS1_S7_EEED2Ev, _ZNSt6vectorIN5cudaq9QuditInfoESaIS1_EE3endEv, _ZNSt12_Vector_baseISt7complexIdESaIS1_EED2Ev, _ZNSt8optionalIPN5cudaq7spin_opEEC2Ev, _ZNSt8__detail21_Hash_node_value_baseISt4pairIKSt6vectorIbSaIbEESt7complexIdEEE9_M_valptrEv, _ZNSt8optionalIdEC2ESt9nullopt_t, _ZNSt22_Optional_payload_baseIN5cudaq13sample_resultEED2Ev, _ZNSt12_Vector_baseISt7complexIdESaIS1_EE19_M_get_Tp_allocatorEv, _ZNSt17_Optional_payloadIN5cudaq13sample_resultELb1ELb0ELb0EED2Ev, _ZN9__gnu_cxx17__normal_iteratorIPN5cudaq9QuditInfoESt6vectorIS2_SaIS2_EEEppEv, _ZNSt10_Head_baseILm1ESt6vectorISt7complexIdESaIS2_EELb0EED2Ev, _ZN5cudaq16ExecutionContextC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm, _ZNSt22_Optional_payload_baseIN5cudaq13sample_resultEE10_M_destroyEv, _ZSt10_ConstructIN5cudaq9QuditInfoEJRS1_EEvPT_DpOT0_, _ZNSt6vectorISt7complexIdESaIS1_EED2Ev, _ZNSt10unique_ptrIN5cudaq16ExecutionContextESt14default_deleteIS1_EEC2IS3_vEEPS1_, _ZNSt5tupleIJSt6vectorImSaImEES0_ISt7complexIdESaIS4_EEEEC2ILb1ELb1EEEv, _ZNSt8__detail21_Hashtable_ebo_helperILi0ESt8equal_toIN5cudaq9Resources11InstructionEELb1EEC2Ev, _ZNSt17_Optional_payloadIN5cudaq13sample_resultELb0ELb0ELb0EED2Ev, _ZNSt8_Rb_treeIN5cudaq5pauliESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stISA_ESt4lessIS1_ESaISA_EE8_S_rightEPSt18_Rb_tree_node_base, _ZNSt10unique_ptrIN5cudaq16ExecutionContextESt14default_deleteIS1_EED2Ev, _ZNSt13unordered_mapIN5cudaq9Resources11InstructionEmNS1_15InstructionHashESt8equal_toIS2_ESaISt4pairIKS2_mEEEC2Ev, _ZNSt22_Optional_payload_baseIN5cudaq13sample_resultEE8_M_resetEv, ...
The async functions run into an error due to a lack of suitable copy constructor for a tuple version that it seems to be picking up from the system:
/cuda-quantum/runtime/cudaq/algorithms/sample.h:168:23: note: in instantiation of function template specialization 'std::function<cudaq::sample_result ()>::function<(lambda at /cuda-quantum/runtime/cudaq/algorithms/sample.h:169:7), void>' requested here
KernelExecutionTask task(
^
/cuda-quantum/test/Remote-Sim/sample_async.cpp:31:38: note: in instantiation of function template specialization 'cudaq::sample_async<simpleX, unsigned long, void>' requested here
countFutures.emplace_back(cudaq::sample_async(i, simpleX{}, i + 1));
^
/cuda-quantum/runtime/cudaq/algorithms/sample.h:170:8: note: copy constructor of '(lambda at /cuda-quantum/runtime/cudaq/algorithms/sample.h:169:7)' is implicitly deleted because field '' has a deleted copy constructor
kernel = std::forward<KernelFunctor>(wrappedKernel)]() mutable {
^
/cuda-quantum/runtime/cudaq/algorithms/sample.h:389:8: note: copy constructor of '(lambda at /cuda-quantum/runtime/cudaq/algorithms/sample.h:388:7)' is implicitly deleted because field '' has a deleted copy constructor
...
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/tuple:660:17: note: explicitly defaulted function was implicitly deleted here
constexpr tuple(const tuple&) = default;
^
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/tuple:556:19: note: copy constructor of 'tuple<unsigned long &&>' is implicitly deleted because base class '_Tuple_impl<0, unsigned long &&>' has a deleted copy constructor
class tuple : public _Tuple_impl<0, _Elements...>
(same error if I add a gcc-11 toolchain installation, just now for the tuple implementation from there)
Possibly related: https://github.com/NVIDIA/cuda-quantum/issues/1281
Currently,
--target remote-mqpu
does not work with C++-17 standard. We need to add C++17 support for this target.