It looks like I have found part of my confusion.

I have now reinstalled firedrake with PETSC_DIR unset, so there is an old PETSc (i.e. 3.4.2) inside the firedrake directory.  But if I run activate later it seems to use the value of PETSC_DIR at that time.

This is my working explanation for why I get seg faults and why "gdb --args python3 MYSCRIPT.py" shows backtraces with the wrong PETSc (i.e. the 3.9 version I am using for other purposes).

So it looks like I should do

$ unset PETSC_DIR
$ source firedrake/bin/activate

every time I start firedrake?  Is this the correct action if one has PETSC_DIR set?

Ed

--
Ed Bueler
Dept of Math and Stat and Geophysical Institute
University of Alaska Fairbanks
Fairbanks, AK 99775-6660
301C Chapman