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

[vtk-m:x64-windows] build failure, no supported version of OpenMP #13014

Open
byxrolland opened this issue Aug 20, 2020 · 10 comments · May be fixed by #31750
Open

[vtk-m:x64-windows] build failure, no supported version of OpenMP #13014

byxrolland opened this issue Aug 20, 2020 · 10 comments · May be fixed by #31750
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@byxrolland
Copy link

Host Environment

  • OS: Windows
  • Compiler: VS2019

To Reproduce
Steps to reproduce the behavior:
./vcpkg install vtk-m[cuda,double,mpi,omp,tbb]:x64-windows

Failure logs

[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "C:/vcpkg/buildtrees/vtk-m/src/76c3434ac0-e3aceb77b8.clean" "-DVTKm_ENABLE_CUDA=ON" "-DVTKm_ENABLE_OPENMP=ON" "-DVTKm_ENABLE_TBB=ON" "-DVTKm_ENABLE_MPI=ON" "-DVTKm_USE_DOUBLE_PRECISION=ON" "-DVTKm_ENABLE_RENDERING=ON" "-DVTKm_ENABLE_DEVELOPER_FLAGS=OFF" "-DVTKm_ENABLE_CPACK=OFF" "-DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON" "-DBUILD_TESTING=OFF" "-DCMAKE_MAKE_PROGRAM=C:/vcpkg/downloads/tools/ninja/ninja-1.10.0/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/vcpkg/packages/vtk-m_x64-windows/debug""
FAILED: ../../x64-windows-dbg/CMakeCache.txt 
cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "C:/vcpkg/buildtrees/vtk-m/src/76c3434ac0-e3aceb77b8.clean" "-DVTKm_ENABLE_CUDA=ON" "-DVTKm_ENABLE_OPENMP=ON" "-DVTKm_ENABLE_TBB=ON" "-DVTKm_ENABLE_MPI=ON" "-DVTKm_USE_DOUBLE_PRECISION=ON" "-DVTKm_ENABLE_RENDERING=ON" "-DVTKm_ENABLE_DEVELOPER_FLAGS=OFF" "-DVTKm_ENABLE_CPACK=OFF" "-DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON" "-DBUILD_TESTING=OFF" "-DCMAKE_MAKE_PROGRAM=C:/vcpkg/downloads/tools/ninja/ninja-1.10.0/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/vcpkg/packages/vtk-m_x64-windows/debug""
-- The C compiler identification is MSVC 19.27.29111.0
-- The CXX compiler identification is MSVC 19.27.29111.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/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/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.28.0.windows.1") 
-- Could not use git to determine source version, using version 1.5.0
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find OpenMP_CXX: Found unsuitable version "2.0", but required is
  at least "4.0" (found -openmp)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:456 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.18/Modules/FindOpenMP.cmake:529 (find_package_handle_standard_args)
  C:/vcpkg/scripts/buildsystems/vcpkg.cmake:455 (_find_package)
  CMake/VTKmDeviceAdapters.cmake:90 (find_package)
  CMake/VTKmWrappers.cmake:13 (include)
  CMakeLists.txt:148 (include)


-- Configuring incomplete, errors occurred!
See also "C:/vcpkg/buildtrees/vtk-m/x64-windows-dbg/CMakeFiles/CMakeOutput.log".
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "C:/vcpkg/buildtrees/vtk-m/src/76c3434ac0-e3aceb77b8.clean" "-DVTKm_ENABLE_CUDA=ON" "-DVTKm_ENABLE_OPENMP=ON" "-DVTKm_ENABLE_TBB=ON" "-DVTKm_ENABLE_MPI=ON" "-DVTKm_USE_DOUBLE_PRECISION=ON" "-DVTKm_ENABLE_RENDERING=ON" "-DVTKm_ENABLE_DEVELOPER_FLAGS=OFF" "-DVTKm_ENABLE_CPACK=OFF" "-DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON" "-DBUILD_TESTING=OFF" "-DCMAKE_MAKE_PROGRAM=C:/vcpkg/downloads/tools/ninja/ninja-1.10.0/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/vcpkg/packages/vtk-m_x64-windows""
FAILED: ../CMakeCache.txt 
cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "C:/vcpkg/buildtrees/vtk-m/src/76c3434ac0-e3aceb77b8.clean" "-DVTKm_ENABLE_CUDA=ON" "-DVTKm_ENABLE_OPENMP=ON" "-DVTKm_ENABLE_TBB=ON" "-DVTKm_ENABLE_MPI=ON" "-DVTKm_USE_DOUBLE_PRECISION=ON" "-DVTKm_ENABLE_RENDERING=ON" "-DVTKm_ENABLE_DEVELOPER_FLAGS=OFF" "-DVTKm_ENABLE_CPACK=OFF" "-DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON" "-DBUILD_TESTING=OFF" "-DCMAKE_MAKE_PROGRAM=C:/vcpkg/downloads/tools/ninja/ninja-1.10.0/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/vcpkg/packages/vtk-m_x64-windows""
-- The C compiler identification is MSVC 19.27.29111.0
-- The CXX compiler identification is MSVC 19.27.29111.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/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/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.28.0.windows.1") 
-- Could not use git to determine source version, using version 1.5.0
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find OpenMP_CXX: Found unsuitable version "2.0", but required is
  at least "4.0" (found -openmp)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:456 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.18/Modules/FindOpenMP.cmake:529 (find_package_handle_standard_args)
  C:/vcpkg/scripts/buildsystems/vcpkg.cmake:455 (_find_package)
  CMake/VTKmDeviceAdapters.cmake:90 (find_package)
  CMake/VTKmWrappers.cmake:13 (include)
  CMakeLists.txt:148 (include)


-- Configuring incomplete, errors occurred!
See also "C:/vcpkg/buildtrees/vtk-m/x64-windows-rel/CMakeFiles/CMakeOutput.log".
ninja: build stopped: subcommand failed.
@MVoz
Copy link
Contributor

MVoz commented Aug 20, 2020

./vcpkg install vtk-m[cuda,double,mpi, omp ,tbb]:x64-windows

@PhoebeHui
Copy link
Contributor

It seem the feature 'omp' doesn't support well in vtk-m, see https://gitlab.kitware.com/vtk/vtk-m/-/issues/139

I think we need to remove this feature.

@PhoebeHui PhoebeHui added the category:port-bug The issue is with a library, which is something the port should already support label Aug 20, 2020
@PhoebeHui
Copy link
Contributor

The CUDA feature also broken, I will disable it as well. Many CUDA issues Active in https://gitlab.kitware.com/vtk/vtk-m/-/issues?scope=all&utf8=%E2%9C%93&state=opened&search=CUDA, consider to test it when https://gitlab.kitware.com/vtk/vtk-m/-/issues/363 resolved, if everything test successfully, we can enable this feature.

Confirmed ./vcpkg install vtk-m[double,mpi,tbb]:x64-windows installed successfully.

@Neumann-A
Copy link
Contributor

CUDA probably requires to put the CUDA compiler nvcc actually on path like VTK does.

@Neumann-A
Copy link
Contributor

And yeah the openMP issue is due to VS not supporting openMP well enough. Removing the feature seems overkill since I am free to configure another compiler on Windows which supports openmp 4.0. So testing this on Linux is mandatory before removing any features!

@MVoz
Copy link
Contributor

MVoz commented Aug 20, 2020

icl intel support openmp 4+ ver, clang support 4+ ver ... windows

msvc 3- ver experimental ;((

@PhoebeHui
Copy link
Contributor

@Neumann-A, thanks for pointing out this!

I test the omp feature on linux, it looks installed successfully, so removing the feature is not wise. Very appreciate for your information!

I think all features need to be test on windows and linux when they has been added, if it doesn't support on specific arch or platform, we should have related information or commnents in future. That will save time for users.

@MVoz
Copy link
Contributor

MVoz commented Aug 20, 2020

hmm...
https://docs.microsoft.com/ru-ru/cpp/parallel/openmp/openmp-simd?view=vs-2019

cl -openmp:experimental = 4 ? //test it someone

@byxrolland
Copy link
Author

byxrolland commented Aug 22, 2020

@PhoebeHui : CUDA is problematic but not so problematic. In most cases, it's more about the installation of CUDA (the correct version for GPU, setting CUDA_PATH for CMake or finding the supported version host compiler when built on Linux). There is limited check for this in CMake. So I think so far this should not be a priority. The MPI support (for vtk-m and vtk) needs more attention.

@PhoebeHui
Copy link
Contributor

Verified vtk-m features with latest vcpkg source with x64-windows, vtk-m[double, mpi, tbb]:x64-windows test pass, cuda and omp failed as expected. Feature mpi passed on x64-windows and x64-linux.

@JonLiu1993 JonLiu1993 linked a pull request Jun 1, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
5 participants