64 bit ubuntu OPenFVM1.0

Help
2008-08-26
2013-04-25
  • Hi,
    I have build OpenFVM1.0 on my 64 bit ubuntu gutsy (AMD). With my gmsh 2.2.4 I seem to fail to generate the mesh files, and OpenFVM dumps core.

    gmsh backstep3D.geo -3 -format msh1
    Info    : 'gmsh backstep3D.geo -3 -format msh1' started on Mon Aug 25 21:46:21 2008
    Info    : Reading 'backstep3D.geo'
    Error   : 'backstep3D.geo', line 53 : Explicit region numbers in layers are deprecated
    Error   : 'backstep3D.geo', line 58 : Explicit region numbers in layers are deprecated
    Error   : 'backstep3D.geo', line 63 : Explicit region numbers in layers are deprecated
    Info    : Read 'backstep3D.geo'
    Info    : Meshing 1D...
    Info    : Meshing curve 1 (Line)
    Info    : Meshing curve 2 (Line)
    Info    : Meshing curve 3 (Line)
    Info    : Meshing curve 4 (Line)
    Info    : Meshing curve 5 (Line)
    Info    : Meshing curve 6 (Line)
    Info    : Meshing curve 7 (Line)
    Info    : Meshing curve 8 (Line)
    Info    : Meshing curve 9 (Line)
    Info    : Meshing curve 10 (Line)
    Info    : Mesh 1D complete (0.148009 s)
    Info    : Mesh
    Info    : Meshing 2D...
    Info    : Meshing surface 12 (transfinite)
    Info    : Meshing surface 14 (transfinite)
    Info    : Meshing surface 16 (transfinite)
    Info    : Meshing surface 25 (extruded)
    Info    : Meshing surface 29 (extruded)
    Info    : Meshing surface 33 (extruded)
    Info    : Meshing surface 37 (extruded)
    Info    : Meshing surface 38 (extruded)
    Info    : Meshing surface 47 (extruded)
    Info    : Meshing surface 55 (extruded)
    Info    : Meshing surface 59 (extruded)
    Info    : Meshing surface 60 (extruded)
    Info    : Meshing surface 73 (extruded)
    Info    : Meshing surface 77 (extruded)
    Info    : Meshing surface 81 (extruded)
    Info    : Meshing surface 82 (extruded)
    Info    : Mesh 2D complete (0.756048 s)
    Info    : Mesh
    Info    : Meshing 3D...
    Info    : Meshing volume 1 (extruded)
    Info    : Meshing volume 2 (extruded)
    Info    : Meshing volume 3 (extruded)
    Info    : Mesh 3D complete (23.0534 s)
    Info    : Mesh
    Info    : 3465676 vertices 3592650 elements
    Info    : Writing 'backstep3D.msh'
    Info    : Wrote 'backstep3D.msh'
    stargate:/home/osman/OpenFVM/Flow/examples/backstep3D-bash-> ../OpenFVM backstep3D f 1

    *****************************************
    *                                       *
    *    OpenFVM-Flow v1.0 - Serial         *
    *                                       *
    *****************************************

    Reading parameters file: backstep3D.par ...

    Variable:                                       [ u v w p T s]
    Interpolation scheme a):                        [ 1 30020 1 1 1 1]

    Variable:                                       [ u v w p T s]
    Interpolation scheme a):                        [ 1 30040 1 1 1 1]

    Variable:                                       [ u v w p T s]
    Interpolation scheme a):                        [ 1 1 0 1 0 0]

    Stop simulation at end time.

    Variable:                                       [ u v w p T s]
    Convergence criterion for steady state:         [ +1.000E-06 +3.020E+04 +1.000E+00 +1.000E-06 +1.000E-06 +1.000E-06]

    Variable:                                       [ u v w p T s]
    Convergence criterion for steady state:         [ +1.000E+00 +3.020E+04 +1.000E+00 +1.000E-06 +1.000E-06 +1.000E-06]

    Variable:                                       [ u v w p T s]
    Convergence criterion for steady state:         [ +8.000E-01 +3.040E+04 +1.000E+00 +1.000E-06 +1.000E-06 +1.000E-06]

    Variable:                                       [ u v w p T s]
    Convergence criterion for steady state:         [ +1.000E+00 +3.045E+04 +1.000E+00 +1.000E-06 +1.000E-06 +1.000E-06]

    Variable:                                       [ u v w p T s]
    Convergence criterion for steady state:         [ +0.000E+00 +0.000E+00 +0.000E+00 +0.000E+00 +0.000E+00 +0.000E+00]

    Save face - vector magnitude:                   [no]

    Variable:                                       [ u v w p T s]
    Save scalars in cell:                           [ 0 0 0 0 0 0]

    Save cell center - vector:                      [yes]

    Axis:                                           [ x y z]
    Save vorticity:                                 [ 0 0 0]

    Save stream function in xy plane

    Variable:                                       [ u v w p T s]
    Probe options:                                  [ 0 0 0 0 0 0]

    Maximum number of non-orthogonal corrections:   0

    Variable:                                       [ u v w p T s]
    Matrix solution tolerance:                      [ +1.000E-08 +3.060E+04 +1.000E+00 +1.000E-08 +1.000E-08 +1.000E-08]

    Variable:                                       [ u v w p T s]
    Matrix solution tolerance:                      [ +5.000E+03 +3.065E+04 +1.000E+00 +1.000E-08 +1.000E-08 +1.000E-08]

    Variable:                                       [ u v w p T s]
    Matrix solution tolerance:                      [ +7.000E+00 +7.000E+00 +7.000E+00 +7.000E+00 +7.000E+00 +3.000E+00]

    Variable:                                       [ u v w p T s]
    Pre-conditioner: d)                             [ 4 4 4 4 4 4]

    Interface scheme factor:                        1.000

    Number of CICSAM corrections:                   2

    Start time:                                     +0.000E+00 s

    End time:                                       +1.000E+00 s

    Time interval:                                  +1.000E-02 s

    Gravity vector (x):                             +0.000E+00 m/s^2
    Gravity vector (y):                             +0.000E+00 m/s^2
    Gravity vector (z):                             +0.000E+00 m/s^2

    a) Interpolation scheme list
    0-UDS
    1-CDS

    b) Time advancement method list
    0-Explicit Euler
    1-Implicit Euler
    2-Crank Nicolson

    c) Solvers list
    0-Jacobi
    1-SOR
    2-QMR
    3-GMRES
    4-CG
    5-CGN
    6-CGS
    7-BiCG
    8-BiCGSTAB

    d) Pre-conditioners list
    0-None
    1-Jacobi
    2-SOR
    3-ILU

    Done.

    Reading mesh file: backstep3D.msh ...
    Done.
    *** glibc detected *** ../OpenFVM: realloc(): invalid next size: 0x00000000006541d0 ***
    ======= Backtrace: =========
    /lib/libc.so.6[0x2ac3e21dc8c2]
    /lib/libc.so.6(realloc+0x129)[0x2ac3e21de979]
    ../OpenFVM[0x40bab6]
    ../OpenFVM[0x4085bb]
    ../OpenFVM[0x40b06f]
    ../OpenFVM[0x4052a8]
    /lib/libc.so.6(__libc_start_main+0xf4)[0x2ac3e2186b44]
    ../OpenFVM[0x401369]
    ======= Memory map: ========
    00400000-00452000 r-xp 00000000 08:06 317652                             /home/osman/OpenFVM/Flow/examples/OpenFVM
    00652000-00653000 rw-p 00052000 08:06 317652                             /home/osman/OpenFVM/Flow/examples/OpenFVM
    00653000-01381000 rw-p 00653000 00:00 0                                  [heap]
    2ac3e1cca000-2ac3e1ce7000 r-xp 00000000 08:06 129144                     /lib/ld-2.6.1.so
    2ac3e1ce7000-2ac3e1ceb000 rw-p 2ac3e1ce7000 00:00 0
    2ac3e1ee6000-2ac3e1ee8000 rw-p 0001c000 08:06 129144                     /lib/ld-2.6.1.so
    2ac3e1ee8000-2ac3e1f68000 r-xp 00000000 08:06 129156                     /lib/libm-2.6.1.so
    2ac3e1f68000-2ac3e2167000 ---p 00080000 08:06 129156                     /lib/libm-2.6.1.so
    2ac3e2167000-2ac3e2169000 rw-p 0007f000 08:06 129156                     /lib/libm-2.6.1.so
    2ac3e2169000-2ac3e22bb000 r-xp 00000000 08:06 129150                     /lib/libc-2.6.1.so
    2ac3e22bb000-2ac3e24ba000 ---p 00152000 08:06 129150                     /lib/libc-2.6.1.so
    2ac3e24ba000-2ac3e24bd000 r--p 00151000 08:06 129150                     /lib/libc-2.6.1.so
    2ac3e24bd000-2ac3e24bf000 rw-p 00154000 08:06 129150                     /lib/libc-2.6.1.so
    2ac3e24bf000-2ac3e28e5000 rw-p 2ac3e24bf000 00:00 0
    2ac3e2a45000-2ac3e772d000 rw-p 2ac3e2a45000 00:00 0
    2ac3e772d000-2ac3e7743000 r-xp 00000000 08:06 1985820                    /home/osman/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1
    2ac3e7743000-2ac3e7942000 ---p 00016000 08:06 1985820                    /home/osman/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1
    2ac3e7942000-2ac3e7943000 r--p 00015000 08:06 1985820                    /home/osman/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1
    2ac3e7943000-2ac3e7944000 rw-p 00016000 08:06 1985820                    /home/osman/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1
    2ac3e8000000-2ac3e8021000 rw-p 2ac3e8000000 00:00 0
    2ac3e8021000-2ac3ec000000 ---p 2ac3e8021000 00:00 0
    7fffc8dc9000-7fffc8de0000 rw-p 7fffc8dc9000 00:00 0                      [stack]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vdso]
    Aborted (core dumped)
    stargate:/home/osman/OpenFVM/Flow/examples/backstep3D-bash-> 

    any ideas?

    TIA
    -osman         

     
    • x-flow
      x-flow
      2008-08-28

      Hi,

      Does this error happen in other examples?

      Have you tested running the lid example?

      x-flow

       
    • x-flow
      x-flow
      2008-08-29

      There is a problem with file backstep3D.par: the file format was not updated.

      Replace the contents of the file with this:

      $TITL OpenFVM
      $FILE Parameter file
      $PRMT 1 26 Description of $CODE
      30005 1 Convection interpolation scheme  (u v w p T s)
      1 1 1 1 0 1
      30020 1 Binary output
      0
      30040 1 Calculate variable (u v w p T s)
      1 1 0 1 0 0
      30100 1 Steady state
      0
      30105 1 Convergence for steady state solutions  (u v w p T s)
      1E-6 1E-6 1E-6 1E-6 1E-6 1E-6
      30200 1 Adjust time interval
      1
      30201 1 Maximum Courant number
      0.8
      30400 1 Number of saves
      1
      30450 1 Write face scalars (u v w p T s)
      0 0 0 0 0 0
      30455 1 Write face vectors (uvw)
      0
      30460 1 Write element scalars (u v w p T s)
      0 0 0 0 0 0
      30465 1 Write element vectors (uvw)
      1
      30470 1 Write vorticity (x y z)
      0 0 0
      30475 1 Write stream function (xy)
      1
      30485 1 Probe (u v w p T s)
      0 0 0 0 0 0
      30550 1 Maximum number of non-othorgonal corrections
      0
      30600 1 Convergence criterion (matrix solution) (u v w p T s)
      1E-8 1E-8 1E-8 1E-8 1E-8 1E-8
      30601 1 Maximum number of iterations (matrix solution) (u v w p T s)
      5000 5000 5000 5000 5000 5000
      30650 1 Matrix solver (u v w p T s) (0-Jacobi, 1-SOR, 2-QMR, 3-GMRES, 4-CG, 5-CGN, 6-CGS, 7-BiCG, 8-BiCGSTAB)
      3 3 3 4 3 3
      30651 1 Matrix preconditioner (0-Null, 1-Jacobi, 2-SOR, 3-ILU, 4-ASM)
      4 4 4 4 4 4
      30800 1 Interface scheme factor - CICSAM
      1.0
      30900 1 Maximum number of CICSAM corrections
      2
      32000 1 Start time
      0.0
      32001 1 End time
      0.1
      32002 1 Time interval
      0.01
      34000 1 Gravity vector
      0.0 0.0 0.0
      $ENDF

       
    • It happens with every example case!
      I think may be caused by gmsh. Could you post  lid.msh file that you use?

      TIA
      osman

       
      • x-flow
        x-flow
        2008-08-29

        I changed lines in the lid.geo file:

        nx = 2;
        ny = 2;

        to produce a smaller mesh.

        $NOD
        18
        1 0 0 0
        2 1 0 0
        3 1 1 0
        4 0 1 0
        5 1 1 5
        6 0 1 5
        10 0 0 5
        14 1 0 5
        15 1 0.4999999999999932 0
        16 0.5000000000000069 1 0
        17 0 0.5000000000000069 0
        18 0.4999999999999932 0 0
        19 0.5000000000000069 1 5
        20 0 0.5000000000000069 5
        21 0.4999999999999932 0 5
        22 1 0.4999999999999932 5
        27 0.5 0.5 0
        28 0.5 0.5 5
        $ENDNOD
        $ELM
        20
        1 3 33 15 4 5 3 16 19
        2 3 33 15 4 19 16 4 6
        3 3 34 23 4 14 2 18 21
        4 3 34 23 4 21 18 1 10
        5 3 35 19 4 6 20 17 4
        6 3 35 19 4 20 10 1 17
        7 3 36 27 4 5 22 15 3
        8 3 36 27 4 22 14 2 15
        9 3 37 28 4 6 20 28 19
        10 3 37 28 4 19 28 22 5
        11 3 37 28 4 20 10 21 28
        12 3 37 28 4 28 21 14 22
        13 5 39 32 8 27 15 3 16 28 22 5 19
        14 5 39 32 8 17 27 16 4 20 28 19 6
        15 5 39 32 8 18 2 15 27 21 14 22 28
        16 5 39 32 8 1 18 27 17 10 21 28 20
        17 3 38 6 4 3 15 27 16
        18 3 38 6 4 16 27 17 4
        19 3 38 6 4 15 2 18 27
        20 3 38 6 4 27 18 1 17
        $ENDELM

        If you think it is the msh file, try using Gmsh version 1.65.

         
    • x-flow
      x-flow
      2008-08-29

      According to http://geuz.org/gmsh/doc/texinfo/gmsh-full.html#SEC36, the region numbers cannot be specified explicitly anymore in Layer commands.

      So if you really want to use Gmsh version > 1.65, the lid.geo file would look something like:

      Mesh.MshFileVersion=1;

      lc = 0.06;

      dx = 1.0;
      dy = 1.0;
      dz = 5.0;

      nx = 2;
      ny = 2;
      nz = 1;

      cx = dx/nx;
      cy = dy/ny;
      cz = (cx + cy)/2;

      Point(1) = {0.0,0.0,0.0,lc};
      Point(2) = {dx,0.0,0.0,lc};
      Point(3) = {dx,dy,0.0,lc};
      Point(4) = {0.0,dy,0.0,lc};

      Line(1) = {2,3};
      Line(2) = {3,4};
      Line(3) = {4,1};
      Line(4) = {1,2};

      Line Loop(5) = {2,3,4,1};

      Plane Surface(6) = {5};

      out[] = Extrude {0,0,dz} {
        Surface{6};
        Layers { 1 };
        Recombine;
      };

      Transfinite Line {4,10,2,8} = nx + 1 Using Progression 1.0;
      Transfinite Line {3,9,1,11} = ny + 1 Using Progression 1.0;
      Transfinite Line {14,18,13,22} = nz + 1 Using Progression 1.0;

      Transfinite Surface {6} = {3,2,1,4};
      Transfinite Surface {27} = {5,14,2,3};
      Transfinite Surface {15} = {5,3,4,6};
      Transfinite Surface {28} = {6,10,14,5};
      Transfinite Surface {23} = {14,2,1,10};
      Transfinite Surface {19} = {6,10,1,4};

      Recombine Surface {27,23,6,19,15,28};

      // Box volume
      Physical Volume (39) = {out[1]};

      // Top surface
      Physical Surface(33) = {15};

      // Bottom surface
      Physical Surface(34) = {23};

      // Left surface
      Physical Surface(35) = {19};

      // Right surface
      Physical Surface(36) = {27};

      // Front surface
      Physical Surface(37) = {28};

      // Back surface
      Physical Surface(38) = {6};

       
    • No, it wasn't the mesh file. I still got the same failure using your msh file.
      Remade  using gcc.4.1.3 but still the same result.
      -osman

       
    • x-flow
      x-flow
      2008-08-30

      I am not sure what it might be. It might be a bug that occurs 64 bit systems.

      Did you rebuild LASPACK?

      x-flow.

       
    • Yes I have rebuilt laspack. But the core dump has the following line:
      /home/osman/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1

      Now this is the gcc that comes with OpenFOAM and not ubuntu's gcc which is 4.1.3.  It might be coming from the metis lib. I don't know why the serial version requires it. I'll try to re-build that one too.

       
    • rebuilding metis did not help either. But I build  Version 0.1 and that one works!

      -osman

       
      • x-flow
        x-flow
        2008-09-01

        Can you run OpenFVM 1.0 with a small case like lid from gdb?

        First you would have to change both makefiles (serial and LASPACK) for debug (change -O2 to -g).

        x-flow.

         
    • (gdb) bt
      #0  0x00002b018aee1765 in raise () from /lib/libc.so.6
      #1  0x00002b018aee31c0 in abort () from /lib/libc.so.6
      #2  0x00002b018af1a60b in ?? () from /lib/libc.so.6
      #3  0x00002b018af238c2 in ?? () from /lib/libc.so.6
      #4  0x00002b018af25979 in realloc () from /lib/libc.so.6
      #5  0x0000000000414d57 in OctCreateRecursive (node=0x667ce0, Tab=0x667910) at source/octree.c:208
      #6  0x0000000000415539 in OctCreateOctree (min=0x7fff20094270, max=0x7fff20094250, Tab=0x667910,
          nbentities=40) at source/octree.c:337
      #7  0x000000000040d325 in MshConnectFaces () at source/mesh.c:904
      #8  0x0000000000412e9a in MshImportMSH (file=0x666030 "lid.msh") at source/mesh.c:1975
      #9  0x0000000000406677 in main (argc=4, argv=0x7fff20094698) at source/main.c:446
      (gdb)                                                               

       
    • x-flow
      x-flow
      2008-09-02

      I suspect it is a problem with the octree.c file.

      Try replacing octree.c/octree.h with octree.c/octree.h of version 0.1 and check if it works.

      x-flow.

       
      • Yes it does work!  There were quite a few differences but it still worked.

         
    • x-flow
      x-flow
      2008-09-03

      It is not the ideal solution because the older version has memory leaks.

       
    • x-flow
      x-flow
      2008-09-04

      About the Metis library, the serial version doesn't require it but it is there for consistency with the parallel version. You can remove the decomp.c and decomp.h files, remove them from makefile where they appear, comment line libmetis.a in the makefile, remove decomp.h include from main.c file and comment the -d switch.

      Then it works without Metis. It just the decompose the meshes for parallel processing.

       

       
    • Mike McClurg
      Mike McClurg
      2008-10-26

      Hi all!

      I made a change to octree.c that should fix this error. If you're interested in testing, please update to revision 14.

      This is a description of the bug. The 64 bit program would break when reallocating memory for int** ipointer on line 208 of octree.c. The problem is with the size of pointers on 32 bit and 64 bit systems. I changed two lines to read "sizeof (int*)" instead of "sizeof (int)".