On 25/04/18 18:33, Ed Bueler wrote:
Lawrence --
Petsc Development GIT revision: v3.4.2-20859-g7bfdb6492c GIT Date: 2018-04-03 16:04:52 -0500 This is 20859 commits after the 3.4.2 tag. It's from about three weeks ago. Dunno why the git describe our out [output?] is this.
Odd, but I got it. Wasn't reading the whole string.
Can you post the output of firedrake-status? Both with the reinstalled firedrake, and the old, it crashes... Aha, it's a python script, so just run firedrake-status, rather than try to source it.
Got it. And firedrake-status tells me that PETSC_DIR is my own or "None" according to whether I do "unset PETSC_DIR" before running activate or not. Makes sense!
I have now reinstalled firedrake with PETSC_DIR unset ... But if I run activate later it seems to use the value of PETSC_DIR at that time.
I'll reiterate that firedrake runs with (basically) petsc master. However, we had issues with changes not being made simultaneously in petsc and petsc4py. Hence we maintain a fork with known good branch pointers for both (and slepc and slepc4py). These are the "firedrake" branches you can see at github.com/firedrakeproject/petsc <http://github.com/firedrakeproject/petsc> etc... firedrake-install clones and builds these packages.
Understood.
If you have PETSC_DIR set then it complains (or it should).
It does not complain. It probably should? Would have saved me confusion. Turns out my PETSC_DIR had almost the same master commit, but not quite .. thus truely weird seg faults when that petsc was silently linked.
Hmm, so it's only during the installation that we complain. The install script has this code: if "PETSC_DIR" in os.environ and not args.honour_petsc_dir: quit("""The PETSC_DIR environment variable is set. This is probably an error. If you really want to use your own PETSc build, please run again with the --honour-petsc-dir option. """) So possibly if you ran the installer when PETSC_DIR was unset, and then later happened to set it, you wouldn't have got this warning.
You can run with your prebuilt petsc: run the install with --honour-petsc-dir. But we don't guarantee that you will get all the different bits matching.
Actually now that I know it is v3.4.2 + 20,000 commits I'm good with firedrake's petsc choice! ;-)
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? I think so yes. It's possible that this env variable interferes with the library that petsc4py loads, and if things have changed, maybe you get issues.
firedrake-status confirms that "unset PETSC_DIR" action is really needed. Should this be documented in the firedrake install instructions? Maybe the fact that I already have PETSc on my machine is a special case ... but probably not that special.
As mentioned above, the installer should barf if PETSC_DIR is set. If it doesn't, a bug report would be most welcome. Good to hear that everything is now working though. Thanks, Lawrence