Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy all run and out dirs at once, not in for-loop #3025

Merged
merged 55 commits into from
Jan 21, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1d719d5
move remote copy outside for-loop
Aariq Aug 31, 2022
f3b79bf
put back some mkdir and copy steps
Aariq Aug 31, 2022
ed1d334
go up a directory to copy to outdir/out not outdir/out/out
Aariq Aug 31, 2022
3795f0c
update changelog
Aariq Aug 31, 2022
693e981
only print unique jobids
Aariq Aug 31, 2022
41df050
move copying files back to outside of for loop.
Aariq Aug 31, 2022
5a8f90c
Merged upstream/develop into remote-copy
Aariq Aug 31, 2022
132997f
comments
Aariq Aug 31, 2022
e57dd5d
more todos
Aariq Aug 31, 2022
5678889
Merge branch 'develop' into remote-copy
dlebauer Sep 6, 2022
4286732
added Sys.sleep() b/c settings$host$outdir still not getting copied o…
Aariq Sep 7, 2022
c8b9240
print informative errors
Aariq Sep 7, 2022
7427d16
remove sys.sleep--shouldn't be necessary
Aariq Sep 7, 2022
abbc021
remove non-ascii chars
Aariq Sep 7, 2022
67905b8
Merge branch 'develop' into remote-copy
Aariq Sep 13, 2022
61b50c0
Merge branch 'develop' into remote-copy
Aariq Sep 13, 2022
f45f38e
Merge branch 'develop' into remote-copy
Aariq Sep 15, 2022
b8331a4
add specific comments
Aariq Sep 15, 2022
b73c2f5
copy over just log files
Aariq Sep 15, 2022
f6ba486
comment out custom errors---not quite working. Save for another PR
Aariq Sep 15, 2022
d02858e
fix rsync syntax error
Aariq Sep 15, 2022
17346d9
correct filepath to logs
Aariq Sep 15, 2022
a0baba2
Merged upstream/develop into remote-copy
Aariq Sep 15, 2022
01ac887
Merge branch 'develop' into remote-copy
Aariq Sep 19, 2022
78db328
fix rsync --exclude flag
Aariq Sep 19, 2022
714a698
Merged upstream/remote-copy into remote-copy
Aariq Sep 19, 2022
4bfb1c3
system2 already uses shQuote() internally.
Aariq Sep 19, 2022
3b8a52c
enable informative errors
Aariq Sep 19, 2022
725b991
Merge branch 'develop' into remote-copy
Aariq Sep 26, 2022
dc4a577
Merge branch 'develop' into remote-copy
Aariq Sep 29, 2022
e59188d
copy over only ensemble directories
Aariq Oct 4, 2022
44a1b0b
no need to mkdir, rsync does this
Aariq Oct 4, 2022
a02c00b
try adding a pause??
Aariq Oct 4, 2022
f397c40
Merged upstream/develop into remote-copy
Aariq Oct 13, 2022
b64eb80
Merge branch 'develop' into remote-copy
Aariq Oct 21, 2022
3380b97
Merge branch 'develop' into remote-copy
Aariq Oct 27, 2022
3d4ab9f
Merge branch 'develop' into remote-copy
Aariq Nov 1, 2022
6fa5063
Merge branch 'develop' into remote-copy
Aariq Nov 16, 2022
0d20cc1
copy run dirs first, then out
Aariq Nov 16, 2022
d4b3df2
make rsync errors logger level severe
Aariq Nov 16, 2022
ff1e4af
whoops, fixed prev commit
Aariq Nov 16, 2022
1afd382
wrap initial rsync steps in retry.func()
Aariq Nov 30, 2022
f6f1e34
add sleep to retry
Aariq Nov 30, 2022
93f7155
add more retry
Aariq Dec 1, 2022
780b9f1
document() totally unrelated package
Aariq Dec 12, 2022
76d825b
Merge branch 'develop' into remote-copy
dlebauer Dec 19, 2022
f7d1d0f
Merge branch 'develop' into remote-copy
Aariq Jan 3, 2023
e4289c3
Merge branch 'develop' into remote-copy
Aariq Jan 10, 2023
9141d3b
Merge branch 'develop' into remote-copy
Aariq Jan 10, 2023
c8cda6e
Merge branch 'develop' into remote-copy
Aariq Jan 10, 2023
61dd672
Merge branch 'develop' into remote-copy
Aariq Jan 11, 2023
2b1a3ed
Merge branch 'develop' into remote-copy
robkooper Jan 19, 2023
35eb512
add shQuote(args) back
Aariq Jan 20, 2023
bdf2095
remove rsync status messages
Aariq Jan 20, 2023
aeb0bc0
Merge branch 'develop' into remote-copy
infotroph Jan 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ convert data for a single PFT fixed (#1329, #2974, #2981)
Note that both `units` and `udunits2` interface with the same underlying
compiled code, so the `udunits2` *system library* is still required.
(#2989; @nanu1605)
- Occasionally some run directories were not getting copied over to remote hosts. This should be fixed now (#3025)

### Changed

Expand Down
39 changes: 23 additions & 16 deletions base/workflow/R/start_model_runs.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,35 @@ start_model_runs <- function(settings, write = TRUE, stop.on.error = TRUE) {
jobfile <- NULL
firstrun <- NULL

#Copy all run directories over if not local
if (!is_local) {
# Set up outdir
PEcAn.remote::remote.execute.cmd(
host = settings$host,
cmd = "mkdir",
args = c(
"-p",
dirname(settings$host$outdir)))
# copy over out directories
PEcAn.remote::remote.copy.to(
host = settings$host,
src = file.path(settings$outdir, "out"),
dst = dirname(settings$host$outdir)
)
# copy over run directories
PEcAn.remote::remote.copy.to(
host = settings$host,
src = settings$rundir,
dst = dirname(settings$host$rundir),
delete = TRUE)
}

# launch each of the jobs
for (run in run_list) {
run_id_string <- format(run, scientific = FALSE)
# write start time to database
PEcAn.DB::stamp_started(con = dbcon, run = run)

# if running on a remote cluster, create folders and copy any data
# to remote host
if (!is_local) {
PEcAn.remote::remote.execute.cmd(
host = settings$host,
cmd = "mkdir",
args = c(
"-p",
file.path(settings$host$outdir, run_id_string)))
PEcAn.remote::remote.copy.to(
host = settings$host,
src = file.path(settings$rundir, run_id_string),
dst = settings$host$rundir,
delete = TRUE)
}

# check to see if we use the model launcer
if (is_rabbitmq) {
run_id_string <- format(run, scientific = FALSE)
Expand Down