dolfinx-tutorial icon indicating copy to clipboard operation
dolfinx-tutorial copied to clipboard

Issue on page /chapter1/fundamentals_code.html

Open OsbertWang opened this issue 1 year ago • 5 comments

My operating system is Ubuntu 22.04 in WSL for Windows 11. When I run the code, there are two points that need attention. First, pyvista.start_xvfb() should be deleted. I tried to install the recommended packages but failed to run the code. I suspect this is because WSL for Windows 11 already supports GUI in a different way. Second, dolfinx.io.VTXWriter is not defined. I found the code named utils.py, where VTXWriter is defined under the bool if _cpp.common.has_adios2. I think it means that I don't have adios2 in my WSL.

OsbertWang avatar Apr 11 '23 01:04 OsbertWang

First, pyvista.start_xvfb() should be deleted. I tried to install the recommended packages but failed to run the code. I suspect this is because WSL for Windows 11 already supports GUI in a different way.

How are you running the code in the WSL, as a ipynb or as a Python file?

Secondly, how did you install dolfinx and the relevant dependencies?

As you point out in your second question, it does not seem like you have adios2 installed on your system prior to installing dolfinx.

jorgensd avatar Apr 11 '23 04:04 jorgensd

How are you running the code in the WSL, as a ipynb or as a Python file?

I'm running the code in the WSL as a Python file.

Secondly, how did you install dolfinx and the relevant dependencies?

As you point out in your second question, it does not seem like you have adios2 installed on your system prior to installing dolfinx.

I installed dolfinx using the PPA method and did not install adios2 beforehand.

OsbertWang avatar Apr 11 '23 06:04 OsbertWang

I'm running the code in the WSL as a Python file.

you could try adding export PYVISTA_OFF_SCREEN=True in your environment.

I installed dolfinx using the PPA method and did not install adios2 beforehand.

To use adios2 with apt-Get it has to be Pre-installed (I think), as adios2 is not in the ubuntu package manager.

jorgensd avatar Apr 11 '23 06:04 jorgensd

you could try adding export PYVISTA_OFF_SCREEN=True in your environment.

OK. Actually, I have found that I am able to view the results without having to call pyvista.start_xvfb().

To use adios2 with apt-Get it has to be Pre-installed (I think), as adios2 is not in the ubuntu package manager.

Yes. I looked up how to install adios2 on ubuntu, and it seems that it requires installation from source. Unfortunately, I don't feel comfortable doing that at the moment.

OsbertWang avatar Apr 11 '23 07:04 OsbertWang

These days, I attempted to build ADIOS2 from source but unfortunately failed due to my lack of familiarity with the process. However, upon further exploration, I discovered that both FEniCSx and ADIOS2 are available on conda. As such, I am considering installing these two packages using anaconda instead.

OsbertWang avatar Apr 13 '23 00:04 OsbertWang