Skip to content

Commit

Permalink
Test new clang-format approach
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Jan 8, 2025
1 parent caaba1d commit 9e30266
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ jobs:
python-version: '3.x' # Specify the Python version you need
- name: Install dependencies
run: |
pip install clang-format-12
pip install clang-format==12.0.1.2
pip install black
- name: Run format check
run: |
source env/bash
VERBOSE=1 CFM=clang-format-12 ./style/format.sh
which clang-format
VERBOSE=1 CFM=clang-format ./style/format.sh
git diff --exit-code --ignore-submodules
cpu:
Expand Down
10 changes: 9 additions & 1 deletion tst/scripts/utils/artemis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Modules
import logging
import os
import shutil
import subprocess
from timeit import default_timer as timer
from .log_pipe import LogPipe
Expand Down Expand Up @@ -119,11 +120,18 @@ def make(cmake_args, make_nproc):

# Function for running Artemis (with MPI)
def run(nproc, input_filename, arguments, restart=None):
logger = logging.getLogger("artemis.run")
# global run_directory
out_log = LogPipe("artemis.run", logging.INFO)

# Build the run command
run_command = ["mpiexec"]
run_command = []
if shutil.which("mpiexec"):
run_command += ["mpiexec"]
elif shutil.which("srun"):
run_command += ["srun"]
else:
logger.error("Launcher executable [mpiexec, srun] not found", exc_info=True)
if use_mpi_oversubscribe:
run_command += ["--oversubscribe"]
run_command += ["-n", str(nproc), os.path.join(artemis_exe_dir, "artemis")]
Expand Down

0 comments on commit 9e30266

Please sign in to comment.