diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index d5081d528a..1820d565d0 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -237,10 +237,10 @@ def configure_step(self): inc_spec = "-include=[%s]" % ','.join(scotch_inc) # For some reason there is a v3 suffix added to libptscotchparmetis - # which is the reason for this new code. - req_scotch_libs = ['libesmumps.a', 'libptesmumps.a', 'libptscotch.a', - 'libptscotcherr.a', 'libptscotchparmetisv3.a', 'libscotch.a', - 'libscotcherr.a'] + # which is the reason for this new code; + # note: order matters here, don't sort these alphabetically! + req_scotch_libs = ['libptesmumps.a', 'libptscotchparmetisv3.a', 'libptscotch.a', + 'libptscotcherr.a', 'libesmumps.a', 'libscotch.a', 'libscotcherr.a'] scotch_libs = [os.path.join(scotch, "lib", x) for x in req_scotch_libs] lib_spec = "-lib=[%s]" % ','.join(scotch_libs) self.cfg.update('configopts', ' '.join([withdep + spec for spec in ['=1', inc_spec, lib_spec]]))