lingxiaoli94 / interactive-hex-meshing

Source code for "Interactive All-Hex Meshing via Cuboid Decomposition" [SIGGRAPH Asia 2021].
MIT License
156 stars 19 forks source link

Error in WSL and Windows, CUDA 12.3, Libtorch 2, #16

Closed xmlyqing00 closed 1 week ago

xmlyqing00 commented 3 weeks ago

On WSL, I can compile it, but when I run it, I have a Vulkan validation layer error:

[2024-08-21 01:54:04.708] [info] workspace path: /mnt/e/Sources/interactive-hex-meshing/build_wsl
[2024-08-21 01:54:04.897] [info] Preferred MSAA sample count: 4
Validation layer: Validation Error: [ VUID-vkCmdDraw-magFilter-04553 ] Object 0: handle = 0x8f9a6c00000000bd, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0xca0b160000000085, type = VK_OBJECT_TYPE_SAMPLER; Object 2: handle = 0x301e6c0000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x6b4ef9a3 | vkCmdDraw: Descriptor set VkDescriptorSet 0x8f9a6c00000000bd[] Sampler (VkSampler 0xca0b160000000085[]) is set to use VK_FILTER_LINEAR with compareEnable is set to VK_FALSE, but image view's (VkImageView 0x301e6c0000000022[]) format (VK_FORMAT_D32_SFLOAT) does not contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in its format features. The Vulkan spec states: If a VkSampler created with magFilter or minFilter equal to VK_FILTER_LINEAR and compareEnable equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view's format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT (https://vulkan.lunarg.com/doc/view/1.3.239.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdDraw-magFilter-04553)
terminate called after throwing an instance of 'std::runtime_error'
  what():  Ugh!
Aborted

I also tried the Windows compilation, it stops at the C++17 and libtorch.

  spirv-cross-util.vcxproj -> E:\Sources\interactive-hex-meshing\build_win\external\spirv-cross\RelWithDebInfo\spirv-cr
  oss-util.lib
  nodeevents.cpp
  null.cpp
  ostream_wrapper.cpp
  parse.cpp
  parser.cpp
  spdlog.vcxproj -> E:\Sources\interactive-hex-meshing\build_win\external\spdlog\RelWithDebInfo\spdlog.lib
  Generating Code...
  Building NVCC (Device) object geomlib/geomlib/CMakeFiles/geomlib.dir/RelWithDebInfo/geomlib_generated_generalized_pro
  jection_cuda.cu.obj
  spirv-cross-glsl.vcxproj -> E:\Sources\interactive-hex-meshing\build_win\external\spirv-cross\RelWithDebInfo\spirv-cr
  oss-glsl.lib
  Building Custom Rule E:/Sources/interactive-hex-meshing/external/spirv-cross/CMakeLists.txt
  Building Custom Rule E:/Sources/interactive-hex-meshing/external/spirv-cross/CMakeLists.txt
  Building Custom Rule E:/Sources/interactive-hex-meshing/external/spirv-cross/CMakeLists.txt
  generalized_projection_cuda.cu
  spirv_hlsl.cpp
  Compiling...
  regex_yaml.cpp
  spirv_cpp.cpp
  spirv_msl.cpp
  scanner.cpp
  scanscalar.cpp
  spirv-cross-cpp.vcxproj -> E:\Sources\interactive-hex-meshing\build_win\external\spirv-cross\RelWithDebInfo\spirv-cro
  ss-cpp.lib
  scantag.cpp
  scantoken.cpp
  spirv-cross-hlsl.vcxproj -> E:\Sources\interactive-hex-meshing\build_win\external\spirv-cross\RelWithDebInfo\spirv-cr
  oss-hlsl.lib
E:\Sources\libtorch-win-shared-with-deps-2.4.0+cu124\libtorch\include\c10/util/C++17.h(24): fatal error C1189: #error:
 You need C++17 to compile PyTorch [E:\Sources\interactive-hex-meshing\build_win\geomlib\geomlib\geomlib.vcxproj]
  CMake Error at geomlib_generated_generalized_projection_cuda.cu.obj.RelWithDebInfo.cmake:220 (message):
    Error generating
    E:/Sources/interactive-hex-meshing/build_win/geomlib/geomlib/CMakeFiles/geomlib.dir//RelWithDebInfo/geomlib_generat
  ed_generalized_projection_cuda.cu.obj

  simplekey.cpp
D:\Softwares\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error
 MSB8066: Custom build for '..\..\..\geomlib\geomlib\generalized_projection_cuda.cu;..\..\..\geomlib\geomlib\point_tet_
mesh_test_cuda.cu;E:\Sources\interactive-hex-meshing\build_win\CMakeFiles\1a7ba912a136270779a4c2a59fb3e9c2\geomlib_inte
rmediate_link.obj.rule;E:\Sources\interactive-hex-meshing\geomlib\geomlib\CMakeLists.txt' exited with code 1. [E:\Sourc
es\interactive-hex-meshing\build_win\geomlib\geomlib\geomlib.vcxproj]

Could you give some hints to solve it? I've experienced in using GUI in WSL and Windows, but have no idea this time.

My CUDA is 12.3, libtorch, Vulkan, HDF5 are using the latest ones.

Thank you!

Mahdidaeidaei commented 3 weeks ago

As far as I know, Vulkan is not supported on WSL yet. That's why you can not open it. It has compatibility issues on Windows so go ahead on a pure Linux system.

xmlyqing00 commented 3 weeks ago

Hi @Mahdidaeidaei Thanks for your quick reply. Do you have any ideas on how to run your core algorithm to process the mesh without GUI? That would be convenient for us to run it on servers.

Thanks!

Mahdidaeidaei commented 1 week ago

Hi @Mahdidaeidaei Thanks for your quick reply. Do you have any ideas on how to run your core algorithm to process the mesh without GUI? That would be convenient for us to run it on servers.

Thanks!

You need the GUI to manually put the cubes to cover the geometry and a lot of surveillance steps. I do not think that it is possible to skip this step.

xmlyqing00 commented 1 week ago

Thanks for your information.