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

[OpenFOAM] OpenFOAM-3.0.x: error in foamToVTK (64-bit labels)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By DrFloyd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2016, 07:00
Default OpenFOAM-3.0.x: error in foamToVTK (64-bit labels)
  #1
New Member
 
Join Date: Oct 2014
Posts: 24
Rep Power: 12
DrFloyd is on a distinguished road
Hello to everybody,
I just compiled openfoam 3.0.x in a machine with intel i7-6700hq. Everything went good, but when I use "foamToVtk" I received the follow error:

--> FOAM FATAL ERROR:
floatScalar and/or label are not 4 bytes in size
Hence cannot use binary VTK format. Please use -ascii

From function foamToVTK
in file foamToVTK.C at line 335.

FOAM exiting

Anyone has any idea of how solve this (different from "foamToVtk -ascii"?)
Thankyou for your attention
DrFloyd is offline   Reply With Quote

Old   November 29, 2016, 16:50
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
Quick answer: Apparently you built OpenFOAM 3.0.x with 64-bit labels, which the VTK legacy format does not support when using binary format. That's why the utility is advising you to use the "-ascii" option.

Do you really need 64-bit labels? Do any of your meshes have more than 2^31 elements in them?

PS: I've moved the thread to the OpenFOAM Paraview & paraFoam.
__________________

Last edited by wyldckat; November 29, 2016 at 16:51. Reason: changed forum name...
wyldckat is offline   Reply With Quote

Old   December 1, 2016, 05:59
Default
  #3
New Member
 
Join Date: Oct 2014
Posts: 24
Rep Power: 12
DrFloyd is on a distinguished road
Dear wyldckat,
thankyou for your very clear answer.
wyldckat likes this.
DrFloyd is offline   Reply With Quote

Old   December 1, 2016, 19:45
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
I did forget to mention a few details:
  • If you do need 64-bit labels, e.g. to prepare cases to be executed in another machine that has more RAM, I guess that would be a valid scenario...
  • I did look into enabling 64-bit integers in the VTK format, but sadly it wasn't possible... see the following wiki page for more details on my findings: https://github.com/wyldckat/wyldckat...VTK_FileFormat
  • You can open the cases with 64-bit labels directly in ParaView, if you use OpenFOAM's reader for ParaView.
wyldckat is offline   Reply With Quote

Old   April 10, 2018, 12:42
Default any work around with OpenFOAM v5.x
  #5
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Hey Bruno,

Thank you for explanation and now I understand this problem. It persists in OpenFOAM v5.x. I did my simulations at cluster with OpenFOAM v2.4 and now after the up-gradation to v5.x and I am having the same warning message. I don't have paraFOAM on the local system, therefore, I always use FoamToVTK and currently with ascii, the file size is very big (with ~20 Mio. cells). So do you have any idea with the existing compiled version of OpenFOAM on the cluster?
I tried to compile your commit from github but the output is was again in ascii.

Thanks,
Sandeep
sandeep.pandey is offline   Reply With Quote

Old   April 12, 2018, 20:01
Default
  #6
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
Quick answer: You can try opening the case with the file extension ".foam". For example, create an empty file "case.foam" inside the case folder and then open that file in ParaView. This will make ParaView open the case with the internal ".foam" reader.

If you are going to do this, then try using the more recent versions of ParaView, either 5.4.1 or 5.5.0.
__________________
wyldckat is offline   Reply With Quote

Old   April 13, 2018, 11:20
Default
  #7
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Hi,

Thanks for the reply. Actually, I've tried it with Paraview 5.1.0 (64 bit) but it wasn't able to open the file. Maybe I should give it a try with the version you have mentioned.

Thanks again,
Sandeep
sandeep.pandey is offline   Reply With Quote

Old   April 15, 2018, 18:31
Default
  #8
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
Quick answer:
  • I can't remember which ParaView 5.? minor version, but there was one that didn't open the more recent OpenFOAM cases properly with the ".foam" file reader... but I can't remember which one... maybe it was 5.2? I can't remember...
  • Make sure you bring the whole case into your machine, and if the case is not reconstructed, then use the reader option (shown in the UI) for loading the decomposed case.
  • As of ParaView 5.3 or 5.4, the .foam reader will ignore the "0" time folder by default, unless you choose to also load it.
__________________
wyldckat is offline   Reply With Quote

Old   April 20, 2018, 05:51
Default
  #9
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Thank you for the prompt reply! I end up switching to Linux and start using ParaFOAM. It was an easier option than keep trying or fixing things
sandeep.pandey is offline   Reply With Quote

Reply

Tags
foamtovtk


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
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
How to confirm that OpenFoam runs in 64 bit jdk OpenFOAM Running, Solving & CFD 2 February 5, 2008 05:55


All times are GMT -4. The time now is 03:28.