CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

paraview/paraFoam crash "ill defined primitiveEntry"

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   June 20, 2012, 10:04
Default paraview/paraFoam crash "ill defined primitiveEntry"
  #1
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 105
Rep Power: 8
psosnows is on a distinguished road
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
psosnows is offline   Reply With Quote

Old   June 20, 2012, 16:48
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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
wyldckat is offline   Reply With Quote

Old   June 21, 2012, 03:43
Default
  #3
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 105
Rep Power: 8
psosnows is on a distinguished road
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
psosnows is offline   Reply With Quote

Old   June 21, 2012, 16:33
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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
vbnhfylbh likes this.
wyldckat is offline   Reply With Quote

Old   June 22, 2012, 03:20
Default
  #5
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 105
Rep Power: 8
psosnows is on a distinguished road
Good morning Bruno!

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

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
psosnows is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] How can I define different zones in ICEM? llrr ANSYS Meshing & Geometry 13 August 4, 2014 20:04
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
OpenFOAM13 for Mac OSX Darwin 104 hjasak OpenFOAM Installation 70 September 24, 2010 05:06


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