Skip to content

Commit 7946182

Browse files
Lutz Grossclaude
andcommitted
Fix build, runtime, and documentation issues
- LinearProblem: fix isSymmetric/isHermitian returning None instead of bool; fix setSymmetry/setHermitian not updating internal flags; defer Trilinos "number of equations" parameter until numEquations is actually known - Mesh_readGmsh: rewrite get_line() to fix buffer overflow and O(n) scan bug; use clean offset-tracking loop with 1 MB safety cap - SConstruct: disable ParMETIS and PT-Scotch for Trilinos when mpi=none (both libraries require MPI and caused link failures in no-MPI builds) - dependencies.py: replace hardcoded numpy include paths with portable `python -c 'import numpy; print(numpy.get_include())'` on all platforms - debian_options.py + options.md: update parmetis paths for Ubuntu 24.04+ (/usr/include + /usr/lib instead of /usr/include/parmetis) - installation.md: add pandoc and libnetcdf-c++4-dev dependencies; add missing doc build commands to Docker/quick-start section - BelosMultiVecTraits_Tpetra.hpp: disable Kokkos finalize hook that causes double-free crash on shutdown (upstream Trilinos issue #11976) - Example scripts: add missing mkDir("output") calls before writing output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6f78069 commit 7946182

17 files changed

Lines changed: 103 additions & 62 deletions

File tree

SConstruct

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,13 @@ if env['build_trilinos'] != 'never':
676676

677677
metis_enable = 'ON' if env['metis'] else 'OFF'
678678
metis_inc, metis_lib = get_inc_lib_paths(env['metis_prefix']) if env['metis'] else ('', '')
679-
parmetis_enable = 'ON' if env['parmetis'] else 'OFF'
680-
parmetis_inc, parmetis_lib = get_inc_lib_paths(env['parmetis_prefix']) if env['parmetis'] else ('', '')
681-
scotch_enable = 'ON' if env['scotch'] else 'OFF'
682-
scotch_inc, scotch_lib = get_inc_lib_paths(env['scotch_prefix']) if env['scotch'] else ('', '')
679+
# ParMETIS and PT-Scotch require MPI
680+
parmetis_for_trilinos = env['parmetis'] and env['mpi'] != 'none'
681+
parmetis_enable = 'ON' if parmetis_for_trilinos else 'OFF'
682+
parmetis_inc, parmetis_lib = get_inc_lib_paths(env['parmetis_prefix']) if parmetis_for_trilinos else ('', '')
683+
scotch_for_trilinos = env['scotch'] and env['mpi'] != 'none'
684+
scotch_enable = 'ON' if scotch_for_trilinos else 'OFF'
685+
scotch_inc, scotch_lib = get_inc_lib_paths(env['scotch_prefix']) if scotch_for_trilinos else ('', '')
683686

684687
# Allow override of compilers for Trilinos (useful for avoiding libc++ issues on macOS)
685688
trilinos_cc_compiler = env.get('trilinos_cc', '') or env['CC']

doc/examples/usersguide/MT.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
# ... mesh resolution:
4444
h0, h1=L0/NE0, L1/NE1
4545

46+
mkDir("output")
4647
# create Domain:
4748
domain = Rectangle(n0=NE0, n1=NE1, l0=L0, l1=L1)
4849

doc/examples/usersguide/diffusion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
if not HAVE_FINLEY:
3131
print("Finley module not available")
3232
else:
33+
mkDir("output")
3334
xc=[0.02,0.002]
3435
r=0.001
3536
qc=50.e6

doc/examples/usersguide/dirac.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
if not HAVE_FINLEY:
3737
print("Finley module not available")
3838
else:
39+
mkDir("output")
3940
mydomain=Rectangle(30,30, l0=3, l1=2,
4041
diracPoints=[(1.,1.), (2.,1.)], diracTags=['in', 'out'])
4142
# fix the solution on the boundary

doc/examples/usersguide/heatedblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
HAVE_FINLEY = False
3131

3232
if HAVE_FINLEY:
33-
33+
mkDir("output")
3434
#... set some parameters ...
3535
lam=1.
3636
mu=0.1

doc/examples/usersguide/helmholtz.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
if not HAVE_FINLEY:
3232
print("Finley module not available")
3333
else:
34+
mkDir("output")
3435
#... set some parameters ...
3536
kappa=1.
3637
omega=0.1

doc/examples/usersguide/inclusion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
if not HAVE_FINLEY:
3333
print("Finley module not available")
3434
else:
35+
mkDir("output")
3536
# ... generate domain ...
3637
print("read in mesh")
3738
domain = ReadGmsh("inclusion.msh", 2, optimize=True)

doc/examples/usersguide/poisson.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
if not HAVE_FINLEY:
3131
print("Finley module not available")
3232
else:
33+
mkDir("output")
3334
mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
3435
# define characteristic function of Gamma^D
3536
x = mydomain.getX()

doc/examples/usersguide/poisson_vtk.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
if not HAVE_FINLEY:
3131
print("Finley module not available")
3232
else:
33+
mkDir("output")
3334
# generate domain:
3435
mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
3536
# define characteristic function of Gamma^D

doc/examples/usersguide/simpletest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from esys.finley import ReadGmsh
55
from esys.escript.pdetools import Locator
66

7+
mkDir("output")
78
print("read in mesh")
89
domain=ReadGmsh("simplemesh.msh", 3, optimize=True )
910

0 commit comments

Comments
 (0)