CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   paraview/paraFoam crash "ill defined primitiveEntry" (http://www.cfd-online.com/Forums/openfoam-paraview/103545-paraview-parafoam-crash-ill-defined-primitiveentry.html)

psosnows June 20, 2012 10:04

paraview/paraFoam crash "ill defined primitiveEntry"
 
Hello ParaViewers,

I just walked into a problem with running paraview/paraFoam for multi-region cases.

OpenFoam 2.1.0
paraview version 3.12.0 (64-bit);
Both installed using apt-get (...)
Running on Ubuntu 10.04 (lucid) 64-bit

When the problem appears:
We have a multi region case (like cthMultiRegionFoam tutorial).
We prep the case, run the simulation and now want to view the results.
Run:
Code:

paraFoam -touchAll
paraview

In "empty" paraview, I choose "Open" and select one of the regions, for example multiRegionHeater{bottomAir}.OpenFOAM
After that, paraview crashes, giving me the error message:
Code:

--> FOAM FATAL IO ERROR:
"ill defined primitiveEntry starting at keyword 'version' on line 10 and ending at line 10"

file: /home/pawel/OpenFOAM/pawel-2.1.0/run/chtMultiRegionFoam/multiRegionHeater/system/controlDict at line 10.

    From function primitiveEntry::readEntry(const dictionary&, Istream&)
    in file lnInclude/IOerror.C at line 132.

FOAM exiting

Segmentation fault

The entries are perfectly fine (no missing space/comas etc.), in fact they were generated by the tutorial (and manually double-checked).

Do you know what may be the problem, and can you please help me overcome it?

Best,
Pawel

wyldckat June 20, 2012 16:48

Greetings Pawel,

What does the file "system/controlDict" have in the "FoamFile" zone, respectively in the line 10? Specifically for the line "version"?
Does it look like this:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}

Additionally, when you open the file "multiRegionHeater{bottomAir}.OpenFOAM" in ParaView, do you have to select the reader to be used to open the file?

Best regards,
Bruno

psosnows June 21, 2012 03:43

Hello Bruno,

controlDict first lines, taken from tutorial case 2.1.0, no changes made:
Code:

FoamFile
{
    version    2.0; // line 10
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}

After running paraview, and opening "multiRegionHeater{bottomAir}.OpenFOAM" I do not have to select anything, program just crashes. Thus it seems for me that FoamReader loads and recognises the files.

I played a bit with this problem and got some interesting results.

First, if I change "version 2.0;" to "version 2;" the error disappears from line 10 and moves to another entry with a dot, like the timeStep. Strangely enough, removing all dots does not help and the program crashes anyway.

Secondly, I managed to open the cases, but using cunning trickstery.
Lest suppose we have a pure multi region case, with no polyMesh directly in constant folder, and no fvFiels directly in system folders (there are separate polyMesh'es in constant/regionX, similar with system/regionX/fvFiels).
We run:
Code:

paraFoam -touchAll
paraFoam

This will of course open paraview with an error ("can not find polyMesh" etc).
We close the error box, delete the "builtin" artificial object, and try to open our regions (not the full case). This time everything works.

It seems to me, that there is some misspell or small bug in paraFoam script, or within foamReader.

Best,
Pawel

wyldckat June 21, 2012 16:33

Hi Pawel,

Ah HA! I now know what the problem really is: you have your Linux installation in a language that isn't the standard English ;)

Allow me to explain:
  • Apparently, in the English language installation, there is a standard where "1000.0" means one thousand.
  • But in many other languages, on thousand is written as "1000,0". The dot in those languages actually stand for "1.000,0".
The reason why paraFoam does the trick is because there is a magic line in the script that runs this code:
Code:

export LC_ALL=C
Which when you run it in your terminal, tells every single application that is launched from it to use the standard Language Code "C", which by default implies the standard one thousand "1000.0".


This is something that was detected some time ago and was meant to be fixed already directly in ParaView. But do to some other stupid bug, the internal fix in ParaView doesn't fix for all Linux installations, only some of them. Therefore, the only fix known to be always efficient is that magic LC_ALL variable :)


So, you have (at least) two choices:
  • Always use paraFoam.
  • Add that magic line to your own "~/.bashrc" file :)
Best regards,
Bruno

psosnows June 22, 2012 03:20

Good morning Bruno!

This is the reason why I did not put this thread to "bug" section- the magic line did the trick :D

Just in my defence I will add that I tried changing dots to comas- did not work. Probably because of the conflict with linux language and the "fix" in paraview.

Anyway, with the LC_ALL in .bashrc the problem is gone.

Thank you very much for your help!

With best regards,
Pawel


All times are GMT -4. The time now is 21:17.