Closed ericpre closed 1 year ago
Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe
) and found it was in an excellent condition.
After removing setting %CUDA_PATH%
, cmake can find CUDA, which means that https://github.com/conda-forge/nvcc-feedstock/issues/53 is fixed - see commit https://github.com/conda-forge/prismatic_split-feedstock/pull/18/commits/f6e30e70b4ab80a4e6c849087a325b07f3a40ead built with nvcc_win-64*_10
.
There is a different failure now:
[ 5%] Building NVCC (Device) object CMakeFiles/prismatic.dir/src/prismatic_generated_Multislice_calcOutput.cu.obj
CMake Warning (dev) at prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:109 (set):
Syntax error in cmake code at
D:/bld/prismatic_split_1608204162270/work/build_cli/CMakeFiles/prismatic.dir/src/prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:109
when parsing string
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include"
Invalid escape sequence \P
Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:181 (execute_process):
Syntax error in cmake code at
D:/bld/prismatic_split_1608204162270/work/build_cli/CMakeFiles/prismatic.dir/src/prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:181
when parsing string
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe;-M;-D__CUDACC__;D:/bld/prismatic_split_1608204162270/work/src/Multislice_calcOutput.cu;-o;D:/bld/prismatic_split_1608204162270/work/build_cli/CMakeFiles/prismatic.dir/src/prismatic_generated_Multislice_calcOutput.cu.obj.NVCC-depend;-ccbin;C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe;-m64;-DPRISMATIC_ENABLE_GPU;-DPRISMATIC_ENABLE_CLI;-DH5_BUILT_AS_DYNAMIC_LIB;-Xcompiler;,"-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include"","/DWIN32","/D_WINDOWS","/W3","/GR","/EHsc","/W0","/utf-8","/Ox","/MD","/O2","/Ob2","/DNDEBUG";-arch=sm_60;-std=c++11;-Xcompiler;-fPIC;-DNVCC;-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/include;-ID:/bld/prismatic_split_1608204162270/work/include;-ID:/bld/prismatic_split_1608204162270/_h_env/Library/include
Invalid escape sequence \P
Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:206 (cuda_execute_process)
This warning is for project developers. Use -Wno-dev to suppress it.
Multislice_calcOutput.cu
cl : Command line warning D9025 : overriding '/W3' with '/W0'
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
NVIDIA
c1xx: fatal error C1083: Cannot open source file: 'Files\NVIDIA': No such file or directory
GPU
c1xx: fatal error C1083: Cannot open source file: 'GPU': No such file or directory
Computing
c1xx: fatal error C1083: Cannot open source file: 'Computing': No such file or directory
include
c1xx: fatal error C1083: Cannot open source file: 'Toolkit\CUDA\v10.0\include': No such file or directory
Multislice_calcOutput.cu
nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored.
CMake Error at prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:222 (message):
Error generating
D:/bld/prismatic_split_1608204162270/work/build_cli/CMakeFiles/prismatic.dir/src/./prismatic_generated_Multislice_calcOutput.cu.obj
NMAKE : fatal error U1077: 'D:\bld\prismatic_split_1608204162270\_build_env\Library\bin\cmake.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
@jaimergp, by any chance, have you seen something along these line?
I've seen that with CUDA_PATH
and CUDA_TOOLKIT_ROOT
because CMake expects forward slashes only.
This is not happening in other repos, so I guess it depends on the project CMakeFiles (maybe there's a special flag for parsing paths more robustly?).
I guess something like this should work? Notice I didn't quote the expression on purpose because CFLAGS contains a quoted path and that causes all kind of quirks...
set CFLAGS=%CFLAGS:\=/%
Check this workaround here too: https://github.com/jaimergp/magma-feedstock/blob/1c69d60/recipe/bld.bat#L19-L23
I might end up removing those flags from nvcc
anyway because they don't seem to be needed and cause plenty of trouble.
You'll need to add m2-sed
to the build requirements on Windows.
@jaimergp for the information! Resetting the CXXFLAGS
is simple and seems to work well here!
For reference, changing the slashes from \
to /
doesn't work, now it seems to complain about the space... see build log:
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.30
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
CMake prefix path: D:\bld\prismatic_split_1608741502671\_h_env\Library
cli is 1 , gui is 0 and gpu is 1
CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
INCLUDE: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt;D:\bld\prismatic_split_1608741502671\_h_env\Library\include;
CXXFLAGS (before): -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"
CXXFLAGS (after): -I"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/include"
-- The C compiler identification is MSVC 19.16.27045.0
-- The CXX compiler identification is MSVC 19.16.27045.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found Boost: D:/bld/prismatic_split_1608741502671/_h_env/Library/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0")
-- Found PkgConfig: D:/bld/prismatic_split_1608741502671/_build_env/Library/bin/pkg-config.exe (found version "0.29.2")
-- Found FFTW: D:/bld/prismatic_split_1608741502671/_h_env/Library/include found components: FLOAT_LIB
Found FFTW: D:/bld/prismatic_split_1608741502671/_h_env/Library/lib/fftw3.lib;D:/bld/prismatic_split_1608741502671/_h_env/Library/lib/fftw3f.lib
-- Found HDF5: hdf5-shared;hdf5_cpp-shared (found version "1.10.6") found components: C HL CXX
Boost dir D:/bld/prismatic_split_1608741502671/_h_env/Library/include
GPU support enabled
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1 (found version "10.1")
Single precision enabled
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
Qt5Widgets_DIR
-- Build files have been written to: D:/bld/prismatic_split_1608741502671/work/build_cli
Microsoft (R) Program Maintenance Utility Version 14.16.27045.0
Copyright (C) Microsoft Corporation. All rights reserved.
[ 5%] Building NVCC (Device) object CMakeFiles/prismatic.dir/src/prismatic_generated_Multislice_calcOutput.cu.obj
Multislice_calcOutput.cu
cl : Command line warning D9025 : overriding '/W3' with '/W0'
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
NVIDIA
c1xx: fatal error C1083: Cannot open source file: 'Files/NVIDIA': No such file or directory
GPU
c1xx: fatal error C1083: Cannot open source file: 'GPU': No such file or directory
Computing
c1xx: fatal error C1083: Cannot open source file: 'Computing': No such file or directory
include
c1xx: fatal error C1083: Cannot open source file: 'Toolkit/CUDA/v10.1/include': No such file or directory
Multislice_calcOutput.cu
nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored.
CMake Error at prismatic_generated_Multislice_calcOutput.cu.obj.RELEASE.cmake:222 (message):
Error generating
D:/bld/prismatic_split_1608741502671/work/build_cli/CMakeFiles/prismatic.dir/src/./prismatic_generated_Multislice_calcOutput.cu.obj
NMAKE : fatal error U1077: 'D:\bld\prismatic_split_1608741502671\_build_env\Library\bin\cmake.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
I see. Further processing that string takes the double quotes away... Gotta love cmd 😂
Happy to see this works now!
This PR is to check the latest change (https://github.com/conda-forge/nvcc-feedstock/pull/52 and https://github.com/conda-forge/nvcc-feedstock/pull/57) in the nvcc activation scripts:
%CUDA_PATH%
in the build script (https://github.com/conda-forge/nvcc-feedstock/issues/53 seems to be fixed).