nextfoam / baram

CFD for Everyone
https://baramcfd.org/
GNU General Public License v3.0
98 stars 17 forks source link

Apptainer : No module named 'baramFlow' #88

Open fbob opened 4 months ago

fbob commented 4 months ago

OS: cachyos - arch based Installation : apptainer on ~/BaramApptainer

apptainer exec ~/BaramApptainer/baram-24.2.0.sif /opt/baram/baramFlow.sh

gives me

/usr/bin/python3: Error while finding module specification for 'baramFlow.main' (ModuleNotFoundError: No module named 'baramFlow')

Same for mesh.

bosung-gotocloud commented 4 months ago

In my Ubuntu host machine, though the above message shows, the baramMesh and baramFlow work well. I guess that according to the environment setup in the host OS, this error shows and program can't be executed.

Can you try with bash -c command?

apptainer exec ~/BaramApptainer/baram-24.2.0.sif bash -c '/opt/baram/baramFlow.sh'

The program can't be run continously, then try run in the apptainer shell with following command.

apptainer shell ~/BaramApptainer/baram-24.2.0.sif
[baram-24.2.0] username@hostname:directory$ /opt/baram/baramMesh.sh
fbob commented 4 months ago

Thanks for the feedback. Useful info :

❯ apptainer exec ~/BaramApptainer/baram-24.2.0.sif bash -c '/opt/baram/baramFlow.sh'

Detected system locale encoding (ANSI_X3.4-1968, locale "C") is not UTF-8.
Qt shall use a UTF-8 locale ("C.UTF-8") instead. If this causes problems,
reconfigure your locale. See the locale(1) manual for more information.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, wayland-egl, minimalegl, eglfs, vkkhrdisplay, linuxfb, offscreen, wayland, vnc, xcb.

/opt/baram/baramFlow.sh: line 15: 13528 Aborted                 python3 -m baramFlow.main

It looks like the problem is related to the fact that I'm using Wayland isn't ? Many thanks. Francois

bosung-gotocloud commented 4 months ago

I think the error message is related to the OpenGL problem on your host OS. I think 'vglrun' needs to be installed in your host machine. I installed BARAM with 'vglrun' for x2go remote desktop which doesn't support native GL. The instruction about installing with vglrun is not described until yet. And I didn't test vglrun in the apptainer container yet.

Sooner or later, I will test on the hostOS with vglrun.

bosung-gotocloud commented 4 months ago

Download baram-24.2.0-vglrun.tar.gz and run apptainer container with following command:

apptainer exec ~/BaramApptainer/baram-24.2.0-vglrun.sif bash -c 'vglrun /opt/baram/baramFlow.sh'