diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 82ea5eeff2..3fbec80966 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -87,10 +87,12 @@ def libs(self): if '+mpi' in self.spec: libraries = ['libptscotch', 'libptscotcherr'] + libraries - if '+esmumps' in self.spec: + + if '+esmumps' in self.spec: + if '~mpi' in self.spec or self.spec.version >= Version('7.0.0'): + libraries = ['libesmumps'] + libraries + else: libraries = ['libptesmumps'] + libraries - elif '~mpi+esmumps' in self.spec: - libraries = ['libesmumps'] + libraries scotchlibs = find_libraries( libraries, root=self.prefix, recursive=True, shared=shared