(reintroduced firedrake cc) On 25/04/18 19:06, Ed Bueler wrote:
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.
This is sort of missing the point. You are assuming that my machine is devoted to firedrake and it is not.
Ed's behavior most of the time: Use PETSc with C. Keep petsc master up to date. PETSC_DIR is set in my .bashrc. (And until recently: no firedrake on machine.)
Sure.
Ed installs firedrake: Yes it complains PETSC_DIR is set. I try --honour-petsc-dir and it fails. (Presumably I had a petsc master commit that was bad for petsc4py etc.) So I unset PETSC_DIR and get successful installation. Things work that day.
Ed turns on machine next day: Do "source firedrake/bin/activate". No complaint that environment PETSC_DIR is different from one used in firedrake install. Instead: bizarre seg faults ... because under the hood the dynamic linking is to the wrong PETSc ?! ...
Yes, I agree this is a bad failure mode.
So: Presumably activate should check PETSC_DIR against the one used in the firedrake install? Warn if not equal?
Not sure of the right way to do it, but some such check worthwhile?
We can't do it in activate (because we don't control what's written to that script). However, I think we can do it on firedrake import. I do that here: https://github.com/firedrakeproject/firedrake/pull/1224 After this is merged (and you've done firedrake-update) you get an ImportError when importing firedrake in python if either: 1. PETSC_DIR is set, but you did not install with --honour-petsc-dir; 2. PETSC_DIR is not set, but you did install with --honour-petsc-dir. This should hopefully catch issues early, rather than late, and we can avoid this kind of dance in the future. Thanks, Lawrence
participants (1)
- 
                
                Lawrence Mitchell