CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] paraview/paraFoam crash "ill defined primitiveEntry"

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 5 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2012, 11:04
Default paraview/paraFoam crash "ill defined primitiveEntry"
  #1
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18
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, 17:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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, 04:43
Default
  #3
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18
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, 17:33
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   June 22, 2012, 04:20
Default
  #5
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] "ill defined primitiveEntry starting at keyword Boundary ..... Punt3r OpenFOAM Meshing & Mesh Conversion 3 June 12, 2016 10:16
Additional Variables Defined By User FORTRAN CEL Wheeler CFX 2 August 6, 2013 22:33
What type is defined as the interfaces between stator and stator on OF-2.1.1? renyun0511 OpenFOAM Running, Solving & CFD 3 May 18, 2013 09:11
UDF link fortran source yorelchr Fluent UDF and Scheme Programming 0 February 7, 2013 04:44
Dragging Slice File = Crash cbritan OpenFOAM Bugs 3 January 6, 2011 04:58


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