Skip to content

build_tsmp2.sh housekeeping #65

Description

@kvrigor

#53 introduced a new set of options for supporting multiple build configurations. This also introduced a lot of issues in build_tsmp2.sh:

  • The default environment file should be loaded based on the hostname command, which is universally available on *Nix systems unlike $SYSTEMNAME.
  • build_tsmp2.sh should avoid setting machine-specific environment variables (e.g., $SYSTEMNAME and $STAGE). Environment variables should only be set in the environment file.
  • Decide on the canonical way of constructing BUILD_ID. This should encode information about the machine, compiler, and model combination used.
  • Address un-ergonomic and POSIX-violating option handling.
    • build_tsmp2.sh does not use program arguments (i.e. input strings not prefixed with dashes) . Everything is either a short or long option.
    • Devise a much simpler grammar for specifying model combinations and compiler switches. The grammar should also account for GPU and CPU build options.
    • In general, following CLI design best practices is a good idea and will save us from future maintenance headaches.
  • Add a bash linter in CI (e.g. shellcheck) to easily catch mistakes and enforce proper coding style.

This list is a set of TODOs and are not exhaustive; feel free to add more using the comments below. I suggest addressing these issues after #53 and before we move on to fully supporting GPU builds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Housekeeping

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions