NVIDIA / AMGX

Distributed multigrid linear solver library on GPU
482 stars 139 forks source link

[Build] OKay to ENABLE NvToolsExt for Windows? #290

Closed wanjunling168 closed 5 months ago

wanjunling168 commented 8 months ago

Describe the issue

A clear and concise description of what the issue is.

Environment information:

Configuration information

Compilation information

Issue information

Additional context

since AMGX commit 76fcbe69b52a5ea929c6f468fa4845e69fc65f3d introduced some nvtxRangePush and nvtxRangePop in files like csr_multiply.cu, can we just remove the if-statement at line 151~154 in CMakeLists.txt to define NVTX_RANGES macro:

# Enable NVTX ranges on Linux
if(NOT WIN32)
  set(NVTXRANGE_FLAG -DNVTX_RANGES)
endif()

and change line 268~274 to link nvToolsExt on Windows:

IF (WIN32)
  target_link_libraries(amgx CUDA::cublas CUDA::cusparse CUDA::cusolver)
  target_link_libraries(amgxsh CUDA::cublas CUDA::cusparse CUDA::cusolver)
ELSE (WIN32)
  target_link_libraries(amgx CUDA::cublas CUDA::cusparse CUDA::cusolver CUDA::nvToolsExt m pthread)
  target_link_libraries(amgxsh CUDA::cublas CUDA::cusparse CUDA::cusolver CUDA::nvToolsExt m pthread)
ENDIF(WIN32)

to make AMGX compiles again on Windows?

mattmartineau commented 8 months ago

Thanks for reporting, I'll take a look at this

mattmartineau commented 5 months ago

This is fixed with a recent PR #292