AMReX-Astro / AMReX-Astro/Castro

Modularize the build system

Open
#406 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
340
Forks
105
Avg merge
3d 8h
Merged PRs (30d)
8

Description

One of the main difficulties in writing unit tests (e.g. issue #404) is that we have one monolithic build target in Make.Castro. If we modularized this so that individual components of Castro were built by specific make files, and the result combined at the end into one larger executable if the goal is to build Castro itself, it would be easier to write good unit tests.

One big stumbling block to this is that Castro itself is fairly monolithic at this time. So even though the individual Make.package files are modularized, it is not possible to build only the reactions module (say) without including all of the other machinery in Castro itself. This is also contributing to Castro.H being far too large. Perhaps what we can do to improve on this is to virtualize Castro and have the individual components be derived classes that can operate on this parent class. So, e.g., CastroReactions would be derived from Castro and so you could build just the reactions module and nothing else. Then it would be very easy to just call react_state() without worrying about other source terms, the advance, etc.

Contributor guide

No contributing guide indexed for this repository

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 by reading Make.Castro and the individual Make.package files, then review issue #404 to understand the unit-testing need. Map how Castro.H and the named reactions module currently depend on the monolithic build. Done means components can be built separately and combined into the full Castro executable without unrelated machinery.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.