Skip to content

Commit

Permalink
Draft of submiModels for testing on slurm
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhallquist committed May 5, 2024
1 parent af33f6e commit e4b4c4f
Show file tree
Hide file tree
Showing 11 changed files with 1,004 additions and 17 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ S3method(print,mplus.model)
S3method(print,mplusObject)
S3method(summary,mplus.model)
S3method(summary,mplusObject)
S3method(summary,mplus_submission_df)
S3method(update,mplusObject)
export(HTMLSummaryTable)
export(LatexSummaryTable)
Expand Down Expand Up @@ -90,8 +91,10 @@ importFrom(checkmate,assert_string)
importFrom(checkmate,assert_subset)
importFrom(data.table,":=")
importFrom(data.table,as.data.table)
importFrom(data.table,fread)
importFrom(data.table,fwrite)
importFrom(data.table,is.data.table)
importFrom(data.table,setnames)
importFrom(digest,digest)
importFrom(fastDummies,dummy_cols)
importFrom(graphics,lines)
Expand Down
797 changes: 797 additions & 0 deletions R/submitModels.R

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions man/checkSubmission.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions man/get_job_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions man/local_job_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/minutes_to_dhms.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions man/slurm_job_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions man/submitModels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions man/summary.mplus_submission_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions man/torque_job_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions tests/testthat/test-submitModels.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# examine whether we get
# tests for submitModels

p <- testthat::test_path("submitModels")

# checks on parsing of scheduling arguments and script setup
track <- submitModels(p, sched_args=c("--mail=user", "--export=v"), debug=TRUE)

test_that("submitModels job ID check", {
expect_equal(track$jobid[1], "dummy_1")
})

test_that("submitModels job allocation checks", {
expect_equal(track$memgb[1], 16),
expect_equal(track$cores[1], 2),
expect_equal(track$memgb[1], 16)
expect_equal(track$cores[1], 2)
expect_equal(track$wall_time[1], "3:00:00")
})

# checks on cluster (must be run on slurm cluster!)
track <- submitModels(p,
scheduler = "slurm",
batch_outdir = "/proj/mnhallqlab/users/michael/submitModels_test"
)

0 comments on commit e4b4c4f

Please sign in to comment.