MFlowCode / MFC

Exascale simulation of multiphase/physics fluid dynamics
https://mflowcode.github.io
MIT License
132 stars 58 forks source link

`./mfc.sh clean` no longer works, change to do the obvious thing #503

Closed sbryngelson closed 4 days ago

sbryngelson commented 1 week ago

running ./mfc.sh clean just triggers an error on my end (see below). Also, ./mfc.sh --help triggers are not useful help message. It seems like it doesn't work as intended anymore. I recommend replacing it with a function that deletes build/ and call it a day.

shb-m1pro-3: Downloads/mfc $ ./mfc.sh clean
mfc: OK > (venv) Entered the Python 3.12.3 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | spencer@shb-m1pro-3.local [Darwin]
     :+   -*-        ==   =* .      | ----------------------------------
   :*+      ==      ++    .+-       |
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 1
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --no-debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process, simulation, and post_process
  .:-=++++===--==+=-+=   +.  :=     |
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/spencer/Downloads/mfc/toolchain/main.py:66 in <module>                                    │
│                                                                                                  │
│   63 │   │                                                                                       │
│   64 │   │   __print_greeting()                                                                  │
│   65 │   │   __checks()                                                                          │
│ ❱ 66 │   │   __run()                                                                             │
│   67 │                                                                                           │
│   68 │   except MFCException as exc:                                                             │
│   69 │   │   cons.reset()                                                                        │
│                                                                                                  │
│ /Users/spencer/Downloads/mfc/toolchain/main.py:51 in __run                                       │
│                                                                                                  │
│   48                                                                                             │
│   49                                                                                             │
│   50 def __run():                                                                                │
│ ❱ 51 │   {"test":   test.test,     "run":        run.run,          "build":      build.build,    │
│   52 │    "clean":  build.clean,   "bench":      bench.bench,      "count":      count.count,    │
│   53 │    "packer": packer.packer, "count_diff": count.count_diff, "bench_diff": bench.diff      │
│   54 │   }[ARG("command")]()                                                                     │
│                                                                                                  │
│ /Users/spencer/Downloads/mfc/toolchain/mfc/build.py:307 in clean                                 │
│                                                                                                  │
│   304                                                                                            │
│   305 def clean(targets = None, case: input.MFCInputFile = None):                                │
│   306 │   targets = get_targets(list(REQUIRED_TARGETS) + (targets or ARG("targets")))            │
│ ❱ 307 │   case    = case or input.load(ARG("input"), ARG("arguments"), {})                       │
│   308 │                                                                                          │
│   309 │   cons.print(__generate_header("Clean", targets))                                        │
│   310 │   cons.print(no_indent=True)                                                             │
│                                                                                                  │
│ /Users/spencer/Downloads/mfc/toolchain/mfc/state.py:62 in ARG                                    │
│                                                                                                  │
│   59 │   if dflt is not None:                                                                    │
│   60 │   │   return dflt                                                                         │
│   61 │                                                                                           │
│ ❱ 62 │   raise KeyError(f"{arg} is not an argument.")                                            │
│   63                                                                                             │
│   64 def ARGS() -> dict:                                                                         │
│   65 │   # pylint: disable=global-variable-not-assigned                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'arguments is not an argument.'

ERROR: An unexpected exception occurred: 'arguments is not an argument.'

./mfc.sh: line 49: 17445 Terminated: 15          python3 "$(pwd)/toolchain/main.py" "$@"

mfc: ERROR > mfc.py finished with a 143 exit code.
mfc: (venv) Exiting the Python virtual environment.