Skip to content

Commit

Permalink
Log job and out_dir (#35)
Browse files Browse the repository at this point in the history
* log job and out_dir

* improve help message

* update CI

* update CI
  • Loading branch information
nhz2 authored Apr 17, 2024
1 parent 2f5ff6d commit 82d9224
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ jobs:
matrix:
version:
- '1.9'
- '~1.10.0-0'
- '1.10'
- '~1.11.0-0'
- 'nightly'
os:
- ubuntu-latest
- windows-latest
- macos-latest
arch:
- x64
include:
- os: macOS-14
version: '1.10'
arch: aarch64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand Down
10 changes: 5 additions & 5 deletions src/cli-parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const CLI_HELP = (
This directory will be created if it does not exist.
Defaults to the current working directory.
--batch=<job index> Run just one of the jobs.
--batch=<job index> Run just one of the jobs.
By default all jobs will run.
--continue Try to continue from existing snapshots
in the output. By default, existing snapshots will
be deleted, and the simulation will start from
scratch.
--continue Try to continue from existing trajectories
in the output.
By default existing trajectories will be deleted
and the jobs will start from scratch.
--help Print out this message.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/run-sim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function start_job(out_dir, job::String;
job_out = mkpath(joinpath(abspath(out_dir), job))
in_new_log_dir(job_out) do
FileWatching.Pidfile.mkpidlock(joinpath(job_out,"traj.lock"); wait=false) do
@info "Starting new job."
@info "Starting new job." job out_dir
@info get_version_string()

# remove old snapshot data
Expand Down Expand Up @@ -189,7 +189,7 @@ function continue_job(out_dir, job;
job_out = mkpath(joinpath(abspath(out_dir), job))
traj = mkpath(joinpath(job_out, "traj"))
in_new_log_dir(job_out) do
@info "Continuing job."
@info "Continuing job." job out_dir
@info get_version_string()
pidlock = try
FileWatching.Pidfile.mkpidlock(joinpath(job_out,"traj.lock"); wait=false)
Expand Down

0 comments on commit 82d9224

Please sign in to comment.