Closed Skyzerks closed 6 years ago
Use ./ex1
in the command line instead of ex1
. If you want to avoid adding the ./
, you can add the current directory to your path: PATH=$PATH:.
(if you are using sh/bash) or set path=($path .)
(if you are using csh/tcsh). You can check which shell you are using with echo $SHELL
.
I'm good with the ./(example). Now I have tried to get a visualization with a running GLVis server:
nemo@Skyzerks:/mnt/e/_Workspace/FEM/attempt/mfem-3.4/examples$ export DISPLAY=:0
nemo@Skyzerks:/mnt/e/_Workspace/FEM/attempt/mfem-3.4/examples$ ./ex1 -m ../data/star.mesh
Options used:
--mesh ../data/star.mesh
--order 1
--no-static-condensation
--visualization
Number of finite element unknowns: 20801
Size of linear system: 20801
Iteration : 0 (B r, r) = 0.00111712
Iteration : 1 (B r, r) = 0.00674088
Iteration : 2 (B r, r) = 0.0123008
...
But there seems to be a problem:
nemo@Skyzerks:/mnt/e/_Workspace/FEM/attempt/glvis-3.4$ ./glvis
_/_/_/ _/ _/ _/ _/
_/ _/ _/ _/ _/_/_/
_/ _/_/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/_/
_/_/_/ _/_/_/_/ _/ _/ _/_/_/
Waiting for data on port 19916 ...
Can't connect to display!
Initializing the visualization failed.
What can be the problem here? As a X server I have Xming Server installed. It worked well when I wanted to visualize meshes. The examples builded with CMake have this same problem
Just to confirm -- the following works?
nemo@Skyzerks:/mnt/e/_Workspace/FEM/attempt/glvis-3.4$ ./glvis -m ../mfem-3.4/data/escher.mesh
@tzanio Yes, it does. Screenshot
And you get a DISPLAY error if you just run ./glvis
in the same terminal?
That's very strange...
I run two terminals. The one in the background has the error from the last issue. I didn't rerun it. Here's how it looks after a restart: Screenshot
Can you try in the same terminal, maybe the environment variables are different for some reason?
It's displayed as a one process in Task manager. And how am I supposed to run GLVis server and type in the command for visualization in the same window? In working condition they will be in a continouos state. Task Manager: Full details
I think you need to run ./glvis with the DISPLAY
variable set, e.g., DISPLAY=:0 ./glvis
, or export it first in the same terminal and then run glvis.
@jakubcerveny it worked, thanks. This is so strange. When i run the export DISPLAY=:0
in the same window where I run the command to execute visualization - it worked fine. Even if I don't do it in the other command line before running GLVis server.
Screenshot
The computation program (e.g., ex1
) doesn't need the DISPLAY
variable. What's important is that GLVis gets the variable, whether it is run as a server or a single visualization command. But there may be something else, I've never tried this on Windows.
I'm using "Ubuntu Subsystem for Windows".
I wanted to see the demonstration of mfem example. But after this:
I only get this:
Do I need to install something from the list? Or what should I do next then?