Skip to content

GenomeWorks fails to compile with CUDA 12 #668

@quim0

Description

@quim0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions