From cad16f5d3d2b5d4f65e3ddf5e95cc4f05bc31510 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Sat, 15 Apr 2023 06:53:15 -0600 Subject: [PATCH] OpenMPI: tell it where libcuda.so is (#36784) starting with the 5.0.x release stream the cuda related configury items in Open MPI once again need --with-cuda-libdir so that libcuda.so can be found at configure time, otherwise no cuda support unless someone copies libcuda.so to $CUDA_HOME/lib64 related to #36760 Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 042938aa4bb..7d2347a39d3 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1007,6 +1007,11 @@ def configure_args(self): config_args.append( "--with-cuda-libdir={0}".format(spec["cuda"].libs.directories[0]) ) + if spec.satisfies("@5.0:"): + # And then it returned + config_args.append( + "--with-cuda-libdir={0}".format(spec["cuda"].libs.directories[0] + "/stubs") + ) if spec.satisfies("@1.7.2"): # There was a bug in 1.7.2 when --enable-static is used config_args.append("--enable-mca-no-build=pml-bfo")