diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 042938aa4b..7d2347a39d 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")