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 46e9e25
Show file tree
Hide file tree
Showing 3 changed files with 28 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
25 changes: 25 additions & 0 deletions tests/integration_tests/fourc/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
"""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
fourc_build_paths_for_gitlab_runner (Path): Several paths that are needed to build 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"
)

0 comments on commit 46e9e25

Please sign in to comment.