Plot() doesn't turn up on Linux RedHat 8.0

Hi,

Just installed FreeFem++ 4.12 on a Linux Red Hat 8.0 system, and I tried different 2D and 3D examples. It is strange that plot() does NOT show up although there are no errors.

Is this an issue of Linux or FreeFem installation, can someone help please?
Thank you in advance.

Best,
Yongxing

In some cases you need to use the command line option “-wg” which apparently
means with graphics. This may relate toe mpirun or something .

Thank you @marchywka . Unfortunately, there was still nothing showing up although no errors too. Just to confirm, do you mean this: ?
image

yes, but I just ran the stokes.edp in my examples and it did put up a plot
without the option. If it did not terminate, you can see if it started ffglut,
When the plot is up I have this process tree,

31762 pts/1    S+     0:00 FreeFem++ stokes.edp
31763 pts/1    S+     0:00 sh -c ffglut
31764 pts/1    S+     0:00 ffglut

I don’t have your outputs, which is something like:

Looks something is wrong with command “ffglut”. Where can I find command ffglut? it cannot be found if I directly run it:
image

The other thing to try is before the plot put in a line “verbosity=1000;”
although I’m not sure that will help. Check your path- I originally had
problems with other stuff before the freefem bins/libs.
“echo $PATH” and see if freefem is on the path, or 'which -a fffglut"

and if you can paste plain text it makes it easier to quote.

which ffglut
/home/ubuntu/dev/freefem/install2/bin//ffglut
marchywka@happy:/home/documents/cpp/proj/freefem/play$ which -a ffglut
/home/ubuntu/dev/freefem/install2/bin//ffglut
marchywka@happy:/home/documents/cpp/proj/freefem/play$ ffglut
^C
marchywka@happy:/home/documents/cpp/proj/freefem/play$ ffglut --help
 Erreur ffglut  [-nv|-v|-vv|-vvv] [-wait 0.5] [-g 512x300+10+10] [-t title] [file]
 err number 100
Aborted (core dumped)

Thank you @marchywka . Yes, I have exported the freefem path, but is ffglut a separate command located in a different directory?

I can only find these files in my …/FreeFem-install directory:
image

Did you try running it with “verbosity=1000;” before the plot?
Curious if it complains.

If you did just did the steps in the README file I think it would
have included make, make check and make install along with
steps to make petsc. A default install probably requires admin/sudo
and if you put it somewhere else it needs tobe on your path.

Try this or something like “find …/… -name ffglut”

find `dirname \`which -a FreeFem++ \`  `
/home/ubuntu/dev/freefem/install2/bin
/home/ubuntu/dev/freefem/install2/bin/ff-get-dep
/home/ubuntu/dev/freefem/install2/bin/ffmedit
/home/ubuntu/dev/freefem/install2/bin/FreeFem++-mpi
/home/ubuntu/dev/freefem/install2/bin/ffmaster
/home/ubuntu/dev/freefem/install2/bin/ff-pkg-download
/home/ubuntu/dev/freefem/install2/bin/cvmsh2
/home/ubuntu/dev/freefem/install2/bin/ff-c++
/home/ubuntu/dev/freefem/install2/bin/FreeFem++
/home/ubuntu/dev/freefem/install2/bin/ff-mpirun
/home/ubuntu/dev/freefem/install2/bin/bamg
/home/ubuntu/dev/freefem/install2/bin/ffglut
/home/ubuntu/dev/freefem/install2/bin/FreeFem++-nw

Yes, verbosity=1000 prints a lot of things without no complains, but not graphs showing up.
It might be a problem of my installation, I used

If you do not have administrator rights or do not want FreeFEM files scattered around on your machine, please use the `--prefix` option, e.g.:
./configure --enable-download --enable-optim --prefix=${HOME}/FreeFem-install

It is weird that I cannot find ffglut in any directory, even in the FreeFem source file directory? :
image

try “which -a FreeFem++”
and see what is iin whatever directory that lists. Do you have a directory
called ~/FreeFem-install? I always tried to avoid “make install” but pointing
into the build directory often becomes a problem :slight_smile:

You can see if it tried to build it, ``

find ../.. -name "*ffglut*" ../../src/Graphics/.deps/ffglut.Po ../../src/Graphics/ffglut.cpp ../../src/Graphics/ffglut.hpp ../../src/Graphics/ffglut.o ../../src/nw/ffglut ../../cmake/modules/ff_define_ffglut_executable.cmake

Yes, I do have FreeFem-install directory, but there is no ffglut* files. However, why there is no ffglut file in the source file?

Look, there are all the files in my ~/src/nw/, which does not have ffglut as shown in yours:

The following is the ouput of which -a FreeFem++:

look at config.log and see if it was missing a dependency

FreeFem-sources-master/examples/mpi$ cat ../../config.log | grep glut | uniq
configure:12664: checking GLUT/glut.h usability
conftest.cpp:62:23: fatal error: GLUT/glut.h: No such file or directory
| #include <GLUT/glut.h>
configure:12664: checking GLUT/glut.h presence
conftest.cpp:29:23: fatal error: GLUT/glut.h: No such file or directory
| #include <GLUT/glut.h>
configure:12664: checking for GLUT/glut.h
configure:12681: checking GL/glut.h usability
configure:12681: checking GL/glut.h presence
configure:12681: checking for GL/glut.h
| char glutInit ();
| return glutInit ();
configure:12731: g++ -o conftest -g  -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG  -DNCHECKPTR   conftest.cpp -lrt  -lglut -lGLU -lGL >&5
| #define PROG_FFGLUT "ffglut"
configure:26144:     progs: FreeFem++-nw bamg cvmsh2  FreeFem++-mpi ffmedit ffglut 
ac_cv_header_GLUT_glut_h=no
ac_cv_header_GL_glut_h=yes
FFGLUTPROG='ffglut'
LIBSGLUT='-lglut -lGLU -lGL'
#define PROG_FFGLUT "ffglut"
marchywka@happy:/home/ubuntu/dev/freefem/FreeFem-sources-master/examples/mpi$ 

Hello
can you tell us how you installed FreeFem++4.12 on Red Hat ? ( I have actually issues :frowning: )
built from source compilation ?
Regards

Looks like something is missing, what can I do now?

follow the instruction at here: GitHub - FreeFem/FreeFem-sources: FreeFEM source code

1 Like

I dont think config.log is lying, try to install freeglut-dev however you
do that on redhat.

After you run ./configure the last output should summarize what it can can’t include.
Make sure you are ok with that.

Try to add fill=true to your plot options
It could be related to this:

I have no problem on my mac arm M1, I think you open gl and glut library are wrong!