Skip to content

Commit

Permalink
fix: --use-hwthread-cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdinkel committed Dec 19, 2024
1 parent d3bb725 commit 994dd13
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/.github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ jobs:
- name: tests
run: |
$PYTHON_PACKAGE_MANAGER activate queens
pytest -v -m "unit_tests or integration_tests or integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes --junitxml=test_junit.xml
# pytest -v -m "unit_tests or integration_tests or integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes --junitxml=test_junit.xml
pytest -v -m "integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes --junitxml=test_junit.xml
2 changes: 1 addition & 1 deletion queens/drivers/fourc_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
gradient_data_processor=None,
post_processor=None,
post_options="",
mpi_cmd="/usr/bin/mpirun --bind-to none",
mpi_cmd="/usr/bin/mpirun --bind-to none --use-hwthread-cpus",
):
"""Initialize FourcDriver object.
Expand Down
23 changes: 23 additions & 0 deletions tests/integration_tests/fourc/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
"""Pytest configuration for 4C integration tests."""

import pytest


@pytest.fixture(name="setup_symbolic_links_fourc", autouse=True)
def fixture_setup_symbolic_links_fourc(fourc_link_paths):
"""Set-up of 4C symbolic links.
Args:
fourc_link_paths (Path): destination for symbolic links to executables
"""
dst_fourc = fourc_link_paths[0]

# create link to default 4C executable location if no link is available
if not dst_fourc.is_symlink():
raise FileNotFoundError("Failed to create link to default 4C location.")

# check if existing link to fourc works and points to a valid file
if not dst_fourc.resolve().exists():
raise FileNotFoundError(
f"The following link seems to be dead: {dst_fourc}\n"
f"It points to (non-existing): {dst_fourc.resolve()}\n"
)
15 changes: 15 additions & 0 deletions tests/integration_tests/fourc/test_fourc_mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ def test_fourc_mc(
# Actual analysis
run_iterator(iterator, global_settings=global_settings)

from pathlib import Path

from queens.utils.config_directories import experiment_directory

experiment_dir = experiment_directory(global_settings.experiment_name)
job_dir = experiment_dir / "1"
import logging

_logger = logging.getLogger(__name__)
_logger.info(list(job_dir.iterdir()))
output_dir = job_dir / "output"
_logger.info(list(output_dir.iterdir()))
print(list(job_dir.iterdir()))
print(list(output_dir.iterdir()))

# Load results
results = load_result(global_settings.result_file(".pickle"))

Expand Down

0 comments on commit 994dd13

Please sign in to comment.