From 64f34f723b7a695aae365234f2aa634b02aab058 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 1 Aug 2024 20:39:52 +0200 Subject: [PATCH 01/21] Update unittests-openmpi.yml --- .github/workflows/unittests-openmpi.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittests-openmpi.yml b/.github/workflows/unittests-openmpi.yml index c67080c5..b9880141 100644 --- a/.github/workflows/unittests-openmpi.yml +++ b/.github/workflows/unittests-openmpi.yml @@ -10,11 +10,21 @@ on: jobs: build: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.operating-system }} strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + include: + - operating-system: macos-latest + python-version: '3.12' + + - operating-system: ubuntu-latest + python-version: '3.12' + + - operating-system: ubuntu-latest + python-version: '3.11' + + - operating-system: ubuntu-latest + python-version: '3.10' steps: - uses: actions/checkout@v4 From f6197d0609d21e75f85e3e7b91a5d2d52a4f78e7 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 1 Aug 2024 20:40:36 +0200 Subject: [PATCH 02/21] Update unittests-mpich.yml --- .github/workflows/unittests-mpich.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittests-mpich.yml b/.github/workflows/unittests-mpich.yml index eaf09c8d..5e9d64a5 100644 --- a/.github/workflows/unittests-mpich.yml +++ b/.github/workflows/unittests-mpich.yml @@ -10,11 +10,21 @@ on: jobs: build: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.operating-system }} strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + include: + - operating-system: macos-latest + python-version: '3.12' + + - operating-system: ubuntu-latest + python-version: '3.12' + + - operating-system: ubuntu-latest + python-version: '3.11' + + - operating-system: ubuntu-latest + python-version: '3.10' steps: - uses: actions/checkout@v4 From b900542af991a751740447bddd9f2ed9e7cda72c Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 2 Aug 2024 18:22:40 +0200 Subject: [PATCH 03/21] Add hostname_localhost parameter --- pylammpsmpi/wrapper/concurrent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pylammpsmpi/wrapper/concurrent.py b/pylammpsmpi/wrapper/concurrent.py index 4a49834f..fdb43d33 100644 --- a/pylammpsmpi/wrapper/concurrent.py +++ b/pylammpsmpi/wrapper/concurrent.py @@ -31,6 +31,7 @@ def execute_async( cmdargs=None, cores=1, oversubscribe=False, + hostname_localhost=False, cwd=None, ): executable = os.path.join( @@ -46,6 +47,9 @@ def execute_async( cores=cores, oversubscribe=oversubscribe, ), + hostname_localhost=hostname_localhost, + prefix_name=None, + prefix_path=None, ) while True: task_dict = future_queue.get() @@ -65,12 +69,14 @@ def __init__( oversubscribe=False, working_directory=".", cmdargs=None, + hostname_localhost=False, ): self.cores = cores self.working_directory = working_directory self._future_queue = Queue() self._process = None self._oversubscribe = oversubscribe + self._hostname_localhost = hostname_localhost self._cmdargs = cmdargs self._start_process() @@ -83,6 +89,7 @@ def _start_process(self): "cores": self.cores, "oversubscribe": self._oversubscribe, "cwd": self.working_directory, + "hostname_localhost": self._hostname_localhost, }, ) self._process.start() From d80fa1115f3a97939474042ed53fd34eaaf65f2f Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 2 Aug 2024 18:27:43 +0200 Subject: [PATCH 04/21] fix tests --- pylammpsmpi/wrapper/ase.py | 5 ++++- pylammpsmpi/wrapper/extended.py | 2 ++ tests/test_ase_interface.py | 23 +++++++++++++++++------ tests/test_base.py | 2 ++ tests/test_concurrent.py | 1 + tests/test_executor.py | 1 + 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/pylammpsmpi/wrapper/ase.py b/pylammpsmpi/wrapper/ase.py index c2c91a77..05f99b30 100644 --- a/pylammpsmpi/wrapper/ase.py +++ b/pylammpsmpi/wrapper/ase.py @@ -21,6 +21,7 @@ def __init__( log_file=None, library=None, diable_log_file=True, + hostname_localhost=False, ): self._logger = logger self._prism = None @@ -45,7 +46,9 @@ def __init__( ) else: self._interactive_library = LammpsBase( - cores=self._cores, working_directory=working_directory + cores=self._cores, + working_directory=working_directory, + hostname_localhost=hostname_localhost, ) def interactive_lib_command(self, command): diff --git a/pylammpsmpi/wrapper/extended.py b/pylammpsmpi/wrapper/extended.py index d9d57239..e5bd833c 100644 --- a/pylammpsmpi/wrapper/extended.py +++ b/pylammpsmpi/wrapper/extended.py @@ -248,6 +248,7 @@ def __init__( client=None, mode="local", cmdargs=None, + hostname_localhost=False, ): self.cores = cores self.working_directory = working_directory @@ -259,6 +260,7 @@ def __init__( oversubscribe=self.oversubscribe, working_directory=self.working_directory, cmdargs=cmdargs, + hostname_localhost=hostname_localhost, ) def __getattr__(self, name): diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index f802f22e..eca5d8cc 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -25,8 +25,9 @@ def test_static(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), diable_log_file=True, + hostname_localhost=True, ) structure = bulk("Al", cubic=True).repeat([2, 2, 2]) lmp.interactive_structure_setter( @@ -84,8 +85,9 @@ def test_small_displacement(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), diable_log_file=True, + hostname_localhost=True, ) structure = bulk("Al", cubic=True) lmp.interactive_structure_setter( @@ -128,8 +130,9 @@ def test_small_displacement_skewed(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), diable_log_file=True, + hostname_localhost=True, ) structure = bulk("Al").repeat([2, 2, 2]) lmp.interactive_structure_setter( @@ -175,6 +178,7 @@ def test_static_with_statement(self): log_file=None, library=None, diable_log_file=True, + hostname_localhost=True, ) as lmp: lmp.interactive_structure_setter( structure=structure, @@ -417,8 +421,9 @@ def test_individual_calculation(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), diable_log_file=True, + hostname_localhost=True, ) lmp.interactive_structure_setter( structure=structure, @@ -442,8 +447,13 @@ def test_interactive_calculation(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, + hostname_localhost=True, ) for structure in self.structure_lst: lmp.interactive_structure_setter( @@ -468,8 +478,9 @@ def test_interactive_calculation_inverse(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local"), + library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), diable_log_file=True, + hostname_localhost=True, ) for structure in self.structure_lst[::-1]: lmp.interactive_structure_setter( diff --git a/tests/test_base.py b/tests/test_base.py index 88ce7bde..0c12671c 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -19,6 +19,7 @@ def setUpClass(cls): oversubscribe=False, working_directory=".", cmdargs=["-cite", cls.citation_file], + hostname_localhost=True, ) cls.lmp.file(cls.lammps_file) @@ -32,6 +33,7 @@ def test_file_not_found(self): oversubscribe=False, working_directory=".", cmdargs=["-cite", self.citation_file], + hostname_localhost=True, ) with self.assertRaises(FileNotFoundError): lmp.file("file_does_not_exist.txt") diff --git a/tests/test_concurrent.py b/tests/test_concurrent.py index 1ffca3c5..9707f823 100644 --- a/tests/test_concurrent.py +++ b/tests/test_concurrent.py @@ -15,6 +15,7 @@ def setUpClass(cls): oversubscribe=False, working_directory=".", cmdargs=["-cite", cls.citation_file], + hostname_localhost=True, ) cls.lmp.file(cls.lammps_file).result() diff --git a/tests/test_executor.py b/tests/test_executor.py index 97812951..51e1bd34 100644 --- a/tests/test_executor.py +++ b/tests/test_executor.py @@ -16,6 +16,7 @@ def calc_lmp(structure): log_file=None, library=None, diable_log_file=True, + hostname_localhost=True, ) lmp.interactive_structure_setter( structure=structure, From ab377bb8254213ab1e0af7982505848b0efe729c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:30:15 +0000 Subject: [PATCH 05/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_ase_interface.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index eca5d8cc..a27d5348 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -25,7 +25,11 @@ def test_static(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, hostname_localhost=True, ) @@ -85,7 +89,11 @@ def test_small_displacement(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, hostname_localhost=True, ) @@ -130,7 +138,11 @@ def test_small_displacement_skewed(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, hostname_localhost=True, ) @@ -421,7 +433,11 @@ def test_individual_calculation(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, hostname_localhost=True, ) @@ -478,7 +494,11 @@ def test_interactive_calculation_inverse(self): comm=None, logger=logging.getLogger("TestStaticLogger"), log_file=None, - library=LammpsLibrary(cores=2, mode="local", hostname_localhost=True,), + library=LammpsLibrary( + cores=2, + mode="local", + hostname_localhost=True, + ), diable_log_file=True, hostname_localhost=True, ) From 6e9d0e1ea79c552436e7bfa6952553f4964bfc94 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 15:52:59 +0200 Subject: [PATCH 06/21] merge changes --- pylammpsmpi/wrapper/ase.py | 4 ++-- pylammpsmpi/wrapper/extended.py | 2 +- tests/test_ase_interface.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pylammpsmpi/wrapper/ase.py b/pylammpsmpi/wrapper/ase.py index bd9f63f7..e8b72905 100644 --- a/pylammpsmpi/wrapper/ase.py +++ b/pylammpsmpi/wrapper/ase.py @@ -34,9 +34,9 @@ def __init__( comm: Optional[object] = None, logger: Optional[object] = None, log_file: Optional[str] = None, - library: Optional[object] = None, + library: Optional[object] = None, disable_log_file: bool = True, - hostname_localhost: bool = False, + hostname_localhost: bool = False, ): self._logger = logger self._prism = None diff --git a/pylammpsmpi/wrapper/extended.py b/pylammpsmpi/wrapper/extended.py index 1cec120c..86f82a40 100644 --- a/pylammpsmpi/wrapper/extended.py +++ b/pylammpsmpi/wrapper/extended.py @@ -257,7 +257,7 @@ def __init__( client: Any = None, mode: str = "local", cmdargs: Optional[list[str]] = None, - hostname_localhost: bool = False, + hostname_localhost: bool = False, ) -> None: self.cores = cores self.working_directory = working_directory diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index 3bd5c381..5eb4f439 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -178,7 +178,7 @@ def test_static_with_statement(self): log_file=None, library=None, disable_log_file=True, - hostname_localhost=True, + hostname_localhost=True, ) as lmp: lmp.interactive_structure_setter( structure=structure, From d1984dafc049dfdff4b6010d234c67d7195f5fec Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 15:55:03 +0200 Subject: [PATCH 07/21] add mac --- .github/workflows/pipeline.yml | 46 ++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3576a8ea..71be1c53 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -89,7 +89,7 @@ jobs: pip install . --no-deps --no-build-isolation pip check - unittest_mpich: + unittest_linux_mpich: needs: [black] runs-on: ubuntu-latest strategy: @@ -113,7 +113,28 @@ jobs: pip install . --no-deps --no-build-isolation python -m unittest discover tests - unittest_openmpi: + unittest_mac_mpich: + needs: [black] + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: '3.13' + miniforge-version: latest + condarc-file: .condarc + environment-file: .ci_support/environment-mpich.yml + - name: Test + shell: bash -l {0} + timeout-minutes: 5 + run: | + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation + python -m unittest discover tests + + unittest_linux_openmpi: needs: [black] runs-on: ubuntu-latest strategy: @@ -137,6 +158,27 @@ jobs: pip install . --no-deps --no-build-isolation python -m unittest discover tests + unittest_mac_openmpi: + needs: [black] + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: '3.13' + miniforge-version: latest + condarc-file: .condarc + environment-file: .ci_support/environment-openmpi.yml + - name: Test + shell: bash -l {0} + timeout-minutes: 5 + run: | + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation + python -m unittest discover tests + unittest_old: needs: [black] runs-on: ubuntu-latest From ba64c250ea2fa6920d510bd8d709a7f6341570b2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:17:05 +0000 Subject: [PATCH 08/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylammpsmpi/wrapper/ase.py | 4 ++-- pylammpsmpi/wrapper/extended.py | 2 +- tests/test_ase_interface.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pylammpsmpi/wrapper/ase.py b/pylammpsmpi/wrapper/ase.py index e8b72905..bd9f63f7 100644 --- a/pylammpsmpi/wrapper/ase.py +++ b/pylammpsmpi/wrapper/ase.py @@ -34,9 +34,9 @@ def __init__( comm: Optional[object] = None, logger: Optional[object] = None, log_file: Optional[str] = None, - library: Optional[object] = None, + library: Optional[object] = None, disable_log_file: bool = True, - hostname_localhost: bool = False, + hostname_localhost: bool = False, ): self._logger = logger self._prism = None diff --git a/pylammpsmpi/wrapper/extended.py b/pylammpsmpi/wrapper/extended.py index 86f82a40..1cec120c 100644 --- a/pylammpsmpi/wrapper/extended.py +++ b/pylammpsmpi/wrapper/extended.py @@ -257,7 +257,7 @@ def __init__( client: Any = None, mode: str = "local", cmdargs: Optional[list[str]] = None, - hostname_localhost: bool = False, + hostname_localhost: bool = False, ) -> None: self.cores = cores self.working_directory = working_directory diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index 5eb4f439..3bd5c381 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -178,7 +178,7 @@ def test_static_with_statement(self): log_file=None, library=None, disable_log_file=True, - hostname_localhost=True, + hostname_localhost=True, ) as lmp: lmp.interactive_structure_setter( structure=structure, From 524260356ce3b8dd7bcc1a5aeaaee68a87f27148 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:25:52 +0200 Subject: [PATCH 09/21] fix dependencies --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 71be1c53..fe1b0b7c 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -201,7 +201,7 @@ jobs: python -m unittest discover tests autobot: - needs: [unittest_old, unittest_openmpi, unittest_mpich, pip_check, coverage] + needs: [unittest_old, unittest_linux_openmpi, unittest_mac_openmpi, unittest_mac_mpich, unittest_linux_mpich, pip_check, coverage] permissions: contents: write pull-requests: write From 10e726aee20da045bf2778295453e45a87c4f1dd Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:29:54 +0200 Subject: [PATCH 10/21] downgrade openmpi --- .github/workflows/pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index fe1b0b7c..11c54beb 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -165,6 +165,9 @@ jobs: - uses: actions/checkout@v4 - name: Conda config run: echo -e "channels:\n - conda-forge\n" > .condarc + - name: Downgrade openmpi + run: + sed -i 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: python-version: '3.13' From 5ebe5e4d88174ce8f49c61a4bc5617d3e4e92ee7 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:30:36 +0200 Subject: [PATCH 11/21] remove unused parameters --- pylammpsmpi/wrapper/concurrent.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pylammpsmpi/wrapper/concurrent.py b/pylammpsmpi/wrapper/concurrent.py index 8c96f8bd..f9e5d65f 100644 --- a/pylammpsmpi/wrapper/concurrent.py +++ b/pylammpsmpi/wrapper/concurrent.py @@ -61,8 +61,6 @@ def execute_async( openmpi_oversubscribe=oversubscribe, ), hostname_localhost=hostname_localhost, - prefix_name=None, - prefix_path=None, ) while True: task_dict = future_queue.get() From a2476bdc8bc42a052916a0cbbcf63c2956644650 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:34:58 +0200 Subject: [PATCH 12/21] fix sed --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 11c54beb..ad50331f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -167,7 +167,7 @@ jobs: run: echo -e "channels:\n - conda-forge\n" > .condarc - name: Downgrade openmpi run: - sed -i 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml + sed -i '' -e 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: python-version: '3.13' From 0a95d82b2ec9aee182dd62c015bf0e7e3ec6ee07 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:39:02 +0200 Subject: [PATCH 13/21] downgrade numpy --- .github/workflows/pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ad50331f..48731787 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -166,8 +166,9 @@ jobs: - name: Conda config run: echo -e "channels:\n - conda-forge\n" > .condarc - name: Downgrade openmpi - run: + run: | sed -i '' -e 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml + sed -i '' -e 's/- numpy =2.3.1/- numpy =1.26.4/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: python-version: '3.13' From b9be91b6a44aa823545926928d1cc5cc9deefad9 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:47:01 +0200 Subject: [PATCH 14/21] disable displacement test --- tests/test_ase_interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index 3bd5c381..9ef6547a 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -1,4 +1,5 @@ import logging +import sys import unittest import numpy as np @@ -123,6 +124,7 @@ def test_small_displacement(self): np.all(np.isclose(lmp.interactive_positions_getter(), positions)) ) + @unittest.skipIf(sys.platform == "darwin", "This test is not supported on MacOs") def test_small_displacement_skewed(self): lmp = LammpsASELibrary( working_directory=None, From cb2d269c7b3a868828e8e507fa2f8d993005328f Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:47:13 +0200 Subject: [PATCH 15/21] Test mac os with Python 3.12 --- .github/workflows/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 48731787..0065782d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -122,7 +122,7 @@ jobs: run: echo -e "channels:\n - conda-forge\n" > .condarc - uses: conda-incubator/setup-miniconda@v3 with: - python-version: '3.13' + python-version: '3.12' miniforge-version: latest condarc-file: .condarc environment-file: .ci_support/environment-mpich.yml @@ -171,7 +171,7 @@ jobs: sed -i '' -e 's/- numpy =2.3.1/- numpy =1.26.4/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: - python-version: '3.13' + python-version: '3.12' miniforge-version: latest condarc-file: .condarc environment-file: .ci_support/environment-openmpi.yml From a9fa861faba4478a5c5cdec8f6ea657f7bef652a Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:49:36 +0200 Subject: [PATCH 16/21] downgrade lammps --- .github/workflows/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0065782d..fb22f0ed 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -169,6 +169,7 @@ jobs: run: | sed -i '' -e 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml sed -i '' -e 's/- numpy =2.3.1/- numpy =1.26.4/g' .ci_support/environment-openmpi.yml + sed -i '' -e 's/- lammps =2024.08.29=*_mpi_openmpi_*/- lammps =2024.06.27=*_mpi_openmpi_*/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: python-version: '3.12' From f0daed3aa0ea632a2752eb407161235580e4b1c6 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:54:46 +0200 Subject: [PATCH 17/21] separate environment --- .ci_support/environment-openmpi-mac.yml | 11 +++++++++++ .github/workflows/pipeline.yml | 7 +------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .ci_support/environment-openmpi-mac.yml diff --git a/.ci_support/environment-openmpi-mac.yml b/.ci_support/environment-openmpi-mac.yml new file mode 100644 index 00000000..3ec70118 --- /dev/null +++ b/.ci_support/environment-openmpi-mac.yml @@ -0,0 +1,11 @@ +channels: +- conda-forge +dependencies: +- coverage +- lammps =2024.06.27=*_mpi_openmpi_* +- openmpi =4.1.6 +- numpy =1.26.4 +- mpi4py =4.1.0 +- executorlib =1.6.0 +- ase =3.25.0 +- scipy =1.15.2 \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index fb22f0ed..7b291863 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -165,17 +165,12 @@ jobs: - uses: actions/checkout@v4 - name: Conda config run: echo -e "channels:\n - conda-forge\n" > .condarc - - name: Downgrade openmpi - run: | - sed -i '' -e 's/- openmpi =5.0.8/- openmpi =4.1.6/g' .ci_support/environment-openmpi.yml - sed -i '' -e 's/- numpy =2.3.1/- numpy =1.26.4/g' .ci_support/environment-openmpi.yml - sed -i '' -e 's/- lammps =2024.08.29=*_mpi_openmpi_*/- lammps =2024.06.27=*_mpi_openmpi_*/g' .ci_support/environment-openmpi.yml - uses: conda-incubator/setup-miniconda@v3 with: python-version: '3.12' miniforge-version: latest condarc-file: .condarc - environment-file: .ci_support/environment-openmpi.yml + environment-file: .ci_support/environment-openmpi-mac.yml - name: Test shell: bash -l {0} timeout-minutes: 5 From eeb28f7e2ff97ed03a989e1df3f8fb6e6db0a90b Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 16:59:08 +0200 Subject: [PATCH 18/21] downgrade mpi4py --- .ci_support/environment-openmpi-mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_support/environment-openmpi-mac.yml b/.ci_support/environment-openmpi-mac.yml index 3ec70118..0a66ee47 100644 --- a/.ci_support/environment-openmpi-mac.yml +++ b/.ci_support/environment-openmpi-mac.yml @@ -5,7 +5,7 @@ dependencies: - lammps =2024.06.27=*_mpi_openmpi_* - openmpi =4.1.6 - numpy =1.26.4 -- mpi4py =4.1.0 +- mpi4py =4.0.1 - executorlib =1.6.0 - ase =3.25.0 - scipy =1.15.2 \ No newline at end of file From 73ca61ff5639a4e972757bf035da3e93872f0161 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 17:01:53 +0200 Subject: [PATCH 19/21] flexible mpi4py --- .ci_support/environment-openmpi-mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_support/environment-openmpi-mac.yml b/.ci_support/environment-openmpi-mac.yml index 0a66ee47..cb3507bc 100644 --- a/.ci_support/environment-openmpi-mac.yml +++ b/.ci_support/environment-openmpi-mac.yml @@ -5,7 +5,7 @@ dependencies: - lammps =2024.06.27=*_mpi_openmpi_* - openmpi =4.1.6 - numpy =1.26.4 -- mpi4py =4.0.1 +- mpi4py - executorlib =1.6.0 - ase =3.25.0 - scipy =1.15.2 \ No newline at end of file From 87b2559ea5cccef9ccc654818e3c28df0dc8b7c6 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 17:03:22 +0200 Subject: [PATCH 20/21] old mpi4py --- .ci_support/environment-openmpi-mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_support/environment-openmpi-mac.yml b/.ci_support/environment-openmpi-mac.yml index cb3507bc..38a33e34 100644 --- a/.ci_support/environment-openmpi-mac.yml +++ b/.ci_support/environment-openmpi-mac.yml @@ -5,7 +5,7 @@ dependencies: - lammps =2024.06.27=*_mpi_openmpi_* - openmpi =4.1.6 - numpy =1.26.4 -- mpi4py +- mpi4py =3.1.6 - executorlib =1.6.0 - ase =3.25.0 - scipy =1.15.2 \ No newline at end of file From e85af4b422aad94016298ca8dae219f0423156b5 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 17 Jul 2025 17:12:14 +0200 Subject: [PATCH 21/21] set task to done --- pylammpsmpi/wrapper/concurrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylammpsmpi/wrapper/concurrent.py b/pylammpsmpi/wrapper/concurrent.py index f9e5d65f..96d79c03 100644 --- a/pylammpsmpi/wrapper/concurrent.py +++ b/pylammpsmpi/wrapper/concurrent.py @@ -65,12 +65,14 @@ def execute_async( while True: task_dict = future_queue.get() if "shutdown" in task_dict and task_dict["shutdown"]: + future_queue.task_done() interface.shutdown(wait=task_dict["wait"]) break elif "command" in task_dict and "future" in task_dict: f = task_dict.pop("future") if f.set_running_or_notify_cancel(): f.set_result(interface.send_and_receive_dict(input_dict=task_dict)) + future_queue.task_done() class LammpsConcurrent: