CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] PyFoam 0.6.9 wrong path to gnuplot (https://www.cfd-online.com/Forums/openfoam-community-contributions/199296-pyfoam-0-6-9-wrong-path-gnuplot.html)

klausb March 2, 2018 18:53

PyFoam 0.6.9 wrong path to gnuplot
 
Hi,

I installed PyFoam 0.6.9 using pip. Problem is, the path to the gnuplot installation is wrong hence the residual plot cannot be displayed.

I get the following error message:

Expected X11 driver: /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
Exec failed: No such file or directory
See 'help x11' for more details
Expected X11 driver: /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
Exec failed: No such file or directory
See 'help x11' for more details

I tested both programs and both work fine independently.

I also checked an older Ubuntu installation and in both cases, Ubuntu and my new Linux installation, gnuplot is installed in the /usr/bin /usr/share/gnuplot /usr/share/gnuplot/5.2 or /usr/lib/gnuplot directories.

How/Where can I adjust the path to gnuplot in PyFoam 0.6.9?

The workaround I tried is:

1: Create the expected folder structure /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
2: Create a symbolic link to gluplot
3: Now I had to create SSL certificates

And got the following errors:


gnuplot> BSR
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command


gnuplot> BSR

gnuplot> BSR
^
^
line 0: invalid command

line 0: invalid command


gnuplot> BSR

gnuplot> X 0 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: line 0: invalid commandinvalid command



line 0: invalid command


gnuplot> X 0 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: invalid command


gnuplot> BSR
line 0: invalid commandline 0:

invalid command


gnuplot> BSR

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: invalid command

line 0:
gnuplot> X -1 1 1 -1 -1
invalid command


gnuplot> X 0 1 1 -1 -1
line 0: invalid command


gnuplot> BSR
^
^
^
line 0: invalid command

line 0: invalid command


gnuplot> npyFoam: Bounded variables

gnuplot> X 0 1 1 -1 -1
line 0: invalid command

^

gnuplot> X 0 1 1 -1 -1
^
line 0: invalid command ^


line 0: invalid command


gnuplot> X -1 1 1 -1 -1

gnuplot> BSR
line 0: invalid command

^
^

gnuplot> X 0 1 1 -1 -1
line 0: invalid command line 0:

invalid command^



gnuplot> X -1 1 1 -1 -1
line 0: invalid command


gnuplot> BSR
^
^
line 0: invalid command

line 0:
gnuplot> npyFoam: Continuity
invalid command

^

gnuplot> X -1 1 1 -1 -1
line 0: invalid command

^

gnuplot> X -1 1 1 -1 -1
line 0: invalid command

^
line 0: invalid command


gnuplot> npyFoam: Residuals
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command

Any idea how to fix this?

Klaus

gschaider March 6, 2018 19:23

Quote:

Originally Posted by klausb (Post 683603)
Hi,

I installed PyFoam 0.6.9 using pip. Problem is, the path to the gnuplot installation is wrong hence the residual plot cannot be displayed.

I get the following error message:

Expected X11 driver: /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
Exec failed: No such file or directory
See 'help x11' for more details
Expected X11 driver: /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
Exec failed: No such file or directory
See 'help x11' for more details

I tested both programs and both work fine independently.

I also checked an older Ubuntu installation and in both cases, Ubuntu and my new Linux installation, gnuplot is installed in the /usr/bin /usr/share/gnuplot /usr/share/gnuplot/5.2 or /usr/lib/gnuplot directories.

How/Where can I adjust the path to gnuplot in PyFoam 0.6.9?

The workaround I tried is:

1: Create the expected folder structure /usr/lib64/gnuplot/gnuplot/5.2/gnuplot_x11
2: Create a symbolic link to gluplot
3: Now I had to create SSL certificates

And got the following errors:


gnuplot> BSR
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command


gnuplot> BSR

gnuplot> BSR
^
^
line 0: invalid command

line 0: invalid command


gnuplot> BSR

gnuplot> X 0 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: line 0: invalid commandinvalid command



line 0: invalid command


gnuplot> X 0 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: invalid command


gnuplot> BSR
line 0: invalid commandline 0:

invalid command


gnuplot> BSR

gnuplot> X -1 1 1 -1 -1
^
^
^
line 0: invalid command

line 0:
gnuplot> X -1 1 1 -1 -1
invalid command


gnuplot> X 0 1 1 -1 -1
line 0: invalid command


gnuplot> BSR
^
^
^
line 0: invalid command

line 0: invalid command


gnuplot> npyFoam: Bounded variables

gnuplot> X 0 1 1 -1 -1
line 0: invalid command

^

gnuplot> X 0 1 1 -1 -1
^
line 0: invalid command ^


line 0: invalid command


gnuplot> X -1 1 1 -1 -1

gnuplot> BSR
line 0: invalid command

^
^

gnuplot> X 0 1 1 -1 -1
line 0: invalid command line 0:

invalid command^



gnuplot> X -1 1 1 -1 -1
line 0: invalid command


gnuplot> BSR
^
^
line 0: invalid command

line 0:
gnuplot> npyFoam: Continuity
invalid command

^

gnuplot> X -1 1 1 -1 -1
line 0: invalid command

^

gnuplot> X -1 1 1 -1 -1
line 0: invalid command

^
line 0: invalid command


gnuplot> npyFoam: Residuals
^
line 0: invalid command


gnuplot> X -1 1 1 -1 -1
^
line 0: invalid command

Any idea how to fix this?

Klaus

The Gnuplot-library that is installed with PyFoam uses the first gnuplot-command it finds in the PATH (check with "which gnuplot")

Which Linux are you using (you stated that your "old" installation was an Ubuntu. The current is just called "new Linux")

One frequent problem is that some distros have a generic gnuplot-package that can do no graphics. For plotting windows another package gnuplot-x11 (or similar) is needed. Check if that is the problem in you case

klausb March 8, 2018 07:52

which gnuplot gives me:

/usr/bin/gluplot

When I start gnuplot, gnuplot> plot sin(x) shows the expected graph on screen.

When I use "gnuplot as a function" and enter: gnuplot '-p -e sin(x)' directly in the terminal, the parameter -p is required to get the same result. Without -p, the graph is just showing up for a fraction of a second.

Terminal type is 'wxt'

gschaider March 14, 2018 07:35

Quote:

Originally Posted by klausb (Post 684391)
which gnuplot gives me:

/usr/bin/gluplot

When I start gnuplot, gnuplot> plot sin(x) shows the expected graph on screen.

When I use "gnuplot as a function" and enter: gnuplot '-p -e sin(x)' directly in the terminal, the parameter -p is required to get the same result. Without -p, the graph is just showing up for a fraction of a second.

Terminal type is 'wxt'

By default PyFoam uses the x11-terminal and if that is not there it's got a problem. But you could try to add the option --gnuplot-terminal=wxt

klausb March 15, 2018 10:01

I am using the option: --gnuplot-terminal=wxt

The plot starts but the gnuplot errors in the logfile remain.

gschaider March 15, 2018 14:28

Quote:

Originally Posted by klausb (Post 685338)
I am using the option: --gnuplot-terminal=wxt

The plot starts but the gnuplot errors in the logfile remain.

The "BSR"-errors? No idea. Don't get them with wxt (and without too)


All times are GMT -4. The time now is 07:23.