Skip to content

Update scripts#298

Draft
schade-shada wants to merge 5 commits intoyoctoyotta1024:mainfrom
schade-shada:update_scripts
Draft

Update scripts#298
schade-shada wants to merge 5 commits intoyoctoyotta1024:mainfrom
schade-shada:update_scripts

Conversation

@schade-shada
Copy link
Copy Markdown

This PR introduces a redesigned scripting system under scripts_2/, replacing the legacy scripts/ workflow for local (vanilla) builds. The new structure separates machine-specific logic from shared common logic, making it straightforward to extend to Levante and other supercomputers in future PRs.

Structure

scripts_2/
├── common/
│   ├── bash/
│   │   ├── build_cleo.sh          # Shared CMake configure step
│   │   ├── compile_cleo.sh        # Shared make/compile step
│   │   └── src/
│   │       ├── build_openmp.sh    # Kokkos OpenMP host flag helper
│   │       ├── build_threads.sh   # Kokkos C++ threads host flag helper
│   │       ├── build_yac.sh       # YAC/YAXT flag helper
│   │       ├── check_inputs.sh    # Input validation utilities
│   │       └── print_configuration.sh
│   └── examples/
│       └── example_params.sh      # Central experiment parameter lookup
└── vanilla/
    ├── build_compile_run_plot_cleo.sh   # Top-level entry point
    └── bash/src/
        ├── build_flags.sh         # Compiler + Kokkos flags (machine-specific)
        └── runtime_settings.sh

Key design decisions

  • Separation of concerns: common/ holds logic that is identical across all machines (CMake invocation, compilation, Kokkos parallelism flags). Machine-specific details (compiler selection, MPI paths, runtime settings) live under vanilla/ and will live under levante/, juwels/, etc. in future.
  • Consolidated build flags (build_flags.sh): The three previously separate files (build_basic.sh, build_openmp.sh, build_threads.sh) are merged into one machine-specific build_flags.sh. It sets compiler flags and then conditionally applies host-parallelism Kokkos flags based on CLEO_BUILDTYPE (serial / openmp / threads).
  • Central experiment registry (example_params.sh): All experiment-specific parameters (build directory, CMake flags, executables, Python script, config file, script arguments) are defined in one place. The top-level script simply passes an experiment name and everything else is resolved automatically.

Future work

  • Add scripts_2/levante/ with Levante-specific build_flags.sh, runtime_settings.sh, and SLURM job scripts, reusing all of scripts_2/common/ unchanged.
  • Similarly extend to juwels/ and other HPC systems.
  • Add a run_cleo.sh wrapper to common/ that invokes the compiled binary directly (currently handled via the Python script's --do_run_executable flag)

Open to suggestions.

@schade-shada schade-shada marked this pull request as draft April 24, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant