Dear FEniCS developers,
Thank you for building this fantastic package!
I have encountered a problem when trying to run the following MWE (modified from the NS code from the tutorial) on dolfinx 0.5.0 on Arch Linux:
import numpy as np
import ufl
from dolfinx import fem, io, log, mesh, nls, plot
from dolfinx.io import gmshio
from mpi4py import MPI
from petsc4py import PETSc
nDim = 2
domain, cell_tags, facet_tags = gmshio.read_from_msh(
"model.msh", MPI.COMM_WORLD, 0, gdim=nDim
)
element_CG2 = ufl.VectorElement("CG", domain.ufl_cell(), 2)
element_CG1 = ufl.FiniteElement("CG", domain.ufl_cell(), 1)
V_vv = fem.FunctionSpace(domain, element_CG2)
V_p = fem.FunctionSpace(domain, element_CG1)
The mesh file can be downloaded from https://files.catbox.moe/y2f494.msh (I’m not sure when the file will get deleted on this site. Please let me know if you cannot download it)
The script failed at the line “V_vv = fem.FunctionSpace(domain, element_CG2)” and complete output is:
Info : Reading 'model.msh'...
Info : 11 entities
Info : 1950 nodes
Info : 2045 elements
Info : Done reading 'model.msh'
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 173, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 917, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/spawn.py", line 68, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code -11
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/usr/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/usr/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 176, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code -11
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vortex/Downloads/Work/Incompressible flow/Untitled.py", line 36, in <module>
V_vv = fem.FunctionSpace(domain, element_CG2)
File "/usr/lib/python3.10/site-packages/dolfinx/fem/function.py", line 457, in __init__
(self._ufcx_element, self._ufcx_dofmap), module, code = jit.ffcx_jit(
File "/usr/lib/python3.10/site-packages/dolfinx/jit.py", line 56, in mpi_jit
return local_jit(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/dolfinx/jit.py", line 206, in ffcx_jit
r = ffcx.codegeneration.jit.compile_elements([ufl_object], parameters=p_ffcx, **p_jit)
File "/usr/lib/python3.10/site-packages/ffcx/codegeneration/jit.py", line 126, in compile_elements
impl = _compile_objects(decl, elements, names, module_name, p, cache_dir,
File "/usr/lib/python3.10/site-packages/ffcx/codegeneration/jit.py", line 252, in _compile_objects
ffibuilder.compile(tmpdir=cache_dir, verbose=True, debug=cffi_debug)
File "/usr/lib/python3.10/site-packages/cffi/api.py", line 725, in compile
return recompile(self, module_name, source, tmpdir=tmpdir,
File "/usr/lib/python3.10/site-packages/cffi/recompiler.py", line 1564, in recompile
outputfilename = ffiplatform.compile('.', ext,
File "/usr/lib/python3.10/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/usr/lib/python3.10/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: CompileError: command '/usr/bin/gcc' failed with exit code -11
I have determined the error is related to the use of read_from_mesh somehow. If I change that line into
domain = mesh.create_rectangle(MPI.COMM_WORLD, [np.array([0, 0]), np.array([2.2, 0.41])], [10, 5])
The script can run without any errors. It’s so strange.
Thank you in advance!
Edit: The script is run without mpirun.