CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   Problem converting fluent (.msh) into .foam format with very big mesh (https://www.cfd-online.com/Forums/openfoam-meshing/118589-problem-converting-fluent-msh-into-foam-format-very-big-mesh.html)

Balti May 30, 2013 10:24

Problem converting fluent (.msh) into .foam format with very big mesh
 
Hello,

I have a big mesh (750M of cells and number of faces is 2281418248>2^31=integer max limit)

I have been trying to convert this Fluent .msh file (saved in ASCII) for use in OpenFOAM 2.2.0. I use fluentMeshToFoam.
I obtain this error message:

number of faces: -2112910716


--> FOAM FATAL ERROR:
bad set size -2112910716

From function List<T>::setSize(const label)
in file /common/SnappyHex/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/List.C at line 322.

FOAM aborting


I searched and if you try to read the hexadecimal number 820F8A84 (=2182056580 = number of internal faces that we read in the .msh file) and save it in an integer variable you obtain -2112910716.

So my question is: how can I bypass this problem? I want to export my .msh file into .foam.

Thanks a lot for your future answers

wyldckat June 10, 2013 14:29

Greetings Balti,

Quick question: Are you using OpenFOAM in 32bit or 64bit?

Best regards,
Bruno

Balti June 13, 2013 07:09

Good question... How can I know it ?
I downloaded the source pack 2.2.0 and I followed the instruction from http://www.openfoam.org/download/source.php to compile.

wyldckat June 15, 2013 06:21

Hi Balti,

Run:
Code:

uname -m
If it says "i686" or similar, then you're using 32bit.
If it says "x86_64", then you're using 64bit.

If you are using 32bit, it's only natural that it cannot handle more than 2^31 cells/faces/points.

Best regards,
Bruno

Abracurcix June 16, 2013 22:52

Hello Bruno,
I am having this exact problem too (with OpenFOAM-2.2.x, built on a 64 bit machine with GCC-4.8.1). The wmake scripts do not appear to pick up the FOAM_LABEL64 option in the file OpenFoam-2.2.x/src/OpenFOAM/primitives/ints/label/label.H. Forcing the -DFOAM_LABEL64 option, by including it in ptFlags in wmake/rules/linux64Gcc48/c++ creates problem in building the surfMesh library on OpenFOAM-2.2.x/src. A it stands now, both fluentMeshToFoam and fluent3dMeshTo Foam fail due to the "bad set size"message. Any suggestions, please?

Cheers,
Albert

p.s. If one could judiciously include the FOAM_LABEL64 option, then FOAM_LONG_MAX would be set to a value greater than 2 Billion and the type "label" would be synonymous with long int (instead of int as it is now). I haven't figured out how to do this without breaking other libraries.

Balti June 17, 2013 02:39

Code:

uname -m
gives me "x86_64"

Like "Abracurcix" I tried to modify some configuration files to force the type 'label' to be long int instead of int.
I modified OpenFOAM-2.2.0/wmake/rules/General/general/linux64Gcc/c, and .../linux64Gcc/c++ including -DFOAM_LABEL64 or changing -m32 into -m64 but in each case, it induces some errors during the compilation (I don't have these error messages but I can reproduce it if needed it).

Any suggestions ?

Thanks a lot

wyldckat June 17, 2013 17:10

Greetings to all!

:eek: Then this is related to this thread: http://www.cfd-online.com/Forums/ope...arge-mesh.html

But this is really hard to debug, specially without a machine with a very large amount of RAM, as I said on that other thread, on post #5 :(
Quote:

Originally Posted by wyldckat (Post 434260)
Nonetheless, if your machines do have that amount of RAM or more, I do strongly suggest that you report this on the bug tracker: http://www.openfoam.org/bugs/


@Albert: Gcc 4.8.1? But OpenFOAM 2.2.x doesn't officially support this version of Gcc!

Best regards,
Bruno

Abracurcix June 18, 2013 19:09

Hello Bruno,
The problem is not with Gcc-4.8.1. I've tried building with gcc-4.6 and the same problem (i.e. bad set size) persists. Also, some of the tutorial test cases with the 4.6 and 4.8.1 builds work. The problem, really, is more basic. Enforcing FOAM_LABEL64 breaks the surfMesh library (and some other libraries too). In your email, you indicate that you do not have access to a 1TB RAM machine. Could you please try building with FOAM_LABEL64 turned on and let us know if you have been able to build all the .so libraries and executables?

Thanks,
Albert

wyldckat June 20, 2013 16:43

Hi Albert,

OK, I'll try to have a look into this during the weekend.

Best regards,
Bruno


All times are GMT -4. The time now is 18:11.