Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qsim pre-release not building #457

Open
as3232cornell opened this issue Oct 18, 2021 · 12 comments
Open

Qsim pre-release not building #457

as3232cornell opened this issue Oct 18, 2021 · 12 comments
Assignees

Comments

@as3232cornell
Copy link

as3232cornell commented Oct 18, 2021

Hello,
I was attempting to install the pre-release version of qsim in a fresh anaconda environment by running
git clone https://github.com/quantumlib/qsim.git cd qsim make pip install .

This gave me the following error:


ERROR: Command errored out with exit status 1:
   command: /usr/local/anaconda/envs/qsimgpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_42nhc9t
       cwd: /tmp/pip-req-build-hk0f57yq/
  Complete output (292 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/_version.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/__init__.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/py.typed -> build/lib.linux-x86_64-3.7/qsimcirq
  running build_ext
  -- The CXX compiler identification is GNU 5.5.0
  -- The CUDA compiler identification is unknown
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Detecting CUDA compiler ABI info
  -- Detecting CUDA compiler ABI info - failed
  -- Check for working CUDA compiler: /usr/bin/nvcc
  -- Check for working CUDA compiler: /usr/bin/nvcc - broken
  CMake Error at /usr/local/anaconda/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/CMakeTestCUDACompiler.cmake:52 (message):
    The CUDA compiler
  
      "/usr/bin/nvcc"
  
    is not able to compile a simple test program.
  
    It fails with the following output:
  
      Change Dir: /tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp
  
      Run Build Command(s):/usr/bin/make cmTC_2934f/fast && /usr/bin/make  -f CMakeFiles/cmTC_2934f.dir/build.make CMakeFiles/cmTC_2934f.dir/build
      make[1]: Entering directory '/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
      Building CUDA object CMakeFiles/cmTC_2934f.dir/main.cu.o
      /usr/bin/nvcc      -c /tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_2934f.dir/main.cu.o
      /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h(444): error: identifier "nullptr" is undefined
  
      /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h(444): error: expected a ";"
  
      /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h(235): error: expected a ";"
  
      /usr/include/c++/7/bits/exception.h(63): error: expected a ";"
  
      /usr/include/c++/7/bits/exception.h(69): error: expected a ";"
  
      /usr/include/c++/7/exception(49): error: expected a ";"
  
      /usr/include/c++/7/exception(57): error: expected a ";"
  
      /usr/include/c++/7/exception(67): error: expected a "{"
  
      /usr/include/c++/7/bits/cxxabi_init_exception.h(63): error: expected a "{"
  
      /usr/include/c++/7/typeinfo(99): error: expected a ";"
  
      /usr/include/c++/7/typeinfo(187): error: not a class or struct name
  
      /usr/include/c++/7/typeinfo(190): error: expected a ";"
  
      /usr/include/c++/7/typeinfo(197): error: expected a ";"
  
      /usr/include/c++/7/typeinfo(204): error: not a class or struct name
  
      /usr/include/c++/7/typeinfo(207): error: expected a ";"
  
      /usr/include/c++/7/typeinfo(214): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(63): error: function "__cxxabiv1::std::current_exception" returns incomplete type "__cxxabiv1::std::__exception_ptr::exception_ptr"
  
      /usr/include/c++/7/bits/exception_ptr.h(63): error: expected a "{"
  
      /usr/include/c++/7/bits/exception_ptr.h(73): error: namespace "__cxxabiv1::std" has no member "rethrow_exception"
  
      /usr/include/c++/7/bits/exception_ptr.h(83): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(85): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(86): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(88): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(90): error: declaration is incompatible with previous "__cxxabiv1::std::current_exception"
      (63): here
  
      /usr/include/c++/7/bits/exception_ptr.h(90): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(90): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(91): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(93): error: namespace "__cxxabiv1::std" has no member "make_exception_ptr"
  
      /usr/include/c++/7/bits/exception_ptr.h(93): error: a template friend declaration cannot be declared in a local class
  
      /usr/include/c++/7/bits/exception_ptr.h(93): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(96): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(98): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(101): error: incomplete type is not allowed
  
      /usr/include/c++/7/bits/exception_ptr.h(101): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(122): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(132): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(149): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(150): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(153): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(158): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(159): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(162): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(163): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(166): error: use of a local type to declare a function
  
      /usr/include/c++/7/bits/exception_ptr.h(167): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(179): error: expected a ";"
  
      /usr/include/c++/7/bits/exception_ptr.h(220): error: expected a ";"
  
      /usr/include/c++/7/bits/move.h(46): error: identifier "constexpr" is undefined
  
      /usr/include/c++/7/bits/move.h(46): error: "_Tp" is not a function or static data member
  
      /usr/include/c++/7/bits/move.h(51): error: expected a ";"
  
      /usr/include/c++/7/type_traits(71): error: identifier "constexpr" is undefined
  
      /usr/include/c++/7/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope
  
      /usr/include/c++/7/type_traits(71): error: expected a ";"
  
      /usr/include/c++/7/type_traits(72): error: member "__cxxabiv1::std::integral_constant<_Tp, __v>::_Tp" is not a type name
  
      /usr/include/c++/7/type_traits(73): error: member "__cxxabiv1::std::integral_constant<_Tp, __v>::_Tp" is not a type name
  
      /usr/include/c++/7/type_traits(74): error: identifier "constexpr" is undefined
  
      /usr/include/c++/7/type_traits(74): error: expected a ";"
  
      /usr/include/c++/7/type_traits(84): error: identifier "constexpr" is undefined
  
      /usr/include/c++/7/type_traits(84): error: "_Tp" is not a function or static data member
  
      /usr/include/c++/7/type_traits(93): error: expected a declaration
  
      /usr/include/c++/7/type_traits(93): error: expected a ";"
  
      /usr/include/c++/7/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(154): error: __bool_constant is not a template
  
      /usr/include/c++/7/type_traits(154): error: not a class or struct name
  
      /usr/include/c++/7/type_traits(245): error: identifier "char16_t" is undefined
  
      /usr/include/c++/7/type_traits(249): error: identifier "char32_t" is undefined
  
      /usr/include/c++/7/type_traits(249): error: class "__cxxabiv1::std::__is_integral_helper<<error-type>>" has already been defined
  
      /usr/include/c++/7/type_traits(362): error: namespace "__cxxabiv1::std" has no member "size_t"
  
      /usr/include/c++/7/type_traits(463): error: expected a ">"
  
      /usr/include/c++/7/type_traits(467): error: expected a ">"
  
      /usr/include/c++/7/type_traits(475): error: expected a ">"
  
      /usr/include/c++/7/type_traits(479): error: expected a ">"
  
      /usr/include/c++/7/type_traits(487): error: expected a ">"
  
      /usr/include/c++/7/type_traits(491): error: expected a ">"
  
      /usr/include/c++/7/type_traits(499): error: expected a ">"
  
      /usr/include/c++/7/type_traits(503): error: expected a ">"
  
      /usr/include/c++/7/type_traits(511): error: expected a ">"
  
      /usr/include/c++/7/type_traits(515): error: expected a ">"
  
      /usr/include/c++/7/type_traits(523): error: expected a ">"
  
      /usr/include/c++/7/type_traits(527): error: expected a ">"
  
      /usr/include/c++/7/type_traits(535): error: expected a ">"
  
      /usr/include/c++/7/type_traits(539): error: expected a ">"
  
      /usr/include/c++/7/type_traits(547): error: expected a ">"
  
      /usr/include/c++/7/type_traits(551): error: expected a ">"
  
      /usr/include/c++/7/type_traits(561): error: namespace "__cxxabiv1::std" has no member "nullptr_t"
  
      /usr/include/c++/7/type_traits(582): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(588): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(595): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(612): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(638): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(748): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(762): error: expected a ";"
  
      /usr/include/c++/7/type_traits(777): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      /usr/include/c++/7/type_traits(787): error: expected a ")"
  
      /usr/include/c++/7/type_traits(798): error: an explicit template argument list is not allowed on this declaration
  
      /usr/include/c++/7/type_traits(798): error: expected a type specifier
  
      /usr/include/c++/7/type_traits(798): error: function returning function is not allowed
  
      /usr/include/c++/7/type_traits(798): error: expected a ";"
  
      /usr/include/c++/7/type_traits(804): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
  
      Error limit reached.
      100 errors detected in the compilation of "/tmp/tmpxft_0000e260_00000000-6_main.cpp1.ii".
      Compilation terminated.
      CMakeFiles/cmTC_2934f.dir/build.make:84: recipe for target 'CMakeFiles/cmTC_2934f.dir/main.cu.o' failed
      make[1]: *** [CMakeFiles/cmTC_2934f.dir/main.cu.o] Error 1
      make[1]: Leaving directory '/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
      Makefile:140: recipe for target 'cmTC_2934f/fast' failed
      make: *** [cmTC_2934f/fast] Error 2
  
  
  
  
  
    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:7 (project)
  
  
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-hk0f57yq/setup.py", line 112, in <module>
      package_data={"qsimcirq": ["py.typed"]},
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-hk0f57yq/setup.py", line 36, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-hk0f57yq/setup.py", line 73, in build_extension
      ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env
    File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/subprocess.py", line 363, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-hk0f57yq', '-DCMAKE_CUDA_COMPILER=nvcc', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-hk0f57yq/build/lib.linux-x86_64-3.7/qsimcirq', '-DPYTHON_EXECUTABLE=/usr/local/anaconda/envs/qsimgpu/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for qsimcirq
  Running setup.py clean for qsimcirq
Failed to build qsimcirq
Installing collected packages: zipp, typing-extensions, pytz, python-dateutil, pyparsing, pillow, mpmath, kiwisolver, cycler, typed-ast, tqdm, toml, sympy, sortedcontainers, scipy, regex, py, pluggy, pathspec, pandas, packaging, networkx, mypy-extensions, matplotlib, iniconfig, click, astor, appdirs, pytest, pybind11, flynt, black, absl-py, qsimcirq
    Running setup.py install for qsimcirq ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda/envs/qsimgpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pen2_925/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/envs/qsimgpu/include/python3.7m/qsimcirq
         cwd: /tmp/pip-req-build-hk0f57yq/
    Complete output (294 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/_version.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/__init__.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/py.typed -> build/lib.linux-x86_64-3.7/qsimcirq
    running build_ext
    -- The CXX compiler identification is GNU 5.5.0
    -- The CUDA compiler identification is unknown
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting CUDA compiler ABI info
    -- Detecting CUDA compiler ABI info - failed
    -- Check for working CUDA compiler: /usr/bin/nvcc
    -- Check for working CUDA compiler: /usr/bin/nvcc - broken
    CMake Error at /usr/local/anaconda/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/CMakeTestCUDACompiler.cmake:52 (message):
      The CUDA compiler
    
        "/usr/bin/nvcc"
    
      is not able to compile a simple test program.
    
      It fails with the following output:
    
        Change Dir: /tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp
    
        Run Build Command(s):/usr/bin/make cmTC_ac0ab/fast && /usr/bin/make  -f CMakeFiles/cmTC_ac0ab.dir/build.make CMakeFiles/cmTC_ac0ab.dir/build
        make[1]: Entering directory '/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
        Building CUDA object CMakeFiles/cmTC_ac0ab.dir/main.cu.o
        /usr/bin/nvcc      -c /tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_ac0ab.dir/main.cu.o
        /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h(444): error: identifier "nullptr" is undefined
    
        /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h(444): error: expected a ";"
    
        /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h(235): error: expected a ";"
    
        /usr/include/c++/7/bits/exception.h(63): error: expected a ";"
    
        /usr/include/c++/7/bits/exception.h(69): error: expected a ";"
    
        /usr/include/c++/7/exception(49): error: expected a ";"
    
        /usr/include/c++/7/exception(57): error: expected a ";"
    
        /usr/include/c++/7/exception(67): error: expected a "{"
    
        /usr/include/c++/7/bits/cxxabi_init_exception.h(63): error: expected a "{"
    
        /usr/include/c++/7/typeinfo(99): error: expected a ";"
    
        /usr/include/c++/7/typeinfo(187): error: not a class or struct name
    
        /usr/include/c++/7/typeinfo(190): error: expected a ";"
    
        /usr/include/c++/7/typeinfo(197): error: expected a ";"
    
        /usr/include/c++/7/typeinfo(204): error: not a class or struct name
    
        /usr/include/c++/7/typeinfo(207): error: expected a ";"
    
        /usr/include/c++/7/typeinfo(214): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(63): error: function "__cxxabiv1::std::current_exception" returns incomplete type "__cxxabiv1::std::__exception_ptr::exception_ptr"
    
        /usr/include/c++/7/bits/exception_ptr.h(63): error: expected a "{"
    
        /usr/include/c++/7/bits/exception_ptr.h(73): error: namespace "__cxxabiv1::std" has no member "rethrow_exception"
    
        /usr/include/c++/7/bits/exception_ptr.h(83): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(85): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(86): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(88): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(90): error: declaration is incompatible with previous "__cxxabiv1::std::current_exception"
        (63): here
    
        /usr/include/c++/7/bits/exception_ptr.h(90): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(90): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(91): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(93): error: namespace "__cxxabiv1::std" has no member "make_exception_ptr"
    
        /usr/include/c++/7/bits/exception_ptr.h(93): error: a template friend declaration cannot be declared in a local class
    
        /usr/include/c++/7/bits/exception_ptr.h(93): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(96): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(98): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(101): error: incomplete type is not allowed
    
        /usr/include/c++/7/bits/exception_ptr.h(101): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(122): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(132): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(149): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(150): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(153): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(158): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(159): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(162): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(163): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(166): error: use of a local type to declare a function
    
        /usr/include/c++/7/bits/exception_ptr.h(167): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(179): error: expected a ";"
    
        /usr/include/c++/7/bits/exception_ptr.h(220): error: expected a ";"
    
        /usr/include/c++/7/bits/move.h(46): error: identifier "constexpr" is undefined
    
        /usr/include/c++/7/bits/move.h(46): error: "_Tp" is not a function or static data member
    
        /usr/include/c++/7/bits/move.h(51): error: expected a ";"
    
        /usr/include/c++/7/type_traits(71): error: identifier "constexpr" is undefined
    
        /usr/include/c++/7/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope
    
        /usr/include/c++/7/type_traits(71): error: expected a ";"
    
        /usr/include/c++/7/type_traits(72): error: member "__cxxabiv1::std::integral_constant<_Tp, __v>::_Tp" is not a type name
    
        /usr/include/c++/7/type_traits(73): error: member "__cxxabiv1::std::integral_constant<_Tp, __v>::_Tp" is not a type name
    
        /usr/include/c++/7/type_traits(74): error: identifier "constexpr" is undefined
    
        /usr/include/c++/7/type_traits(74): error: expected a ";"
    
        /usr/include/c++/7/type_traits(84): error: identifier "constexpr" is undefined
    
        /usr/include/c++/7/type_traits(84): error: "_Tp" is not a function or static data member
    
        /usr/include/c++/7/type_traits(93): error: expected a declaration
    
        /usr/include/c++/7/type_traits(93): error: expected a ";"
    
        /usr/include/c++/7/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(154): error: __bool_constant is not a template
    
        /usr/include/c++/7/type_traits(154): error: not a class or struct name
    
        /usr/include/c++/7/type_traits(245): error: identifier "char16_t" is undefined
    
        /usr/include/c++/7/type_traits(249): error: identifier "char32_t" is undefined
    
        /usr/include/c++/7/type_traits(249): error: class "__cxxabiv1::std::__is_integral_helper<<error-type>>" has already been defined
    
        /usr/include/c++/7/type_traits(362): error: namespace "__cxxabiv1::std" has no member "size_t"
    
        /usr/include/c++/7/type_traits(463): error: expected a ">"
    
        /usr/include/c++/7/type_traits(467): error: expected a ">"
    
        /usr/include/c++/7/type_traits(475): error: expected a ">"
    
        /usr/include/c++/7/type_traits(479): error: expected a ">"
    
        /usr/include/c++/7/type_traits(487): error: expected a ">"
    
        /usr/include/c++/7/type_traits(491): error: expected a ">"
    
        /usr/include/c++/7/type_traits(499): error: expected a ">"
    
        /usr/include/c++/7/type_traits(503): error: expected a ">"
    
        /usr/include/c++/7/type_traits(511): error: expected a ">"
    
        /usr/include/c++/7/type_traits(515): error: expected a ">"
    
        /usr/include/c++/7/type_traits(523): error: expected a ">"
    
        /usr/include/c++/7/type_traits(527): error: expected a ">"
    
        /usr/include/c++/7/type_traits(535): error: expected a ">"
    
        /usr/include/c++/7/type_traits(539): error: expected a ">"
    
        /usr/include/c++/7/type_traits(547): error: expected a ">"
    
        /usr/include/c++/7/type_traits(551): error: expected a ">"
    
        /usr/include/c++/7/type_traits(561): error: namespace "__cxxabiv1::std" has no member "nullptr_t"
    
        /usr/include/c++/7/type_traits(582): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(588): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(595): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(612): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(638): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(748): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(762): error: expected a ";"
    
        /usr/include/c++/7/type_traits(777): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        /usr/include/c++/7/type_traits(787): error: expected a ")"
    
        /usr/include/c++/7/type_traits(798): error: an explicit template argument list is not allowed on this declaration
    
        /usr/include/c++/7/type_traits(798): error: expected a type specifier
    
        /usr/include/c++/7/type_traits(798): error: function returning function is not allowed
    
        /usr/include/c++/7/type_traits(798): error: expected a ";"
    
        /usr/include/c++/7/type_traits(804): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    
        Error limit reached.
        100 errors detected in the compilation of "/tmp/tmpxft_0000e2e4_00000000-6_main.cpp1.ii".
        Compilation terminated.
        CMakeFiles/cmTC_ac0ab.dir/build.make:84: recipe for target 'CMakeFiles/cmTC_ac0ab.dir/main.cu.o' failed
        make[1]: *** [CMakeFiles/cmTC_ac0ab.dir/main.cu.o] Error 1
        make[1]: Leaving directory '/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
        Makefile:140: recipe for target 'cmTC_ac0ab/fast' failed
        make: *** [cmTC_ac0ab/fast] Error 2
    
    
    
    
    
      CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
      CMakeLists.txt:7 (project)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
    See also "/tmp/pip-req-build-hk0f57yq/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-hk0f57yq/setup.py", line 112, in <module>
        package_data={"qsimcirq": ["py.typed"]},
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-hk0f57yq/setup.py", line 36, in run
        self.build_extension(ext)
      File "/tmp/pip-req-build-hk0f57yq/setup.py", line 73, in build_extension
        ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env
      File "/usr/local/anaconda/envs/qsimgpu/lib/python3.7/subprocess.py", line 363, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-hk0f57yq', '-DCMAKE_CUDA_COMPILER=nvcc', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-hk0f57yq/build/lib.linux-x86_64-3.7/qsimcirq', '-DPYTHON_EXECUTABLE=/usr/local/anaconda/envs/qsimgpu/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/anaconda/envs/qsimgpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-hk0f57yq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pen2_925/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/envs/qsimgpu/include/python3.7m/qsimcirq Check the logs for full command output.

After that, running python3 -c "import qsimcirq" gives the error


Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/as3232/qsim/qsimcirq/__init__.py", line 2, in <module>
    from qsimcirq import qsim_decide
ImportError: cannot import name 'qsim_decide' from 'qsimcirq' (/home/as3232/qsim/qsimcirq/__init__.py)

Could I get some assistance on what is going wrong? I am attempting to build the pre-release version of qsimcirq so that I can use GPU acceleration for circuit simulations.

@95-martin-orion
Copy link
Collaborator

I'll assume based on the logs that you're doing this on a Linux machine. With that being the case, there are a couple of possible issues you could check for:

  • Is NVCC on your PATH? You can follow the step 3.3 in this section to add NVCC to your PATH.
  • Is your CUDA version at least 9.0? Before that version, CUDA did not support all C++14 features (as shown here), and qsim requires C++14 to function.

@95-martin-orion
Copy link
Collaborator

It's also possible that you need a newer C++ compiler version; for example, GCC versions older than 5.0 do not support C++14, and C++14 only became the default after the GCC 6.1 release.

An aside: I received a previous comment via email, but it's not showing up here. If it's relevant, could you copy that comment here, along with any subsequent replies? Thanks!

@as3232cornell
Copy link
Author

Yes, sorry, I accidentally deleted the comment haha. I ran the command nvcc --version and the output was

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

However, I could not find the CUDA installation in the directory /usr/local (I am working on a remote server), so I am not sure exactly where it is installed. Further, I could not find the cuda directory in the $PATH variable. Perhaps that is the issue.

@as3232cornell
Copy link
Author

I found my CUDA installation directory /usr/lib/nvidia-cuda-toolkit/bin and added it to the $PATH variable. However, now I am getting a different error.
make seems to be succeeding, and it is returning

make -C apps/ qsim
make[1]: Entering directory '/home/as3232/qsim/apps'
g++ -o ./qsim_von_neumann.x qsim_von_neumann.cc -O3 -fopenmp -march=native
g++ -o ./qsim_amplitudes.x qsim_amplitudes.cc -O3 -fopenmp -march=native
g++ -o ./qsim_base.x qsim_base.cc -O3 -fopenmp -march=native
g++ -o ./qsimh_base.x qsimh_base.cc -O3 -fopenmp -march=native
g++ -o ./qsimh_amplitudes.x qsimh_amplitudes.cc -O3 -fopenmp -march=native
make[1]: Leaving directory '/home/as3232/qsim/apps'
make -C pybind_interface/ pybind
make[1]: Entering directory '/home/as3232/qsim/pybind_interface'
g++ basic/pybind_main_basic.cpp -o ../qsimcirq/qsim_basic`python3-config --extension-suffix` -O3 -fopenmp -Wall -shared -std=c++17 -fPIC `python3 -m pybind11 --includes`
g++ sse/pybind_main_sse.cpp -o ../qsimcirq/qsim_sse`python3-config --extension-suffix` -O3 -fopenmp -msse4.1 -Wall -shared -std=c++17 -fPIC `python3 -m pybind11 --includes`
g++ avx2/pybind_main_avx2.cpp -o ../qsimcirq/qsim_avx2`python3-config --extension-suffix` -O3 -fopenmp -mavx2 -mfma -Wall -shared -std=c++17 -fPIC `python3 -m pybind11 --includes`
g++ avx512/pybind_main_avx512.cpp -o ../qsimcirq/qsim_avx512`python3-config --extension-suffix` -O3 -fopenmp -mavx512f -Wall -shared -std=c++17 -fPIC `python3 -m pybind11 --includes`
nvcc cuda/pybind_main_cuda.cpp -o ../qsimcirq/qsim_cuda`python3-config --extension-suffix` -O3 -std=c++14 -x cu -Xcompiler "-Wall -shared -fPIC `python3 -m pybind11 --includes`"
cuda/../pybind_main.cpp(164): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(294): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(303): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(314): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(327): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(342): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(357): warning: statement is unreachable
          detected during instantiation of "std::complex<double> qsim::ExpectationValue<IO,Fuser,Simulator,Gate>(const std::vector<qsim::OpString<Gate>, std::allocator<qsim::OpString<Gate>>> &, const Simulator &, const Simulator::State &) [with IO=qsim::IO, Fuser=qsim::MultiQubitGateFuser<qsim::IO, qsim::Cirq::GateCirq<float>>, Simulator=SimulatorHelper::Simulator, Gate=qsim::Cirq::GateCirq<float>]" 
cuda/../pybind_main.cpp(685): here

cuda/../../lib/simulator_cuda.h(294): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(303): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(314): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(327): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(342): warning: statement is unreachable

cuda/../../lib/simulator_cuda.h(357): warning: statement is unreachable

cuda/../pybind_main.cpp(164): warning: statement is unreachable

nvcc decide/decide.cpp -o ../qsimcirq/qsim_decide`python3-config --extension-suffix` -O3 -std=c++14 -x cu -Xcompiler "-Wall -shared -fPIC `python3 -m pybind11 --includes`"
make[1]: Leaving directory '/home/as3232/qsim/pybind_interface'

But, pip install . is still failing, now with the error

WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
Processing /home/as3232/qsim
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cirq-core in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.13.0)
Requirement already satisfied: numpy~=1.16 in /home/as3232/.local/lib/python3.7/site-packages (from qsimcirq==0.10.2) (1.21.2)
Requirement already satisfied: typing_extensions in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (3.7.4.3)
Requirement already satisfied: absl-py in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.10.0)
Requirement already satisfied: black==20.8b1 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (20.8b1)
Requirement already satisfied: flynt~=0.60 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.69)
Requirement already satisfied: pybind11 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (2.6.2)
Requirement already satisfied: pytest in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (6.1.2)
Requirement already satisfied: appdirs in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (1.4.4)
Requirement already satisfied: regex>=2020.1.8 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (2021.4.4)
Requirement already satisfied: typed-ast>=1.4.0 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (1.4.1)
Requirement already satisfied: toml>=0.10.1 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.10.2)
Requirement already satisfied: pathspec<1,>=0.6 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.9.0)
Requirement already satisfied: click>=7.1.2 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (7.1.2)
Requirement already satisfied: mypy-extensions>=0.4.3 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.4.3)
Requirement already satisfied: astor in /usr/local/anaconda/lib/python3.7/site-packages (from flynt~=0.60->qsimcirq==0.10.2) (0.8.1)
Requirement already satisfied: six in /home/as3232/.local/lib/python3.7/site-packages (from absl-py->qsimcirq==0.10.2) (1.16.0)
Requirement already satisfied: sortedcontainers~=2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (2.2.2)
Requirement already satisfied: matplotlib~=3.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (3.3.4)
Requirement already satisfied: pandas in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.1.1)
Requirement already satisfied: networkx~=2.4 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (2.5)
Requirement already satisfied: duet~=0.2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (0.2.1)
Requirement already satisfied: tqdm in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (4.49.0)
Requirement already satisfied: sympy in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.7)
Requirement already satisfied: scipy in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.7.1)
Requirement already satisfied: pluggy<1.0,>=0.12 in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (0.13.1)
Requirement already satisfied: py>=1.8.2 in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (1.9.0)
Requirement already satisfied: importlib-metadata>=0.12 in /home/as3232/.local/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (3.10.1)
Requirement already satisfied: attrs>=17.4.0 in /home/as3232/.local/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (20.3.0)
Requirement already satisfied: iniconfig in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (1.1.1)
Requirement already satisfied: packaging in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (20.4)
Requirement already satisfied: zipp>=0.5 in /usr/local/anaconda/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest->qsimcirq==0.10.2) (3.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (7.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (0.10.0)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/anaconda/lib/python3.7/site-packages (from networkx~=2.4->cirq-core->qsimcirq==0.10.2) (4.4.2)
Requirement already satisfied: pytz>=2017.2 in /usr/local/anaconda/lib/python3.7/site-packages (from pandas->cirq-core->qsimcirq==0.10.2) (2020.1)
Requirement already satisfied: mpmath>=0.19 in /usr/local/anaconda/lib/python3.7/site-packages (from sympy->cirq-core->qsimcirq==0.10.2) (1.1.0)
Building wheels for collected packages: qsimcirq
  Building wheel for qsimcirq (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-awgazesh
       cwd: /home/as3232/qsim/
  Complete output (135 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/_version.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/__init__.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-3.7/qsimcirq
  copying qsimcirq/py.typed -> build/lib.linux-x86_64-3.7/qsimcirq
  running build_ext
  -- The CXX compiler identification is GNU 5.5.0
  -- The CUDA compiler identification is NVIDIA 10.0.130
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Detecting CUDA compiler ABI info
  -- Detecting CUDA compiler ABI info - done
  -- Check for working CUDA compiler: /usr/lib/nvidia-cuda-toolkit/bin/nvcc - skipped
  -- Detecting CUDA compile features
  -- Detecting CUDA compile features - done
  -- Found PythonInterp: /usr/local/anaconda/bin/python (found version "3.7.4")
  -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so
  -- Performing Test HAS_CPP14_FLAG
  -- Performing Test HAS_CPP14_FLAG - Success
  -- pybind11 v2.2.4
  -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so (found suitable version "3.7.4", minimum required is "3.6")
  -- Looking for C++ include pthread.h
  -- Looking for C++ include pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Found CUDA: /usr/lib/nvidia-cuda-toolkit (found version "10.0")
  -- The C compiler identification is GNU 5.5.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- LTO enabled
  -- Configuring done
  CMake Warning (dev) in pybind_interface/cuda/CMakeLists.txt:
    Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
    empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
    for policy details.  Use the cmake_policy command to set the policy and
    suppress this warning.
  
    CUDA_ARCHITECTURES is empty for target "qsim_cuda".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  CMake Warning (dev) in pybind_interface/decide/CMakeLists.txt:
    Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
    empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
    for policy details.  Use the cmake_policy command to set the policy and
    suppress this warning.
  
    CUDA_ARCHITECTURES is empty for target "qsim_decide".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Generating done
  -- Build files have been written to: /home/as3232/qsim/build/temp.linux-x86_64-3.7
  Scanning dependencies of target qsim_sse
  Scanning dependencies of target qsim_cuda
  [  8%] Building CXX object pybind_interface/sse/CMakeFiles/qsim_sse.dir/pybind_main_sse.cpp.o
  [ 16%] Building CUDA object pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o
  In file included from /usr/include/c++/7/forward_list:35:0,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/common.h:140,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pytypes.h:12,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/cast.h:13,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/attr.h:13,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pybind11.h:43,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/complex.h:12,
                   from /home/as3232/qsim/pybind_interface/cuda/../pybind_main.h:18,
                   from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.h:15,
                   from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.cpp:15:
  /usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   #error This file requires compiler and library support \
    ^~~~~
  In file included from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pybind11.h:45:0,
                   from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/complex.h:12,
                   from /home/as3232/qsim/pybind_interface/cuda/../pybind_main.h:18,
                   from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.h:15,
                   from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.cpp:15:
  /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/class.h:87:38: warning: missing terminating " character
       PyObject *result = PyRun_String(R"(\
                                        ^
  /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/class.h:95:10: warning: missing terminating " character
           )", Py_file_input, d.ptr(), d.ptr()
            ^
  pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/build.make:81: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o' failed
  make[2]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o] Error 1
  CMakeFiles/Makefile2:237: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all' failed
  make[1]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  [ 25%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/qsimcirq/qsim_sse.cpython-37m-x86_64-linux-gnu.so
  [ 25%] Built target qsim_sse
  Makefile:102: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/as3232/qsim/setup.py", line 112, in <module>
      package_data={"qsimcirq": ["py.typed"]},
    File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/anaconda/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/as3232/qsim/setup.py", line 36, in run
      self.build_extension(ext)
    File "/home/as3232/qsim/setup.py", line 76, in build_extension
      ["cmake", "--build", "."] + build_args, cwd=self.build_temp
    File "/usr/local/anaconda/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for qsimcirq
  Running setup.py clean for qsimcirq
Failed to build qsimcirq
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
Installing collected packages: qsimcirq
  Attempting uninstall: qsimcirq
    WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
    Found existing installation: qsimcirq 0.10.2
    Uninstalling qsimcirq-0.10.2:
      Successfully uninstalled qsimcirq-0.10.2
    Running setup.py install for qsimcirq ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l9ndg9f6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/include/python3.7m/qsimcirq
         cwd: /home/as3232/qsim/
    Complete output (137 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/_version.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/__init__.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/py.typed -> build/lib.linux-x86_64-3.7/qsimcirq
    running build_ext
    -- The CXX compiler identification is GNU 5.5.0
    -- The CUDA compiler identification is NVIDIA 10.0.130
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting CUDA compiler ABI info
    -- Detecting CUDA compiler ABI info - done
    -- Check for working CUDA compiler: /usr/lib/nvidia-cuda-toolkit/bin/nvcc - skipped
    -- Detecting CUDA compile features
    -- Detecting CUDA compile features - done
    -- Found PythonInterp: /usr/local/anaconda/bin/python (found version "3.7.4")
    -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so
    -- Performing Test HAS_CPP14_FLAG
    -- Performing Test HAS_CPP14_FLAG - Success
    -- pybind11 v2.2.4
    -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so (found suitable version "3.7.4", minimum required is "3.6")
    -- Looking for C++ include pthread.h
    -- Looking for C++ include pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Found CUDA: /usr/lib/nvidia-cuda-toolkit (found version "10.0")
    -- The C compiler identification is GNU 5.5.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Performing Test HAS_FLTO
    -- Performing Test HAS_FLTO - Success
    -- LTO enabled
    -- Configuring done
    CMake Warning (dev) in pybind_interface/cuda/CMakeLists.txt:
      Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
      empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
      for policy details.  Use the cmake_policy command to set the policy and
      suppress this warning.
    
      CUDA_ARCHITECTURES is empty for target "qsim_cuda".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) in pybind_interface/decide/CMakeLists.txt:
      Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
      empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
      for policy details.  Use the cmake_policy command to set the policy and
      suppress this warning.
    
      CUDA_ARCHITECTURES is empty for target "qsim_decide".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Generating done
    -- Build files have been written to: /home/as3232/qsim/build/temp.linux-x86_64-3.7
    Scanning dependencies of target qsim_cuda
    Scanning dependencies of target qsim_sse
    [  8%] Building CUDA object pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o
    [ 16%] Building CXX object pybind_interface/sse/CMakeFiles/qsim_sse.dir/pybind_main_sse.cpp.o
    In file included from /usr/include/c++/7/forward_list:35:0,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/common.h:140,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pytypes.h:12,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/cast.h:13,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/attr.h:13,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pybind11.h:43,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/complex.h:12,
                     from /home/as3232/qsim/pybind_interface/cuda/../pybind_main.h:18,
                     from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.h:15,
                     from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.cpp:15:
    /usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
     #error This file requires compiler and library support \
      ^~~~~
    In file included from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/pybind11.h:45:0,
                     from /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/complex.h:12,
                     from /home/as3232/qsim/pybind_interface/cuda/../pybind_main.h:18,
                     from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.h:15,
                     from /home/as3232/qsim/pybind_interface/cuda/pybind_main_cuda.cpp:15:
    /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/class.h:87:38: warning: missing terminating " character
         PyObject *result = PyRun_String(R"(\
                                          ^
    /home/as3232/qsim/build/temp.linux-x86_64-3.7/_deps/pybind11-src/include/pybind11/detail/class.h:95:10: warning: missing terminating " character
             )", Py_file_input, d.ptr(), d.ptr()
              ^
    pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/build.make:81: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o' failed
    make[2]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o] Error 1
    CMakeFiles/Makefile2:237: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all' failed
    make[1]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 25%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/qsimcirq/qsim_sse.cpython-37m-x86_64-linux-gnu.so
    [ 25%] Built target qsim_sse
    Makefile:102: recipe for target 'all' failed
    make: *** [all] Error 2
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/as3232/qsim/setup.py", line 112, in <module>
        package_data={"qsimcirq": ["py.typed"]},
      File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/anaconda/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/anaconda/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/as3232/qsim/setup.py", line 36, in run
        self.build_extension(ext)
      File "/home/as3232/qsim/setup.py", line 76, in build_extension
        ["cmake", "--build", "."] + build_args, cwd=self.build_temp
      File "/usr/local/anaconda/lib/python3.7/subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
    ----------------------------------------
  Rolling back uninstall of qsimcirq
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq-0.10.2.dist-info/
   from /usr/local/anaconda/lib/python3.7/site-packages/~simcirq-0.10.2.dist-info
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq.libs/
   from /usr/local/anaconda/lib/python3.7/site-packages/~simcirq.libs
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq/
   from /usr/local/anaconda/lib/python3.7/site-packages/~-imcirq
ERROR: Command errored out with exit status 1: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l9ndg9f6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/include/python3.7m/qsimcirq Check the logs for full command output.
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)

@95-martin-orion
Copy link
Collaborator

This file requires compiler and library support for the ISO C++ 2011 standard is a pretty solid indicator that the CXX compiler nvcc is using doesn't support C++11 behavior. It's unclear to me what the default C++ version is for GNU 5.5.0, but upgrading to the latest version should resolve the issue.

...That said, our CMake pipeline should apply the -std=c++14 flag to avoid this problem. I'll look into how we can inject that flag into the process.

@95-martin-orion 95-martin-orion self-assigned this Oct 18, 2021
@as3232cornell
Copy link
Author

I tried inserting the statements

CFLAGS = -std=c++14
export CFLGAS

into Makefile, but I am getting the same error when running pip install . as before. I also tried setting CFLAGS directly in terminal, to no luck as well.

@as3232cornell
Copy link
Author

From what I see above, the flag -std=c++14 is being applied even when I don't explicitly specify it.

@95-martin-orion
Copy link
Collaborator

To clarify: the Makefiles and the CMake pipeline are two distinct paths for building qsim. Running pip install . triggers the CMake pipeline, so any changes you make to Makefiles will be ignored by that process.

The necessary flag would need to be set in our CUDA CMakeLists file, and would need to explicitly set the CUDA flags to enable C++14, as CUDA will ignore the CXX flags.

@as3232cornell
Copy link
Author

So, in that case, would the only solution for me be updating GNU?

@95-martin-orion
Copy link
Collaborator

So, in that case, would the only solution for me be updating GNU?

That's likely going to be the fastest workaround, unless you're familiar with CMake and are interested in contributing. I intend to address this issue otherwise, but likely won't be able to for another couple of weeks due to conflicting priorities.

@as3232cornell
Copy link
Author

I tried injecting the CMake flags, and I also tried running with an upgraded version of GNU. There is now a new error which seems even more opaque.

WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
Processing /home/as3232/qsim
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cirq-core in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.13.0)
Requirement already satisfied: numpy~=1.16 in /home/as3232/.local/lib/python3.7/site-packages (from qsimcirq==0.10.2) (1.21.2)
Requirement already satisfied: typing_extensions in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (3.7.4.3)
Requirement already satisfied: absl-py in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.10.0)
Requirement already satisfied: black==20.8b1 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (20.8b1)
Requirement already satisfied: flynt~=0.60 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (0.69)
Requirement already satisfied: pybind11 in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (2.6.2)
Requirement already satisfied: pytest in /usr/local/anaconda/lib/python3.7/site-packages (from qsimcirq==0.10.2) (6.1.2)
Requirement already satisfied: appdirs in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (1.4.4)
Requirement already satisfied: mypy-extensions>=0.4.3 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.4.3)
Requirement already satisfied: regex>=2020.1.8 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (2021.4.4)
Requirement already satisfied: typed-ast>=1.4.0 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (1.4.1)
Requirement already satisfied: click>=7.1.2 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (7.1.2)
Requirement already satisfied: pathspec<1,>=0.6 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.9.0)
Requirement already satisfied: toml>=0.10.1 in /usr/local/anaconda/lib/python3.7/site-packages (from black==20.8b1->qsimcirq==0.10.2) (0.10.2)
Requirement already satisfied: astor in /usr/local/anaconda/lib/python3.7/site-packages (from flynt~=0.60->qsimcirq==0.10.2) (0.8.1)
Requirement already satisfied: six in /home/as3232/.local/lib/python3.7/site-packages (from absl-py->qsimcirq==0.10.2) (1.16.0)
Requirement already satisfied: matplotlib~=3.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (3.3.4)
Requirement already satisfied: sortedcontainers~=2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (2.2.2)
Requirement already satisfied: scipy in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.7.1)
Requirement already satisfied: pandas in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.1.1)
Requirement already satisfied: sympy in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (1.7)
Requirement already satisfied: networkx~=2.4 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (2.5)
Requirement already satisfied: tqdm in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (4.49.0)
Requirement already satisfied: duet~=0.2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from cirq-core->qsimcirq==0.10.2) (0.2.1)
Requirement already satisfied: importlib-metadata>=0.12 in /home/as3232/.local/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (3.10.1)
Requirement already satisfied: pluggy<1.0,>=0.12 in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (0.13.1)
Requirement already satisfied: py>=1.8.2 in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (1.9.0)
Requirement already satisfied: iniconfig in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (1.1.1)
Requirement already satisfied: packaging in /usr/local/anaconda/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (20.4)
Requirement already satisfied: attrs>=17.4.0 in /home/as3232/.local/lib/python3.7/site-packages (from pytest->qsimcirq==0.10.2) (20.3.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/anaconda/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest->qsimcirq==0.10.2) (3.1.0)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (7.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/anaconda/lib/python3.7/site-packages (from matplotlib~=3.0->cirq-core->qsimcirq==0.10.2) (2.8.1)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/anaconda/lib/python3.7/site-packages (from networkx~=2.4->cirq-core->qsimcirq==0.10.2) (4.4.2)
Requirement already satisfied: pytz>=2017.2 in /usr/local/anaconda/lib/python3.7/site-packages (from pandas->cirq-core->qsimcirq==0.10.2) (2020.1)
Requirement already satisfied: mpmath>=0.19 in /usr/local/anaconda/lib/python3.7/site-packages (from sympy->cirq-core->qsimcirq==0.10.2) (1.1.0)
Building wheels for collected packages: qsimcirq
  Building wheel for qsimcirq (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8jzj0c4r
       cwd: /home/as3232/qsim/
  Complete output (70 lines):
  running bdist_wheel
  running build
  running build_py
  running build_ext
  -- pybind11 v2.2.4
  -- Configuring done
  CMake Warning (dev) in pybind_interface/cuda/CMakeLists.txt:
    Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
    empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
    for policy details.  Use the cmake_policy command to set the policy and
    suppress this warning.
  
    CUDA_ARCHITECTURES is empty for target "qsim_cuda".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  CMake Warning (dev) in pybind_interface/decide/CMakeLists.txt:
    Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
    empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
    for policy details.  Use the cmake_policy command to set the policy and
    suppress this warning.
  
    CUDA_ARCHITECTURES is empty for target "qsim_decide".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Generating done
  -- Build files have been written to: /home/as3232/qsim/build/temp.linux-x86_64-3.7
  [ 16%] Built target qsim_sse
  [ 25%] Building CUDA object pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o
  nvcc fatal   : redefinition of argument 'std'
  pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/build.make:81: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o' failed
  make[2]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o] Error 1
  CMakeFiles/Makefile2:237: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all' failed
  make[1]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  [ 33%] Building CXX object pybind_interface/avx512/CMakeFiles/qsim_avx512.dir/pybind_main_avx512.cpp.o
  [ 41%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/qsimcirq/qsim_avx512.cpython-37m-x86_64-linux-gnu.so
  [ 41%] Built target qsim_avx512
  Makefile:102: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/as3232/qsim/setup.py", line 112, in <module>
      package_data={"qsimcirq": ["py.typed"]},
    File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/anaconda/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/anaconda/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/as3232/qsim/setup.py", line 36, in run
      self.build_extension(ext)
    File "/home/as3232/qsim/setup.py", line 76, in build_extension
      ["cmake", "--build", "."] + build_args, cwd=self.build_temp
    File "/usr/local/anaconda/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for qsimcirq
  Running setup.py clean for qsimcirq
Failed to build qsimcirq
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
Installing collected packages: qsimcirq
  Attempting uninstall: qsimcirq
    WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
    WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
    Found existing installation: qsimcirq 0.10.2
    Uninstalling qsimcirq-0.10.2:
      Successfully uninstalled qsimcirq-0.10.2
    Running setup.py install for qsimcirq ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1x_kyr_q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/include/python3.7m/qsimcirq
         cwd: /home/as3232/qsim/
    Complete output (114 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/_version.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/__init__.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-3.7/qsimcirq
    copying qsimcirq/py.typed -> build/lib.linux-x86_64-3.7/qsimcirq
    running build_ext
    -- The CXX compiler identification is GNU 7.4.0
    -- The CUDA compiler identification is NVIDIA 10.0.130
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/g++-7 - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting CUDA compiler ABI info
    -- Detecting CUDA compiler ABI info - done
    -- Check for working CUDA compiler: /usr/lib/nvidia-cuda-toolkit/bin/nvcc - skipped
    -- Detecting CUDA compile features
    -- Detecting CUDA compile features - done
    -- Found PythonInterp: /usr/local/anaconda/bin/python (found version "3.7.4")
    -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so
    -- Performing Test HAS_CPP14_FLAG
    -- Performing Test HAS_CPP14_FLAG - Success
    -- pybind11 v2.2.4
    -- Found PythonLibs: /usr/local/anaconda/lib/libpython3.7m.so (found suitable version "3.7.4", minimum required is "3.6")
    -- Looking for C++ include pthread.h
    -- Looking for C++ include pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Found CUDA: /usr/lib/nvidia-cuda-toolkit (found version "10.0")
    -- The C compiler identification is GNU 7.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/gcc-7 - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Performing Test HAS_FLTO
    -- Performing Test HAS_FLTO - Success
    -- LTO enabled
    -- Configuring done
    CMake Warning (dev) in pybind_interface/cuda/CMakeLists.txt:
      Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
      empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
      for policy details.  Use the cmake_policy command to set the policy and
      suppress this warning.
    
      CUDA_ARCHITECTURES is empty for target "qsim_cuda".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) in pybind_interface/decide/CMakeLists.txt:
      Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
      empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
      for policy details.  Use the cmake_policy command to set the policy and
      suppress this warning.
    
      CUDA_ARCHITECTURES is empty for target "qsim_decide".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Generating done
    -- Build files have been written to: /home/as3232/qsim/build/temp.linux-x86_64-3.7
    Scanning dependencies of target qsim_sse
    Scanning dependencies of target qsim_cuda
    [  8%] Building CXX object pybind_interface/sse/CMakeFiles/qsim_sse.dir/pybind_main_sse.cpp.o
    [ 16%] Building CUDA object pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o
    nvcc fatal   : redefinition of argument 'std'
    pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/build.make:81: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o' failed
    make[2]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/pybind_main_cuda.cpp.o] Error 1
    CMakeFiles/Makefile2:237: recipe for target 'pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all' failed
    make[1]: *** [pybind_interface/cuda/CMakeFiles/qsim_cuda.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 25%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/qsimcirq/qsim_sse.cpython-37m-x86_64-linux-gnu.so
    [ 25%] Built target qsim_sse
    Makefile:102: recipe for target 'all' failed
    make: *** [all] Error 2
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/as3232/qsim/setup.py", line 112, in <module>
        package_data={"qsimcirq": ["py.typed"]},
      File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/anaconda/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/anaconda/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/anaconda/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/anaconda/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/anaconda/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/as3232/qsim/setup.py", line 36, in run
        self.build_extension(ext)
      File "/home/as3232/qsim/setup.py", line 76, in build_extension
        ["cmake", "--build", "."] + build_args, cwd=self.build_temp
      File "/usr/local/anaconda/lib/python3.7/subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
    ----------------------------------------
  Rolling back uninstall of qsimcirq
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq-0.10.2.dist-info/
   from /usr/local/anaconda/lib/python3.7/site-packages/~simcirq-0.10.2.dist-info
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq.libs/
   from /usr/local/anaconda/lib/python3.7/site-packages/~simcirq.libs
  Moving to /usr/local/anaconda/lib/python3.7/site-packages/qsimcirq/
   from /usr/local/anaconda/lib/python3.7/site-packages/~-imcirq
ERROR: Command errored out with exit status 1: /usr/local/anaconda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/as3232/qsim/setup.py'"'"'; __file__='"'"'/home/as3232/qsim/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1x_kyr_q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda/include/python3.7m/qsimcirq Check the logs for full command output.
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -umpy (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -simcirq (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rpcio (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -qdm (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oogle-auth-oauthlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -oml (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ip (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -etworkx (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -atplotlib (/usr/local/anaconda/lib/python3.7/site-packages)
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/anaconda/bin/python -m pip install --upgrade pip' command.

The issue still seems to be stemming from cmake... Any ideas?

@95-martin-orion
Copy link
Collaborator

Apologies for the long silence on this. The documentation I can find on CMAKE_CUDA_ARCHITECTURES suggests that it was introduced in CMake v3.18, and prior to that version it was not required.

It's possible that our build process assumes an older version of CMake, and we need to update. You can try adding this block from the above link to the top of the CUDA CMakeLists.txt to resolve the issue:

if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
  set(CMAKE_CUDA_ARCHITECTURES 75)
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants