From e482994a1505bf7b8e506872c8ac205fce68b217 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 9 Jul 2016 08:12:34 +0200 Subject: [PATCH] petsc: add -lm when building example --- var/spack/repos/builtin/packages/petsc/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 90afdbdb90..11f5c36c22 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -154,7 +154,7 @@ def install(self, spec, prefix): env['PETSC_DIR'] = self.prefix cc = Executable(spec['mpi'].mpicc) cc('ex50.c', '-I%s' % prefix.include, '-L%s' % prefix.lib, - '-lpetsc', '-o', 'ex50') + '-lpetsc', '-lm', '-o', 'ex50') run = Executable(join_path(spec['mpi'].prefix.bin, 'mpirun')) run('ex50', '-da_grid_x', '4', '-da_grid_y', '4') if 'superlu-dist' in spec: