Open wetoo-cando opened 1 year ago
Hi there! Thank you for your interest in GAAlign :)
I think this is a linker error caused by the library only having been tested on the windows toolchain. Even though I could not reproduce the error, I think the issue lies in the CMake file for the gaalign-optimization-cuda library. I would suggest replacing line 35 in src/optimization/CMakeLists.txt
GPC_CUDA_ADD_LIBRARY(gaalign-optimization-cuda gradient_descent_cuda/gradient_descent_cuda.h gradient_descent_cuda/gradient_descent_cuda.cug)
with
GPC_CUDA_ADD_LIBRARY(gaalign-optimization-cuda gradient_descent_cuda/gradient_descent_cuda.h gradient_descent_cuda/gradient_descent_cuda.cug fast_shuffle.cpp fast_shuffle.h fast_shuffle_pcg.h)
I hope this solves your issues.
Best, Kai
Thanks for the reply @kai-neumann
After that change, I get:
Consolidate compiler generated dependencies of target gaalign-optimization-cuda
[ 59%] Building CXX object src/optimization/CMakeFiles/gaalign-optimization-cuda.dir/fast_shuffle.cpp.o
c++: error: unrecognized command line option ‘-Xcompiler="-fopenmp"’
make[2]: *** [src/optimization/CMakeFiles/gaalign-optimization-cuda.dir/build.make:80: src/optimization/CMakeFiles/gaalign-optimization-cuda.dir/fast_shuffle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:268: src/optimization/CMakeFiles/gaalign-optimization-cuda.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Do you know if the error above referring to nvcc or g++? Unfortunately I am not so familiar with cuda compilation.
Hi,
the "-Xcompiler" command is an argument of nvcc that is used to pass arguments to the underlying c++ compiler (in your case g++). I think the error is caused by the argument accidentally being passed directly to g++ instead of nvcc.
The easiest fix for this would be commenting out line 41 in src/optimization/CMakeLists.txt. However, this probably disables CPU-based parallelization using OpenMP for the submodule, resulting in a slight loss of performance. Nevertheless, as the CUDA-based optimization is mostly performed on the GPU, this should not be significant.
I'll look into setting up a Linux development environment on my end in the future to ensure that GAAlign can compile on both Windows and Linux without any problems.
Best, Kai
Hi @kai-neumann, thanks for the very interesting work!
I am trying to build the GAAlign app with CUDA enabled. I think I have the right flags set during the cmake command, and I have also uncommented/commented the necessary lines in
app/main.cpp
.When I try to compile, I get the following error:
The problem is with the function
gaalign::shuffle_pcg_divisionless_with_slight_bias
that's being included from the<optimization/fast_shuffle.h>
header.Can you say what's wrong?