Creating a FEniCS environment on Nextjournal

Hi,

Having a ready to go FEniCS environment in the cloud might help students get their hands dirty by coding rather than spend time trying to install FEniCS. Nextjournal is a computing notebook platform based on docker environments, and could be a good platform to work right away with FEniCS.

  • However, I could not create a functional environment from the docker image. The support team suspects something related to the ENTRYPOINT setting of the docker file - I’ve never worked with docker, so no idea what to think of it.
  • The Ubuntu (Nextjournal has the 18.04 version) installation couldn’t install mshr and failed to import fenics (No module named fenics).
  • The conda installation worked (conda install -c conda-forge fenics=2019 -y), but when trying the tutorial, the u_D = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]', degree=2) command returned an error.
dijitso failed to load existing file:
	/root/.cache/dijitso/lib/libdijitso-dolfin_expression_896eb0b182ba82960186c2d55ad06be2.so
error is:
	libdolfin.so.2019.1: cannot open shared object file: No such file or directory
Moving new file over differing existing file:
src: /tmp/tmpb4u927kt/dolfin_expression_896eb0b182ba82960186c2d55ad06be2.cpp.gz
dst: /root/.cache/dijitso/src/dolfin_expression_896eb0b182ba82960186c2d55ad06be2.cpp.gz
backup: /root/.cache/dijitso/src/dolfin_expression_896eb0b182ba82960186c2d55ad06be2.cpp.gz.old
Backup file exists, overwriting.
dijitso failed to load existing file:
	/root/.cache/dijitso/lib/libdijitso-dolfin_expression_896eb0b182ba82960186c2d55ad06be2.so
error is:
	libdolfin.so.2019.1: cannot open shared object file: No such file or directory

The Nextjournal notebook is here

Solution?

Thanks,

Essi

I have no experience with nextjournal. Maybe it’s a permissions issue with the auto generated code? But that doesn’t make sense since it seemed to compile the function space just fine… There’s a parameter or environment variable to set dijitso’s cache directory which I can’t remember off hand. Perhaps setting it to somewhere in a local directory would help?

Hi, we could find a work around by running pip install dijitso avec running conda install -c conda-forge fenics=2019.1. I have blogged it here. Finite element modelling in the clouds — essicolo

1 Like