Skip to content

Commit

Permalink
Add to missed test
Browse files Browse the repository at this point in the history
Add debug messages for cmake hang on windows command promp
  • Loading branch information
langmm committed Jul 15, 2024
1 parent 4b88d68 commit 9365eb7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ jobs:
== 'mamba')
name: Run cmake test in command prompt (CONDA)
run: CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture
tests/drivers/test_CMakeModelDriver.py
--ygg-debug tests/drivers/test_CMakeModelDriver.py
shell: cmd /C CALL {0}
timeout-minutes: 180
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
Expand Down Expand Up @@ -957,7 +957,7 @@ jobs:
== 'mamba')
name: Run cmake test in command prompt (CONDA)
run: CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture
tests/drivers/test_CMakeModelDriver.py
--ygg-debug tests/drivers/test_CMakeModelDriver.py
shell: cmd /C CALL {0}
timeout-minutes: 180
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
Expand Down Expand Up @@ -1350,7 +1350,7 @@ jobs:
== 'mamba')
name: Run cmake test in command prompt (CONDA)
run: CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture
tests/drivers/test_CMakeModelDriver.py
--ygg-debug tests/drivers/test_CMakeModelDriver.py
shell: cmd /C CALL {0}
timeout-minutes: 180
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
Expand Down Expand Up @@ -1724,7 +1724,7 @@ jobs:
== 'mamba')
name: Run cmake test in command prompt (CONDA)
run: CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture
tests/drivers/test_CMakeModelDriver.py
--ygg-debug tests/drivers/test_CMakeModelDriver.py
shell: cmd /C CALL {0}
timeout-minutes: 180
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
Expand Down Expand Up @@ -2097,7 +2097,7 @@ jobs:
== 'mamba')
name: Run cmake test in command prompt (CONDA)
run: CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture
tests/drivers/test_CMakeModelDriver.py
--ygg-debug tests/drivers/test_CMakeModelDriver.py
shell: cmd /C CALL {0}
timeout-minutes: 180
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
Expand Down
2 changes: 1 addition & 1 deletion utils/test-install-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ jobs:
# run: >-
# pytest --ci --cov-append --nocapture --ygg-debug tests/drivers/test_CMakeModelDriver.py
run: >-
CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
CALL "%CONDA_BAT%" activate test && pytest --ci --cov-append --nocapture --ygg-debug tests/drivers/test_CMakeModelDriver.py
- name: Run cmake test in command prompt (PIP)
timeout-minutes: 180
if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method != 'mamba'
Expand Down
1 change: 1 addition & 0 deletions yggdrasil/drivers/CompiledModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6728,6 +6728,7 @@ def init_model(self):
super(CompiledModelDriver, self).init_model()
# Compile
if not self.skip_compile:
self.debug(f"Building {self.model_file}")
self.build_model(products=self.products)
self.debug(f"Built {self.model_file}")

Expand Down
6 changes: 6 additions & 0 deletions yggdrasil/drivers/ModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,17 @@ def __init__(self, name, args, model_index=0, copy_index=-1, clients=[],
# Parse arguments
self.debug(str(args))
self.parse_arguments(args)
self.debug("Finished self.parse_arguments")
assert self.model_file is not None
# Add wrappers
self.write_wrappers()
# Initialize the model, creating files with inter-process locks
# if necessary
self.locked_file = None
self.debug("Before mpi_init")
with self.mpi_init():
self.init_model()
self.debug("Finished init")

def init_model(self):
r"""Initialize the model executable."""
Expand Down Expand Up @@ -1073,8 +1076,11 @@ def mpi_init(self):
if self._mpi_rank > 0:
self.send_mpi(self.file_locks.message,
tag=self._mpi_tags['FILELOCKS'])
self.debug("Before init lock")
with self.file_locks.locked_condition('init', self):
self.debug("Acquired init lock")
yield
self.debug("Releasing init lock")

@contextlib.contextmanager
def mpi_cleanup(self):
Expand Down

0 comments on commit 9365eb7

Please sign in to comment.