Hi Niall, On Wed, 21 Aug 2019 at 15:04, Madden, Niall <niall.madden@nuigalway.ie> wrote:
Hi all, I've returned to this task, and tried to follow David's suggestion of building on a clean conda environment. This time, I used the intel compiler (mpiicc).
Trying to follow the steps in the install script, we cloned firedrake, ufl, fiat, PyOP2, COFFEE, loopy, petsc, supermesh, spatialindex, etc.
Then we can successfully install all these. In particular, we can configure/make/make install petsc
Finally, we run, in firedrake, python setup.py install with LDSHARED, CFLAGS, CC, CXX, and prefix set appropriately.
[...]
That is, if I try echo "import firedrake" | python I get
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/MYOB/r/libs/firedrake/firedrake/__init__.py", line 5, in <module> if "PETSC_DIR" in os.environ and not config["options"]["honour_petsc_dir"]: TypeError: 'NoneType' object is not subscriptable
[...]
I note that, the "activate" script is not in firedrake/bin Neither, as it happens, is firedrake-update, but firedrake-clean, firedrake-install, and firedrake-zenodo are.
This is an idiosyncrasy of the firedrake-install process. "firedrake-update" is actually just a copy of "firedrake-install" with a different name (so it knows it's in update mode). firedrake-{clean/install/zenodo} are created in the bin directory by setup.py, but firedrake-update is copied _by the firedrake-install process_. Hence it not existing because you did everything by hand. You can "fix" this by just copying firedrake-install to firedrake-update in the bin directory. The issue with the TypeError above is related. As well as creating the firedrake-update script, firedrake-install also writes a little configuration file that remembers the options you installed firedrake with (so that firedrake-update maintains them). Again, because you didn't run firedrake-install, this file doesn't exist. The relevant file to be created is `configuration.json` in the firedrake_configuration subdirectory of the firedrake source tree. Mine looks like: {"options": {"package_manager": false, "minimal_petsc": false, "mpicc": null, "mpicxx": null, "mpif90": null, "mpiexec": null, "disable_ssh": false, "honour_petsc_dir": true, "show_petsc_configure_options": false, "slepc": true, "packages": [], "honour_pythonpath": false, "petsc_int_type": "int32", "cache_dir": "/home/vtdb72/Documents/work/src/firedrake/.cache"}, "environment": {}, "additions": []} Editing this by hand is, however, rather error prone. Additionally, I'm not necessarily sure that firedrake-update will run as normal. Given you started with a clean conda environment, did you run into issues just running firedrake-install inside that? Thanks, Lawrence