Git Product home page Git Product logo

Comments (2)

millerta avatar millerta commented on August 15, 2024

As Erica noticed, the arrays for ssfacelist etc are being overwritten.
Then when excre is called for exodus to write file, there is a seg fault.
Making the arrays larger helps, but excre exits with an error.

The memory allocations for facesets are all tangled up in the Automatic portion of the code. This was a very early iteration for writing facesets which automatically detects and creates facesets on boundary and base mmgetblk lengths on this number.
This Automatic detection part of the code is why the memory allocation and failures vary depending on the mesh and parameters. For dfn octree meshes, there are many more facesets internal to the mesh, than on the boundary.

A major fix would be to skip the Automatic facesets part of code and allocate as each file is read.
A less invasive fix would leave the auto-detect memory allocation in place, but reallocate if needed as files are read.

Better debug options need to be in place and should be based on the user setting ie cmo/setatt/moname/idebug 5
I also recommend adding call mmverify() before exodus exre command. This would look like:

 Found bndry elems and faces:                  2736
 auto_facesets  true
 auto_facesets false but output_facesets true
 mmgetblk sselemlist length:                  8208
 mmgetblk ssfacelist length:                  8208

******** write to faceset arrays *******
 Total read from file:                  8779
 Set tag:                    15  nfaces:                   621
 Current offset to start write:                  8158
 Set new offset:                  8779
 MMVERIFY: Array prolog overwritten
   Array ssfacelist                       in dumpexodusII
   Length=                 8208 , Address=       94911463699280
 MMVERIFY: Array epilog overwritten
   Array ssfacelist                       in dumpexodusII
   Length=                 8208 , Address=       94911463699280
 MMVERIFY: Array epilog overwritten
   Array sselemlist                       in dumpexodusII
   Length=                 8208 , Address=       94911463633504
--------

from lagrit.

millerta avatar millerta commented on August 15, 2024

Currently, the default memory length for exodus side set arrays is 3nouter1 where nouter1 are the number of faces on the mesh boundary. This is fixed by allocating more memory for the arrays, we get another chunk of 3nouter1 size.

Other arrays should have the same check and increment if needed.
For instance, there is a limit of 1000 for the number of facesets.

dumpexodusII.f

       call mmincblk
     &       ('sselemlist',isubname,ipsselemlist,ssinc,ierr)
        if (ierr.ne.0) print*,"mmincblk sselemlist err: ",ierr
        call mmgetlen(ipsselemlist,sslength,ierr)
        if (ierr.ne.0) print*,"mmgetlen sselemlist err: ",ierr

        call mmincblk
     &       ('ssfacelist',isubname,ipssfacelist,ssinc,ierr)
        if (ierr.ne.0) print*,"mmincblk ssfacelist err: ",ierr
        call mmgetlen(ipssfacelist,sslength,ierr)

from lagrit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.