Skip to content

Commit bf0c1e7

Browse files
committed
test petsc4py usage in dune-fem
1 parent 3b782eb commit bf0c1e7

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

testing/installPlusSource.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ femurl="$base/dune-fem"
44
exturl="$base/extensions"
55

66
export TMPDIR=/tmp
7-
python3 -m venv dune-env
7+
python3 -m venv --system-site-packages dune-env
88
. dune-env/bin/activate
99
pip install scikit-build requests mpi4py
1010

11+
# this script is supposed to use petsc4py - let's make sure it can be
12+
# accessed from the site-packages
13+
testScript="\
14+
import sys ;\
15+
import petsc4py ;\
16+
petsc4py.init(sys.argv) ;\
17+
from petsc4py import PETSc ;\
18+
print(petsc4py.__version__) ;\
19+
"
20+
python -c "$testScript"
21+
22+
1123
# enable pre-compiled modules
1224
export DUNE_ENABLE_PYTHONMODULE_PRECOMPILE=ON
1325

@@ -19,7 +31,8 @@ dunecontrol --only=dune-fem all
1931
python -m dune.fem
2032
cd fem_tutorial
2133
pip list
22-
/usr/bin/time python concepts.py
34+
/usr/bin/time python concepts.py &
35+
/usr/bin/time python externaleSolvers.py
2336
cd ..
2437

2538
# install polygongrid and test that can be used within dune-fem

0 commit comments

Comments
 (0)