Skip to content

Commit

Permalink
Merge pull request #38 from lanl/brryan/cfm12
Browse files Browse the repository at this point in the history
Testing issues
  • Loading branch information
brryan authored Jan 9, 2025
2 parents 58815b4 + 127d3d4 commit 42d171c
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
python-version: '3.x' # Specify the Python version you need
- name: Install dependencies
run: |
pip install clang-format==12.0.1.2
pip install black
- name: Run format check
run: |
source env/bash
VERBOSE=1 ./style/format.sh
VERBOSE=1 CFM=clang-format ./style/format.sh
git diff --exit-code --ignore-submodules
cpu:
Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/binary/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/binary_adi/binary_adi.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/collisions/collisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

logger = logging.getLogger("artemis" + __name__[7:]) # set logger name
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/coords/blast.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import h5py
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.pyplot as plt

_nranks = 1
Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/diffusion/alpha_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/diffusion/thermal_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/diffusion/viscous_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/disk/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import h5py
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/disk_nbody/disk_nbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import h5py
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/drag/drag.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import h5py
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/nbody/nbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions tst/scripts/ssheet/ssheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
logging.getLogger("h5py").setLevel(logging.WARNING)
logging.getLogger("matplotlib").setLevel(logging.WARNING)
import scripts.utils.analysis as analysis
import matplotlib

matplotlib.use("Agg") # Use the Agg backend to avoid issues with DISPLAY not being set
import matplotlib.colors as colors
import matplotlib.pyplot as plt

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 42d171c

Please sign in to comment.