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

Install issue for qulacs-gpu #226

Open
beimojiguang opened this issue May 19, 2020 · 3 comments
Open

Install issue for qulacs-gpu #226

beimojiguang opened this issue May 19, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@beimojiguang
Copy link

Some issue occurred when I install qulacs-gup, It seems relate to CMake and the path of gcc and g++, but I already successfully install them in my computer in Windows10, I do not know how to fix it...

Software Version:
Platform: Window 10
Python: 3.8.2
pip: 20.1
gcc: 9.2
g++: 9.2
CMkae: 3.17.2
CUDA: 10.2

Complete output (66 lines):
running install
running build
running build_ext
-- Building for: NMake Makefiles
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must contain a literal, direct call to the project() command.  Add a line of code such as
  
  project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error in CMakeLists.txt:
  Generator

    NMake Makefiles

  does not support platform specification, but platform

    x64

  was specified.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/44238/AppData/Local/Temp/pip-install-sck12o9j/qulacs-gpu/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
@corryvrequan
Copy link
Contributor

corryvrequan commented May 19, 2020

Thanks for being interested in qulacs.
As far as we know, for the installation of qulacs-gpu, binary must be built with Visual Studio, but cmake chooses another generator (NMake Makefiles).

After appropriate installation of CUDA, Visual studio, and CMake, the following command will show the list of generators.

cmake --help

If "Visual Studio" which is used for the installation of CUDA is not listed, there is a problem in the installation of any of the above three.

If listed, Visual Studio generator is not selected by CMake due to unknown reasons. Probably you can force cmake to use Visual Studio generator in the installation of qulacs with the following process.

  1. Clone repository with "git clone https://github.com/qulacs/qulacs"
  2. Open qulacs folder and open "setup_gpu.py" with text editor.
  3. Insert the following line to Line39 (https://github.com/qulacs/qulacs/blob/master/setup_gpu.py#L39).
cmake_args += ['-G', 'Visual Studio 16 2019 Win64']
  1. Install qulacs-gpu with "python setup_gpu.py install".

Note that if you use visual studio 2015 or 2017, please replace 'Visual Studio 16 2019 Win64' to installed visual studio generator, such as 'Visual Studio 15 2017 Win64'

@onurdanaci
Copy link

Hi,

Is it possible to force Visual Studio installers in Linux (Ubuntu 22.04)? If not, is it possible to force gcc?

Best,
Onur

m-ymzk added a commit to m-ymzk/qulacs that referenced this issue Apr 16, 2023
@KowerKoint KowerKoint added the help wanted Extra attention is needed label Mar 14, 2024
@forest1040
Copy link
Contributor

forest1040 commented Mar 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants