Can not compile AmgX on WSL2 Ubuntu 18.04
8 errors detected in the compilation of "/home/thomaschi/AMGX-main/AMGX-main/core/src/solvers/dense_lu_solver.cu". CMake Error at amgx_core_generated_dense_lu_solver.cu.o.Release.cmake:283 (message): Error generating file /home/thomaschi/AMGX-main/AMGX-main/build/core/CMakeFiles/amgx_core.dir/src/solvers/./amgx_core_generated_dense_lu_solver.cu.o
core/CMakeFiles/amgx_core.dir/build.make:609: recipe for target 'core/CMakeFiles/amgx_core.dir/src/solvers/amgx_core_generated_dense_lu_solver.cu.o' failed make[2]: *** [core/CMakeFiles/amgx_core.dir/src/solvers/amgx_core_generated_dense_lu_solver.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/thomaschi/AMGX-main/AMGX-main/core/src/matrix_coloring/greedy_recolor.cu(153): warning #174-D: expression has no effect
/home/thomaschi/AMGX-main/AMGX-main/core/src/matrix_coloring/greedy_recolor.cu(213): warning #174-D: expression has no effect
CMakeFiles/Makefile2:259: recipe for target 'core/CMakeFiles/amgx_core.dir/all' failed make[1]: *** [core/CMakeFiles/amgx_core.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Scanning dependencies of target amgx_base [ 48%] Linking CXX static library libamgx_base.a [ 48%] Built target amgx_base Makefile:129: recipe for target 'all' failed make: *** [all] Error 2
Hey @ThomasCzr ,
I see that there is a problem with "/home/thomaschi/AMGX-main/AMGX-main/core/src/solvers/dense_lu_solver.cu" but don't see any specific error from compiler. Can you share those errors?
Also, we haven't tested WSL. What compiler do you use?
Hello @ThomasCzr
I was able to run AMGX on WSL2 Ubuntu 18.04 using CUDA 11.6.
It should be noted that the CUDA version 11.6 should be same on windows as well as on the WSL Ubuntu.
To setup the CUDA on WSL you can use the option 2 (using Meta package) installation from 4.2.6. Building Your Own GPU-accelerated Application on WSL 2 (https://docs.nvidia.com/cuda/wsl-user-guide/index.html#ch03a-setting-up-cuda). Carefully replace the ubuntu and cuda versions in the command. Compiling and running the examples using the above settings work fine for me. Although the performance is considerably worse as compared to the normal linux compilation.
The time required to solve is around 0.02 seconds on wsl as compared to 0.0007 seconds on linux
