Unfortunately, the result file (exported via xdmffile) contains only zeros in complex mode. Opening the xdmf-file in paraview shows, that both the imaginary and the real part were exported. Everything works fine in real mode.
I’m using the latest version from the ppa on focal fossa (ubuntu 18.04).
I would be glad if anyone has an idea of what’s going on.
Please check your Ubuntu version. I think you mean Ubuntu 20.04 not 18.04. focal is 20.04. (dolfinx does not build easily on bionic 18.04 since it needs PETSC >= 3.10. bionic only provides PETSc 3.7).
My guess is that your installation is fine (check you have python3-dolfinx-complex installed). Probably the problem is activating the complex build
Debian (and hence Ubuntu) offers multiple builds. In particular both real and complex number builds are available. Different groups working on the same computer might have different requirements, so I’ve enabled parallel installation of both builds, both can be used on the same computer.
The default build is the real number build, keyed to the default PETSc linked through /usr/lib/petsc.
The configuration of PETSc applications is controlled through PETSC_DIR. So you’ll probably find it works if you specify that you need complex PETSc,
export PETSC_DIR=/usr/lib/petscdir/petsc-complex
(or look around /usr/lib/petscdir/ for other alternatives).
See /usr/share/doc/python3-dolfinx/README.Debian for more detail.
The PPA provides the recent 0.1.0 release, that would be the version you’re testing.
I’ve checked I can reproduce the problem on a fresh cloud installation of focal. On my own system (Debian unstable, PETSc 3.15) a nontrivial solution is generated, but on focal the PPA build generates a zero solution (running as PETSC_DIR=/usr/lib/petscdir/petsc3.12/x86_64-linux-gnu-complex/ python3 demo_helmholtz_2d.py after also installing python3-dev).
Will have to dig deeper to see if the problem is with the PPA build or with the older PETSc version 3.12.
@dokken can you confirm whether the docker build uses the local ubuntu installation of petsc or provides its own petsc? If the latter, which PETSc version is it?
The ubuntu test cloud available to me only offers the LTS releases (bionic and focal). @Mario-B , are you in a position to be able to upgrade your Ubuntu installation to hirsute (21.04). That uses PETSc 3.14.
So, the docker image is currently using dolfinx main branch, which uses PETSc 3.15.1.
Therefore i figured testing dolfinx:0.1.0 with petsc 3.15.1 would test it without me having to install an old petsc.
I can reproduce the problem with a fresh build of PETSc 3.12 on Debian unstable (where PETSc 3.14 or 3.15 is otherwise used). That suggests PETSc 3.12 is the problem here, and the error should be reproducible in Docker.
Hi,
I’m trying to move to the dolfin-x version. I’ve installed the debian package python3-dolfinx-complex however when I import it, dolfinx.has_petsc_complex returns false.
I tried what you mentioned about exporting the PETS_DIR variable (which previously was empty) and now I cannot import dolfinx, as I receive the error:
RuntimeError: Could not find DOLFIN pkg-config file. Please make sure appropriate paths are set.
I don’t know I’m missing something on your answer.