Skip to content

Workgraph debug tools#163

Draft
agoscinski wants to merge 1 commit intomainfrom
debug-workgraph-tools
Draft

Workgraph debug tools#163
agoscinski wants to merge 1 commit intomainfrom
debug-workgraph-tools

Conversation

@agoscinski
Copy link
Collaborator

@agoscinski agoscinski commented Jun 4, 2025

Sometimes one cannot or it is hard to recreate the test example locally. One can get the same information as verdi process report <PK> and the workdirectory to imitate verdi calcjob gotcomputer <PK>. I don't really have time to make a nice printing function in case of the error, but probably it is already helpful to just have the functions as a snippet somewhere

Here also the script I use to now ssh to the CI and run icon

# Use the https://github.com/lhotari/action-upterm action in the ci workflow to ssh to the CI
# Once ssh'ed into the CI run these commands:
# . /home/runner/work/Sirocco/Sirocco/spack/share/spack/setup-env.sh
# spack env activate .
# hatch -e hatch-test.py3.12 shell
# wget https://github.com/agoscinski/icon-testfiles/raw/refs/heads/main/icon_grid_0013_R02B04_R.nc
# mv icon_grid_0013_R02B04_R.nc tests/cases/small-icon/config/ICON/icon_grid_simple.nc
# Then create a script with the content below and `verdi run <SCRIPT>` it

from aiida.common import NotExistent
from sirocco.core import Workflow
from sirocco.workgraph import AiidaWorkGraph
from aiida import load_profile
from pathlib import Path
load_profile()

config_path = "tests/cases/small-icon/config/config.yml"
config_icon_bin = Path("tests/cases/small-icon/config/ICON/bin/icon")
if config_icon_bin.exists():
    config_icon_bin.unlink()

icon_filepath_executable = "/opt/view/bin/icon"

config_icon_bin.symlink_to(Path(icon_filepath_executable))

core_workflow = Workflow.from_config_file(config_path)
aiida_workflow = AiidaWorkGraph(core_workflow)
out = aiida_workflow.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant