Skip to content

Linking directly with cudart causes problems for other apps linking to yaksa #258

@green-br

Description

@green-br

I have been building MPICH via Spack and it pulls in yaksa as a dependency. This seems to then make all programs that is compiled with MPI bringing in the cudart library from yaksa. This then caused issues in other programs where it compiles with mpicc and it may check whether a CUDA function is available and doesn't think it needs to link against cudart since it finds it already in the MPI library. Also, depending on library search path, it will always use the version of CUDA library at build time (for example rpath is used to fix library locations).

I propose that yaksa should use dlopen to open up the cudart library at runtime to use the functions it requires - this is what MPICH and OpenMPI use to make CUDA a runtime load rather than fixing at build time.

Thoughts welcome since I am not clear what the standard approach for this should be. Maybe I am misunderstanding something and happy to be corrected.

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