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

GenomeWorks fails to compile with CUDA 12 #668

Open
quim0 opened this issue Aug 30, 2023 · 2 comments
Open

GenomeWorks fails to compile with CUDA 12 #668

quim0 opened this issue Aug 30, 2023 · 2 comments

Comments

@quim0
Copy link

quim0 commented Aug 30, 2023

I'm trying to compile GenomeWorks using the lastest CUDA version, and there seem to be some breaking changes in thrust that generates some compilation errors, here are the errors reported when doing make -j install:

In file included from /home/qaguado/GenomeWorks/cudaaligner/src/batched_device_matrices.cuh:25,                                                                                                            
                 from /home/qaguado/GenomeWorks/cudaaligner/src/ukkonen_gpu.cu:18:                                                                                                                         
/home/qaguado/GenomeWorks/common/base/include/claraparabricks/genomeworks/utils/pinned_host_vector.hpp:23:10: fatal error: thrust/system/cuda/experimental/pinned_allocator.h: No such file or directory   
   23 | #include <thrust/system/cuda/experimental/pinned_allocator.h>                                                                                                                                      
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                      
compilation terminated.                                                                                                                                                                                    
In file included from /home/qaguado/GenomeWorks/cudaaligner/src/batched_device_matrices.cuh:25,                                                                                                            
                 from /home/qaguado/GenomeWorks/cudaaligner/src/hirschberg_myers_gpu.cuh:20,                                                                                                               
                 from /home/qaguado/GenomeWorks/cudaaligner/src/hirschberg_myers_gpu.cu:17:                                                                                                                
/home/qaguado/GenomeWorks/common/base/include/claraparabricks/genomeworks/utils/pinned_host_vector.hpp:23:10: fatal error: thrust/system/cuda/experimental/pinned_allocator.h: No such file or directory   
   23 | #include <thrust/system/cuda/experimental/pinned_allocator.h>                                                                                                                                      
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                      
compilation terminated.                                                                                                                                                                                    
CMake Error at cudaaligner_generated_ukkonen_gpu.cu.o.Release.cmake:220 (message):                                                                                                                         
  Error generating                                                                                                                                                                                         
  /home/qaguado/GenomeWorks/build/cudaaligner/CMakeFiles/cudaaligner.dir/src/./cudaaligner_generated_ukkonen_gpu.cu.o

I tried to fix the error by doing the following changes in /common/base/include/claraparabricks/genomeworks/utils/pinned_host_vector.hpp (from this NVIDIA forum answer):

// ...

//#include <thrust/system/cuda/experimental/pinned_allocator.h>
#include <thrust/system/cuda/memory_resource.h>
#include <thrust/mr/allocator.h>
#include <thrust/system/cpp/memory.h>

// ...

//using pinned_host_vector = std::vector<T, thrust::system::cuda::experimental::pinned_allocator<T>>;
template <typename T>
using pinned_host_vector = std::vector<T, thrust::mr::stateless_resource_allocator<T, thrust::cuda::universal_host_pinned_memory_resource>>;

But it still fails with the following error:

/usr/include/c++/9/bits/alloc_traits.h:556:25: error: no matching function for call to ‘__do_alloc_on_move(thrust::mr::stateless_resource_allocator<claraparabricks::genomeworks::cudaaligner::batched_devi
ce_matrices<unsigned int>::device_interface, thrust::system::cuda::detail::cuda_memory_resource<cudaMallocHost, cudaFreeHost, thrust::pointer<void, thrust::cuda_cub::tag, void, thrust::use_default> > >&, thrust::mr::stateless_resource_allocator<claraparabricks::genomeworks::cudaaligner::batched_device_matrices<unsigned int>::device_interface, thrust::system::cuda::detail::cuda_memory_resource<cudaMallocHost, cudaFreeHost, thrust::pointer<void, thrust::cuda_cub::tag, void, thrust::use_default> > >&, __pocma)’

Are there any plans to make GenomeWorks compatible with CUDA 12?

Thanks

@tonyjie
Copy link

tonyjie commented Nov 17, 2023

I encountered the same issue with CUDA 12

@ioeddk
Copy link

ioeddk commented Sep 23, 2024

I encounter the same issue in CUDA 12. I can't find the pinned_allocator.h library in the CUDA 12.2 include folder. I guess CUDA 12 has this part refactored and the GenomeWorks needs some patch to work on CUDA 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants