Skip to content

Commit ce8066e

Browse files
committed
use show.IDs
1 parent 5b9664e commit ce8066e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vignettes/HPC-computing.Rmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Given the above specifications, you may decide that each of the 300 computing no
157157
rc <- 100 # number of times the design row was repeated
158158
Design300 <- expandDesign(Design, repeat_conditions = rc)
159159
Design300
160+
print(Design300, show.IDs = TRUE)
160161
161162
# target replication number for each condition
162163
rep_target <- 10000
@@ -441,16 +442,15 @@ scancel -u <username> # cancel all queued and running jobs for a specific user
441442

442443
This issue is important whenever the HPC cluster has mandatory time/RAM limits for the job submissions, where the array job may not complete within the assigned resources --- hence, if not properly managed, will discard any valid replication information when abruptly terminated. Unfortunately, this is a very likely occurrence, and is largely a function of being unsure about how long each simulation condition/replication will take to complete when distributed across the arrays (some conditions/replications will take longer than others, and it is difficult to be perfectly knowledgeable about this information beforehand) or how large the final objects will grow as the simulation progresses.
443444

444-
To avoid this time/resource waste it is **strongly recommended** to add a `max_time` and/or `max_RAM` argument to the `control` list (see `help(runArraySimulation)` for supported specifications), which are less than the Slurm specifications. These control flags will halt the `runArraySimulation()` executions early and return only the complete simulation results up to this point. However, this will only work if these arguments are *non-trivially less than the allocated Slurm resources*; otherwise, you'll run the risk that the job terminates before the `SimDesign` functions have the chance to store the successfully completed replications. Setting these to around 90-95% of the respective `#SBATCH --time=` and `#SBATCH --mem-per-cpu=` inputs should, however, be sufficient in most cases.
445+
To avoid this time/resource waste it is **strongly recommended** to add a `max_time` argument to the `control` list (see `help(runArraySimulation)` for supported specifications) which is less than the Slurm specifications. This control flag will halt the `runArraySimulation()` executions early and return only the complete simulation results up to this point. However, this will only work if the argument is *non-trivially less than the allocated Slurm resources*; otherwise, you'll run the risk that the job terminates before the `SimDesign` functions have the chance to store the successfully completed replications. Setting this to around 90-95% of the respective `#SBATCH --time=` input should, however, be sufficient in most cases.
445446

446447
```{r eval=FALSE}
447-
# Return successful results up to the 11 hour mark, and terminate early
448-
# if more than 3.5 GB of RAM are required to store the internal results
448+
# Return successful results up to the 11 hour mark
449449
runArraySimulation(design=Design300, replications=replications,
450450
generate=Generate, analyse=Analyse,
451451
summarise=Summarise, iseed=iseed, arrayID=arrayID,
452452
dirname='mysimfiles', filename='mysim',
453-
control=list(max_time="11:00:00", max_RAM="3.5GB"))
453+
control=list(max_time="11:00:00"))
454454
455455
```
456456

@@ -505,7 +505,7 @@ replications_missed <- subset(Missed, select=MISSED_REPLICATIONS)
505505
```
506506

507507
```{r}
508-
subDesign
508+
print(subDesign, show.IDs = TRUE)
509509
replications_missed
510510
```
511511

@@ -526,6 +526,7 @@ table(replications_left)
526526
# new total design and replication objects
527527
Design_total <- rbindDesign(Design300, Design_left, keep.IDs=TRUE)
528528
nrow(Design_total)
529+
print(Design_total, show.IDs = TRUE)
529530
replications_total <- c(replications, replications_left)
530531
table(replications_total)
531532

0 commit comments

Comments
 (0)