|
MFC
High-fidelity multiphase flow simulation
|
Auto-generated from toolchain/mfc/cli/commands.py
Regenerate with: ./mfc.sh generate
Welcome to the MFC master script. This tool automates and manages building, testing, running, and cleaning of MFC in various configurations on all supported platforms. The README documents this tool and its various commands in more detail. To get started, run ./mfc.sh build -h.
| Command | Alias | Description |
|---|---|---|
build | b | Build MFC and its dependencies. |
run | r | Run a case with MFC. |
test | t | Run MFC's test suite. |
clean | c | Clean build artifacts. |
validate | v | Validate a case file without running. |
new | - | Create a new case from a template. |
params | - | Search and explore MFC case parameters. |
packer | - | Packer utility (pack/unpack/compare). |
completion | - | Install shell tab-completion. |
help | - | Show help on a topic. |
generate | - | Regenerate completion scripts from CLI schema. |
load | - | Loads the MFC environment with source. |
lint | - | Lints and tests all toolchain code. |
format | - | Formats all code after editing. |
spelling | - | Runs the spell checker after editing. |
precheck | - | Run CI lint checks locally before committing. |
interactive | - | Launch interactive menu-driven interface. |
bench | - | Benchmark MFC (for CI). |
bench_diff | - | Compare MFC Benchmarks (for CI). |
count | - | Count LOC in MFC. |
count_diff | - | Compare LOC between branches. |
Alias: b
Build MFC targets with optional GPU support and case optimization.
Usage: ./mfc.sh build [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| -i, --input | (GPU Optimization) Build a version of MFC optimized for a case. | - |
| --case-optimization | (GPU Optimization) Compile MFC targets with some case parameters hard-coded (requires –input). | false |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Alias: r
Run an MFC simulation case interactively or submit as a batch job.
Usage: ./mfc.sh run INPUT [OPTIONS]
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| -g, --gpus | (Optional GPU override) List of GPU #s to use (environment default if unspecified). | - |
| -e, --engine | Job execution/submission engine choice. | interactive |
| -p, --partition | (Batch) Partition for job submission. | - |
| -q, --quality_of_service | (Batch) Quality of Service for job submission. | - |
| -N, --nodes | (Batch) Number of nodes. | 1 |
| -n, --tasks-per-node | Number of tasks per node. | 1 |
| -w, --walltime | (Batch) Walltime. | 01:00:00 |
| -a, --account | (Batch) Account to charge. | - |
| (Batch) Email for job notification. | - | |
| -#, --name | (Batch) Job name. | MFC |
| -s, --scratch | Build from scratch. | false |
| -b, --binary | (Interactive) Override MPI execution binary | - |
| --dry-run | (Batch) Run without submitting batch file. | false |
| --case-optimization | (GPU Optimization) Compile MFC targets with some case parameters hard-coded. | false |
| --no-build | (Testing) Do not rebuild MFC. | false |
| --wait | (Batch) Wait for the job to finish. | false |
| -c, --computer | (Batch) Path to a custom submission file template or one of the built-in templates. | default |
| -o, --output-summary | Output file (YAML) for summary. | - |
| --clean | Clean the case before running. | false |
| --ncu | Profile with NVIDIA Nsight Compute. | - |
| --nsys | Profile with NVIDIA Nsight Systems. | - |
| --rcu | Profile with ROCM rocprof-compute. | - |
| --rsys | Profile with ROCM rocprof-systems. | - |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Alias: t
Run MFC's test suite with various filtering and generation options.
Usage: ./mfc.sh test [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| -g, --gpus | (Optional GPU override) List of GPU #s to use (environment default if unspecified). | - |
| -l, --list | List all available tests. | - |
| -f, --from | First test UUID to run. | - |
| -t, --to | Last test UUID to run. | - |
| -o, --only | Only run tests with specified properties. | [] |
| -a, --test-all | Run the Post Process Tests too. | false |
| -%, --percent | Percentage of tests to run. | 100 |
| -m, --max-attempts | Maximum number of attempts to run a test. | 1 |
| --rdma-mpi | Run tests with RDMA MPI enabled | false |
| --no-build | (Testing) Do not rebuild MFC. | false |
| --no-examples | Do not test example cases. | false |
| --case-optimization | (GPU Optimization) Compile MFC targets with some case parameters hard-coded. | false |
| --dry-run | Build and generate case files but do not run tests. | false |
| --generate | (Test Generation) Generate golden files. | false |
| --add-new-variables | (Test Generation) If new variables are found in D/ when running tests, add them to the golden files. | false |
| --remove-old-tests | (Test Generation) Delete test directories that are no longer needed. | false |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Alias: c
Remove build artifacts and cache files.
Usage: ./mfc.sh clean [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Alias: v
Check a case file for syntax errors and constraint violations.
Usage: ./mfc.sh validate INPUT [OPTIONS]
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
Examples:
Create a new simulation case directory from a built-in or example template.
Usage: ./mfc.sh new [NAME] [OPTIONS]
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -t, --template | Template to use (e.g., 1D_minimal, 2D_minimal, 3D_minimal, or example:<name>). | 1D_minimal |
| -l, --list | List available templates. | - |
Examples:
Search, list, and get information about MFC's ~3,300 case parameters.
Usage: ./mfc.sh params [QUERY] [OPTIONS]
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -t, --type | Filter by type: int, real, log, str. | - |
| -f, --families | List parameter families (grouped by prefix). | false |
| -F, --features | List feature groups (mhd, bubbles, weno, etc.). | false |
| --feature | Show all parameters for a feature group (e.g., –feature mhd). | - |
| --names-only | Only search parameter names (not descriptions). | false |
| -c, --count | Show count statistics only. | false |
| -n, --limit | Maximum number of results to show (default: unlimited). | 10000 |
| -d, --describe | Show parameter descriptions. | false |
Examples:
Pack simulation output into a single file or compare packed files.
Usage: ./mfc.sh packer [OPTIONS]
Examples:
Subcommands:
Pack a case into a single file.
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -o, --output | Base name of output file. | - |
Compare two cases.
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -rel, --reltol | Relative tolerance. | 1e-12 |
| -abs, --abstol | Absolute tolerance. | 1e-12 |
Install or manage shell tab-completion for MFC commands.
Usage: ./mfc.sh completion [COMPLETION_ACTION] [COMPLETION_SHELL] [OPTIONS]
Arguments:
Examples:
Show help on a topic.
Usage: ./mfc.sh help [TOPIC] [OPTIONS]
Arguments:
Regenerate shell completion scripts, documentation, and JSON schema from the CLI schema.
Usage: ./mfc.sh generate [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| --check | Check if generated files are up to date (exit 1 if not). | false |
| --json-schema | Generate JSON Schema for IDE auto-completion of case files. | false |
Examples:
Run pylint and unit tests on MFC's toolchain Python code.
Usage: ./mfc.sh lint [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| --no-test | Skip running unit tests (only run pylint). | - |
Examples:
Format all code in the repository.
Usage: ./mfc.sh format [OPTIONS]
Examples:
Check spelling in the codebase.
Usage: ./mfc.sh spelling [OPTIONS]
Examples:
Count LOC in MFC.
Usage: ./mfc.sh count [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Compare LOC between branches.
Usage: ./mfc.sh count_diff [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Benchmark MFC (for CI).
Usage: ./mfc.sh bench [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
| -t, --targets | Space-separated list of targets to act upon. | pre_process, simulation, post_process |
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| -g, --gpus | (Optional GPU override) List of GPU #s to use (environment default if unspecified). | - |
| -o, --output | Path to the YAML output file to write the results to. | - |
| -m, --mem | Memory per task for benchmarking cases | 1 |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Examples:
Compare MFC Benchmarks (for CI).
Usage: ./mfc.sh bench_diff LHS RHS [OPTIONS]
Arguments:
Options:
| Option | Description | Default |
|---|---|---|
| -j, --jobs | Allows for JOBS concurrent jobs. | 1 |
| -v, --verbose | Increase output verbosity (-v, -vv, -vvv for more detail). | 0 |
| -d, --debug-log | Enable Python toolchain debug logging (not MFC code). | - |
| --mpi, --no-mpi | Enable/disable MPI | true |
| --gpu [acc/mp], --no-gpu | Enable GPU (OpenACC/OpenMP) | no |
| --debug, --no-debug | Build with debug compiler flags | false |
Load MFC environment modules (use with source).
Usage: ./mfc.sh load [OPTIONS]
Examples:
Launch an interactive menu for MFC operations.
Usage: ./mfc.sh interactive [OPTIONS]
Many commands share common option sets:
Available targets:
| Flag | Description |
|---|---|
| --mpi / --no-mpi | Enable/disable MPI support |
| --gpu [acc/mp] / --no-gpu | Enable GPU with OpenACC or OpenMP |
| --debug / --no-debug | Build with debug compiler flags |
| --gcov / --no-gcov | Enable code coverage |
| --single / --no-single | Single precision |
| --mixed / --no-mixed | Mixed precision |
Controls output verbosity level:
Enables debug logging for the Python toolchain (mfc.sh internals). This is for troubleshooting the build system, not the MFC simulation code.