RuntimeErrorTraceback (most recent call last) <ipython-input-4-651fcf6b9953> in <module>() 10 V = FunctionSpace(mesh, 'Lagrange', 1) 11 # Define boundary conditions ---> 12 u0 = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]') 13 def u0_boundary(x, on_boundary): 14 return on_boundary /home/fenics/build/lib/python2.7/site-packages/dolfin/functions/expression.pyc in __new__(cls, cppcode, *args, **kwargs) 651 cpp_base, members = compile_expressions([cppcode], 652 [generic_function_members], --> 653 mpi_comm=kwargs.get("mpi_comm")) 654 cpp_base, members = cpp_base[0], members[0] 655 /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/expressions.pyc in compile_expressions(cppargs, generic_function_members, mpi_comm) 216 code_snippets), classnames, additional_declarations="\n".join(\ 217 additional_declarations), --> 218 mpi_comm=mpi_comm) 219 220 return expression_classes, all_members /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/expressions.pyc in compile_expression_code(code, classnames, module_name, additional_declarations, mpi_comm) 144 compiled_module = compile_extension_module(\ 145 code, additional_declarations=additional_declarations, \ --> 146 mpi_comm=mpi_comm) 147 148 # Get the compiled class /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/jit.pyc in mpi_jit(*args, **kwargs) 63 # Just call JIT compiler when running in serial 64 if MPI.size(mpi_comm) == 1: ---> 65 return local_jit(*args, **kwargs) 66 67 # Compile first on process 0 /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.pyc in compile_extension_module(code, module_name, additional_declarations, additional_system_headers, mpi_comm, **instant_kwargs) 427 # Check that the swig version of the compiled module is the same as 428 # dolfin was compiled with --> 429 check_swig_version(compiled_module) 430 return compiled_module 431 /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.pyc in check_swig_version(compiled_module) 260 "version is not the same as extension module swig "\ 261 "version: '%s' != '%s' " % \ --> 262 (cpp.__swigversion__, compiled_module.swigversion)) 263 264 @mpi_jit_decorator /home/fenics/build/lib/python2.7/site-packages/dolfin/cpp/common.pyc in dolfin_error(location, task, reason) 2897 2898 """ -> 2899 return _common.dolfin_error(location, task, reason) 2900 2901 def deprecation(feature, version_deprecated, message): RuntimeError: *** ------------------------------------------------------------------------- *** DOLFIN encountered an error. If you are not able to resolve this issue *** using the information listed below, you can ask for help at *** *** fenics-...@googlegroups.com *** *** Remember to include the error message listed below and, if possible, *** include a *minimal* running example to reproduce the error. *** *** ------------------------------------------------------------------------- *** Error: Unable to compiling extension module. *** Reason: Incompatible swig versions detected. DOLFIN swig version is not the same as extension module swig version: '3.0.10' != '3.0.8' . *** Where: This error was encountered inside compilemodule.py. *** Process: 0 *** *** DOLFIN version: 2016.1.0 *** Git changeset: f4e22e59622b42182d16059f0212ddb1c6aa8712 *** -------------------------------------------------------------------------
No problem glad it's been useful for you.
Can you try two things:
1) Clean your instant cache using fenicsproject clean-cache stable. SWIG has been upgraded in the latest container. We hold a persistent cache of compiled objects shared between containers but that cache breaks when updating.
2) Upgrade to the latest version of the fenicsproject script by using the same copy and paste line from the website you used to install. This should fix your file permissions issue. The image and the script should work in tandem to get permissions right. The ins and outs of this are quite complicated so no space to explain this here.
3) You may need to recreate your container using fenicsproject notebook.
Post back if it doesn't work.
fenicsproject clean-cache stable
curl -s https://get.fenicsproject.org | bash
fenicsproject notebook cyl
fenicsproject start cyl
All went well and I went to URL in browser, saw my list of files and launched the notebook.
1. The notebook is still “readonly"
2. When I run the notebook I got this *different* error shown below. In the terminal window there are many lines regarding FCC, compiling, reusing, caching, etc.
Calling FFC just-in-time (JIT) compiler, this may take some time.
IOErrorTraceback (most recent call last) <ipython-input-2-641831270709> in <module>() 1 # Create mesh and define function space 2 mesh = UnitSquareMesh(20,20) ----> 3 V = FunctionSpace(mesh, 'Lagrange', 1) 4 # Define boundary conditions 5 u0 = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]') /home/fenics/build/lib/python2.7/site-packages/dolfin/functions/functionspace.pyc in __init__(self, *args, **kwargs) 204 self._init_from_ufl(*args, **kwargs) 205 else: --> 206 self._init_convenience(*args, **kwargs) 207 208 def _init_from_ufl(self, mesh, element, constrained_domain=None): /home/fenics/build/lib/python2.7/site-packages/dolfin/functions/functionspace.pyc in _init_convenience(self, mesh, family, degree, form_degree, constrained_domain, restriction) 256 257 self._init_from_ufl(mesh, element, --> 258 constrained_domain=constrained_domain) 259 260 def _init_from_cpp(self, cppV, **kwargs): /home/fenics/build/lib/python2.7/site-packages/dolfin/functions/functionspace.pyc in _init_from_ufl(self, mesh, element, constrained_domain) 222 #if dolfin_element is None or dolfin_dofmap is None: 223 # assert dolfin_element is None and dolfin_dofmap is None, "Expecting both or none of these." --> 224 dolfin_element, dolfin_dofmap = _compile_dolfin_element(element, mesh, constrained_domain=constrained_domain) 225 226 # Initialize the cpp.FunctionSpace /home/fenics/build/lib/python2.7/site-packages/dolfin/functions/functionspace.pyc in _compile_dolfin_element(element, mesh, constrained_domain) 87 88 # JIT-compile element to get ufc_element and ufc_dofmap ---> 89 ufc_element, ufc_dofmap = jit(element, mpi_comm=mesh.mpi_comm()) 90 91 dolfin_element = cpp.FiniteElement(ufc_element) /home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/jit.pyc in mpi_jit(*args, **kwargs)
63 # Just call JIT compiler when running in serial
64 if MPI.size(mpi_comm) == 1:
---> 65 return local_jit(*args, **kwargs)
66
67 # Compile first on process 0
/home/fenics/build/lib/python2.7/site-packages/dolfin/compilemodules/jit.pyc in jit(ufl_object, form_compiler_parameters, mpi_comm)
122
123 # Execute!
--> 124 result = ffc.jit(ufl_object, parameters=p)
125 if isinstance(ufl_object, ufl.Form):
126 compiled_form, module, prefix = result
/home/fenics/build/lib/python2.7/site-packages/ffc/jitcompiler.pyc in jit(ufl_object, parameters)
199 use_ctypes = os.environ.get("FFC_USE_CTYPES")
200 if not use_ctypes:
--> 201 module = jit_build_with_instant(ufl_object, module_name, parameters)
202 else:
203 module = jit_build_with_dijitso(ufl_object, module_name, parameters)
/home/fenics/build/lib/python2.7/site-packages/ffc/jitcompiler.pyc in jit_build_with_instant(ufl_object, module_name, parameters)
99
100 # Write to file
--> 101 write_code(code_h, code_c, module_name, parameters)
102
103 # Build module using Instant
/home/fenics/build/lib/python2.7/site-packages/ffc/formatting.pyc in write_code(code_h, code_c, prefix, parameters)
134 def write_code(code_h, code_c, prefix, parameters):
135 # Write file(s)
--> 136 _write_file(code_h, prefix, ".h", parameters)
137 if code_c:
138 _write_file(code_c, prefix, ".cpp", parameters)
/home/fenics/build/lib/python2.7/site-packages/ffc/formatting.pyc in _write_file(output, prefix, postfix, parameters)
159 "Write generated code to file."
160 filename = os.path.join(parameters["output_dir"], prefix + postfix)
--> 161 with open(filename, "w") as hfile:
162 hfile.write(output)
163 info("Output written to " + filename + ".")
IOError: [Errno 13] Permission denied: './ffc_element_6f207fe7cb7a4724787b60b35d278be111fc5980.h'fenicsproject pull stable
If that doesn't work:
Which host OS do you have? Could you post the output of the fenicsproject script commands so I can see how the container is being setup? What are the permissions of the file in the container (open a terminal in Jupyter and run stat on a file in /home/fenics). And in the project directory?
Jack
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
csm-mmoelter-m1:~ mmoelter$ cd Documents/LiquidCrystal/Cylinder/DockFenics
csm-mmoelter-m1:DockFenics mmoelter$ fenicsproject pull stable
[docker pull quay.io/fenicsproject/stable]
Using default tag: latest
latest: Pulling from fenicsproject/stable
f069f1d21059: Already exists
ecbeec5633cf: Already exists
ea6f18256d63: Already exists
54bde7b02897: Already exists
a3ed95caeb02: Already exists
ce9e695a6234: Already exists
a3ed95caeb02: Already exists
7d53475230cf: Already exists
f9cc7fcaeb59: Already exists
cbae41b257a8: Already exists
f4361ee97fe4: Already exists
53463f9bb986: Already exists
2ffec7e531d5: Already exists
d6bf654ed4cf: Already exists
a38171602c8b: Already exists
e791c109926c: Already exists
de3d7f52fcd5: Already exists
ed28c46b1d60: Already exists
ba84cf3736dd: Already exists
2116c2c0d3e4: Already exists
0898d930a5da: Already exists
995a7d028595: Already exists
c7787c280973: Already exists
f30f67ee1f43: Already exists
4b89d500bc3e: Already exists
b00844b71e72: Already exists
67ad95401144: Already exists
0e43b3c67087: Already exists
9515ec6258fd: Already exists
Digest: sha256:dcf00216e6424974469244fb394496d4bc70d1a839bc7d4737d84b43f4453918
Status: Image is up to date for quay.io/fenicsproject/stable:latest
csm-mmoelter-m1:DockFenics mmoelter$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/fenicsproject/stable latest 96603218bc91 8 days ago 1.435 GB
csm-mmoelter-m1:DockFenics mmoelter$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
csm-mmoelter-m1:DockFenics mmoelter$ fenicsproject notebook permtest
Creating new FEniCS Project notebook project permtest.
[docker volume create --name instant-cache-quay.iofenicsprojectstable]
instant-cache-quay.iofenicsprojectstable
[docker create -p 192.168.99.100:3000-4000:8888 --env HOST_UID=2018471 --env HOST_GID=9999 -v instant-cache-quay.iofenicsprojectstable:/home/fenics/.instant -v '/Users/mmoelter/Documents/LiquidCrystal/Cylinder/DockFenics':/home/fenics/shared -w /home/fenics/shared --label org.fenicsproject.created_by_script=true --label org.fenicsproject.project_type='notebook' --name permtest quay.io/fenicsproject/stable 'jupyter-notebook --ip=0.0.0.0']
ffdc06f59060cc588b194ce9c111855d0ef213e8aa7c7e7b63c69faeb7ecf02e
To start the session, type the following command:
fenicsproject start permtest
You will find the current working directory '/Users/mmoelter/Documents/LiquidCrystal/Cylinder/DockFenics' under ~/shared.
csm-mmoelter-m1:DockFenics mmoelter$ fenicsproject start permtest
Starting project named permtest.
[docker start permtest]
permtest
You can access the Jupyter notebook at http://192.168.99.100:3024
[docker attach permtest]
[I 21:18:45.087 NotebookApp] Writing notebook server cookie secret to /home/fenics/.local/share/jupyter/runtime/notebook_cookie_secret
[I 21:18:45.109 NotebookApp] Serving notebooks from local directory: /home/fenics/shared
[I 21:18:45.110 NotebookApp] 0 active kernels
[I 21:18:45.110 NotebookApp] The Jupyter Notebook is running at: http://0.0.0.0:8888/
[I 21:18:45.110 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 21:18:45.111 NotebookApp] No web browser found: could not locate runnable browser.
[I 21:19:02.158 NotebookApp] 302 GET / (192.168.99.1) 0.59ms
[I 21:19:18.085 NotebookApp] Writing notebook-signing key to /home/fenics/.local/share/jupyter/notebook_secret
[W 21:19:18.088 NotebookApp] Notebook FenicsTutorialTest.ipynb is not trusted
[W 21:19:18.116 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20160729211845 (192.168.99.1) 10.44ms referer=http://192.168.99.100:3024/notebooks/FenicsTutorialTest.ipynb
[I 21:19:18.298 NotebookApp] Kernel started: aad5e88d-99e5-49a9-9ff8-465d1385246b
[I 21:19:37.569 NotebookApp] New terminal with automatic name: 1
I went to the URL listed (http://192.168.99.100:3024) and the notebook started as usual. I opened a file and it is still “read only”.
If I try to run it I get the permission error from before.
csm-mmoelter-m1:DockFenics mmoelter$ stat FenicsTutorialTest.ipynb
16777218 15259949 -rw-r--r-- 1 mmoelter domain^users 0 74117 "Jul 29 14:19:18 2016" "Jul 25 13:08:34 2016" "Jul 25 13:08:34 2016" "Apr 13 16:50:21 2016" 4096 152 0 FenicsTutorialTest.ipynb
csm-mmoelter-m1:DockFenics mmoelter$
csm-mmoelter-m1:~ mmoelter$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/fenicsproject/stable latest 96603218bc91 10 days ago 1.435 GB
csm-mmoelter-m1:~ mmoelter$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
csm-mmoelter-m1:~ mmoelter$ pwd
/Users/mmoelter
csm-mmoelter-m1:~ mmoelter$ cd Documents/LiquidCrystal/Cylinder/DockFenics
csm-mmoelter-m1:DockFenics mmoelter$ pwd
/Users/mmoelter/Documents/LiquidCrystal/Cylinder/DockFenics
csm-mmoelter-m1:DockFenics mmoelter$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/fenicsproject/stable latest 96603218bc91 10 days ago 1.435 GB
csm-mmoelter-m1:DockFenics mmoelter$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
csm-mmoelter-m1:DockFenics mmoelter$ fenicsproject start cyl
Starting project named cyl.
[docker start cyl]
cyl
You can access the Jupyter notebook at http://192.168.99.100:3031
[docker attach cyl]