Here are the sources of some files I made to test examples from the pulsar docs.
Last active
July 21, 2016 04:33
-
-
Save olimay/12ea57440927bbbaeff6d47f4feef5a2 to your computer and use it in GitHub Desktop.
Testing pulsar for CRAN release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(pulsar) | |
library(huge) | |
TEST_DIR = file.path("~","projects", "omake") | |
setwd(TEST_DIR) | |
run_example <- function () { | |
clean_registry() | |
debug(batch.pulsar) | |
pulsar_example() | |
} | |
clean_registry <- function () { | |
unlink(file.path(TEST_DIR, "testtorq"), recursive = TRUE) | |
} | |
hax_fix_filename <- function () { | |
file.rename(file.path(TEST_DIR, "simpletorque.tml"), | |
file.path(TEST_DIR, "simpletorque.tmpl")) | |
} | |
pulsar_example <- function() { | |
## Generate the data with huge: | |
set.seed(10010) | |
p <- 40 ; n <- 1200 | |
dat <- huge.generator(n, p, "hub", verbose = FALSE, v = 0.1, u = 0.3) | |
lams <- getLamPath(0.2, 0.01, len = 40) | |
## Run batch.pulsar on a Torque cluster | |
## Get example template and config files | |
url <- "https://raw.githubusercontent.com/zdk123/pulsar/master/inst/extdata" | |
download.file(paste(url, "BatchJobsTorque.R", sep = "/"), destfile = ".BatchJobs.R") | |
download.file(paste(url, "simpletorque.tml", sep="/"), destfile = "simpletorque.tml") | |
hax_fix_filename() ### HAX LOL!!!!!1 | |
## Give each job 1gb of memory and a limit of 30 minutes | |
resources <- list(memory="1GB", nodes="1", walltime="00:30:00") | |
hugeargs <- list(lambda=lams, verbose=FALSE) | |
out.p <- batch.pulsar(dat$data, fun=huge::huge, fargs=hugeargs, | |
rep.num=100, criterion=c('stars', 'gcd'), | |
job.res=resources, regdir=file.path(getwd(), "testtorq")) | |
plot(out.p) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run the code right now, I get the following conditions:
Here's the line (in batch.pulsar) that throws the error:
I haven't tried to debug
batchply
just yet.