GEOS-DEV / GEOS-DEV/GEOS

Fracture generation extremely slow in debug

Open
#1,786 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: cleanup / refactor
Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

For example, inputFiles/proppant/ProppantSlotTest_smoke.xml takes multiple minutes for the SurfaceGenerator step.

In particular, most of the time is spent in this code:
https://github.com/GEOSX/GEOSX/blob/be3936d8cbc59ad42a8896d074369490e2864d47/src/coreComponents/mesh/SurfaceElementRegion.cpp#L195-L208

Questions:

  • Why does it need to loop over the entire faceMap, when indices of faces/element that have just been added are available in the function for free? Can't we jut check them against all sets?
  • Does SortedArray really need to check isSorted precondition on every call to find here ? This also takes a crap load of time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with inputFiles/proppant/ProppantSlotTest_smoke.xml and profile the SurfaceGenerator step, then inspect src/coreComponents/mesh/SurfaceElementRegion.cpp lines 195-208. Review the linked SortedArray::find implementation in sortedArrayManipulation.hpp, determine whether these scans and sortedness checks dominate debug time, and validate any improvement against the same smoke test without changing fracture-generation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.