From 46e9e2571ae48d490f88094995f3ebb5f1ba6a83 Mon Sep 17 00:00:00 2001 From: Maximilian Dinkel Date: Thu, 19 Dec 2024 08:52:14 +0100 Subject: [PATCH] fix: --use-hwthread-cpus --- .github/workflows/.github-ci.yml | 3 ++- queens/drivers/fourc_driver.py | 2 +- tests/integration_tests/fourc/conftest.py | 25 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.github-ci.yml b/.github/workflows/.github-ci.yml index c04455836..1b088ecd8 100644 --- a/.github/workflows/.github-ci.yml +++ b/.github/workflows/.github-ci.yml @@ -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 diff --git a/queens/drivers/fourc_driver.py b/queens/drivers/fourc_driver.py index 3606b9fcc..42a152e28 100644 --- a/queens/drivers/fourc_driver.py +++ b/queens/drivers/fourc_driver.py @@ -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. diff --git a/tests/integration_tests/fourc/conftest.py b/tests/integration_tests/fourc/conftest.py index 6ebf3798e..fb15794ee 100644 --- a/tests/integration_tests/fourc/conftest.py +++ b/tests/integration_tests/fourc/conftest.py @@ -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" + )