petsc: add -lm when building example

This commit is contained in:
Denis Davydov 2016-07-09 08:12:34 +02:00
parent c096bb332a
commit e482994a15

View file

@ -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: