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

When trying to submit some functions with PASolve, dependency checking fails #90

Open
fviale opened this issue Jul 1, 2016 · 1 comment

Comments

@fviale
Copy link
Member

fviale commented Jul 1, 2016

// processing function: 'split_ref'
// finding name : split_ref
// --> found in :.GlobalEnv
// variable split_ref (closure) stored.
[1] "split_ref"
//  --> found globals : [[<-, {, <-, data, dir.create, for, length, library, load, paste0, return, round, setwd, source, splitData
// finding name : [[<-
// --> found in :package:base namespace:base
// finding name : {
// --> found in :package:base namespace:base
// finding name : <-
// --> found in :package:base namespace:base
// finding name : data
// --> found in :package:utils namespace:utils
// finding name : dir.create
// --> found in :package:base namespace:base
// finding name : for
// --> found in :package:base namespace:base
// finding name : length
// --> found in :package:base namespace:base
// finding name : load
// --> found in :package:base namespace:base
// finding name : paste0
// --> found in :package:base namespace:base
// finding name : return
// --> found in :package:base namespace:base
// finding name : round
// --> found in :package:base namespace:base
// finding name : setwd
// --> found in :package:base namespace:base
// finding name : source
// --> found in :package:base namespace:base
// finding name : splitData
// --> found in :.GlobalEnv package:momr namespace:momr
// variable splitData (closure) stored.
[1] "split_ref" "splitData"
// // processing function: 'splitData'
// // finding name : splitData
// // --> found in :.GlobalEnv package:momr namespace:momr
// // variable splitData (closure) stored.
[1] "split_ref" "splitData"
// //  --> found globals : -, $, /, :, [, [<-, {, <-, ==, as.data.frame, c, ceiling, colnames<-, for, if, length, matrix, ncol, nrow, paste, print, save, seq
// // finding name : -
// // --> found in :package:base namespace:base
// // finding name : $
// // --> found in :package:base namespace:base
// // finding name : /
// // --> found in :package:base namespace:base
// // finding name : :
// // --> found in :package:base namespace:base
// // finding name : [
// // --> found in :package:base namespace:base
// // finding name : [<-
// // --> found in :package:base namespace:base
// // finding name : {
// // --> found in :package:base namespace:base
// // finding name : <-
// // --> found in :package:base namespace:base
// // finding name : ==
// // --> found in :package:base namespace:base
// // finding name : as.data.frame
// // --> found in :package:base namespace:base
// // finding name : c
// // --> found in :package:base namespace:base
// // finding name : ceiling
// // --> found in :package:base namespace:base
// // finding name : colnames<-
// // --> found in :package:base namespace:base
// // finding name : for
// // --> found in :package:base namespace:base
// // finding name : if
// // --> found in :package:base namespace:base
// // finding name : length
// // --> found in :package:base namespace:base
// // finding name : matrix
// // --> found in :package:base namespace:base
// // finding name : ncol
// // --> found in :package:base namespace:base
// // finding name : nrow
// // --> found in :package:base namespace:base
// // finding name : paste
// // --> found in :package:base namespace:base
// // finding name : print
// // --> found in :package:base namespace:PARConnector namespace:base
// // finding name : save
// // --> found in :package:base namespace:base
// // finding name : seq
// // --> found in :package:base namespace:base
The environment remotely sent will contain the following variables : 
[1] "split_ref" "splitData"
The following librairies will be loaded : 
NULL
// processing function: 'downsizeMatrix'
// finding name : downsizeMatrix
// --> found in :.GlobalEnv package:momr namespace:momr
// variable downsizeMatrix (closure) stored.
[1] "downsizeMatrix"
//  --> found globals : !, [, {, <-, as.matrix, basename, colnames, dir.create, downsizeMatrix, file.exists, gsub, if, library, load, paste, print, return, save, source, stop, T
// finding name : !
// --> found in :package:base namespace:base
// finding name : [
// --> found in :package:base namespace:base
// finding name : {
// --> found in :package:base namespace:base
// finding name : <-
// --> found in :package:base namespace:base
// finding name : as.matrix
// --> found in :package:base namespace:base
// finding name : basename
// --> found in :package:base namespace:base
// finding name : colnames
// --> found in :package:base namespace:base
// finding name : dir.create
// --> found in :package:base namespace:base
// finding name : downsizeMatrix
// --> found in :.GlobalEnv package:momr namespace:momr
// variable downsizeMatrix (closure) stored.
[1] "downsizeMatrix"
// finding name : file.exists
// --> found in :package:base namespace:base
// finding name : gsub
// --> found in :package:base namespace:base
// finding name : if
// --> found in :package:base namespace:base
// finding name : load
// --> found in :package:base namespace:base
// finding name : paste
// --> found in :package:base namespace:base
// finding name : print
// --> found in :package:base namespace:PARConnector namespace:base
// finding name : return
// --> found in :package:base namespace:base
// finding name : save
// --> found in :package:base namespace:base
// finding name : source
// --> found in :package:base namespace:base
// finding name : stop
// --> found in :package:base namespace:base
// finding name : T
// --> found in :package:base namespace:base
The environment remotely sent will contain the following variables : 
[1] "downsizeMatrix"
The following librairies will be loaded : 
NULL
// processing function: 'mergeResults'
// finding name : mergeResults
// --> found in :.GlobalEnv
// variable mergeResults (closure) stored.
[1] "mergeResults"
//  --> found globals : [, {, <-, colnames, colSums, is.na, mapResults, paste0, save, T
// finding name : [
// --> found in :package:base namespace:base
// finding name : {
// --> found in :package:base namespace:base
// finding name : <-
// --> found in :package:base namespace:base
// finding name : colnames
// --> found in :package:base namespace:base
// finding name : colSums
// --> found in :package:base namespace:base
// finding name : is.na
// --> found in :package:base namespace:base
// finding name : mapResults
// --> found in :.GlobalEnv package:momr namespace:momr
// variable mapResults (closure) stored.
[1] "mapResults"   "mergeResults"
// // processing function: 'mapResults'
// // finding name : mapResults
// // --> found in :.GlobalEnv package:momr namespace:momr
// // variable mapResults (closure) stored.
[1] "mapResults"   "mergeResults"
// //  --> found globals : %%, %in%, :, [, {, <-, ==, as.numeric, c, cbind, data_part_treated, dir, for, gsub, if, length, list, load, order, paste, print, rbind, return, stop, warning
// // finding name : %%
// // --> found in :package:base namespace:base
// // finding name : %in%
// // --> found in :package:base namespace:base
// // finding name : :
// // --> found in :package:base namespace:base
// // finding name : [
// // --> found in :package:base namespace:base
// // finding name : {
// // --> found in :package:base namespace:base
// // finding name : <-
// // --> found in :package:base namespace:base
// // finding name : ==
// // --> found in :package:base namespace:base
// // finding name : as.numeric
// // --> found in :package:base namespace:base
// // finding name : c
// // --> found in :package:base namespace:base
// // finding name : cbind
// // --> found in :package:base namespace:methods namespace:base
// // finding name : data_part_treated
// // finding name : dir
// // --> found in :package:base namespace:base
// // finding name : for
// // --> found in :package:base namespace:base
// // finding name : gsub
// // --> found in :package:base namespace:base
// // finding name : if
// // --> found in :package:base namespace:base
// // finding name : length
// // --> found in :package:base namespace:base
// // finding name : list
// // --> found in :package:base namespace:base
// // finding name : load
// // --> found in :package:base namespace:base
// // finding name : order
// // --> found in :package:base namespace:base
// // finding name : paste
// // --> found in :package:base namespace:base
// // finding name : print
// // --> found in :package:base namespace:PARConnector namespace:base
// // finding name : rbind
// // --> found in :package:base namespace:methods namespace:base
// // finding name : return
// // --> found in :package:base namespace:base
// // finding name : stop
// // --> found in :package:base namespace:base
// // finding name : warning
// // --> found in :package:base namespace:base
// finding name : paste0
// --> found in :package:base namespace:base
// finding name : save
// --> found in :package:base namespace:base
// finding name : T
// --> found in :package:base namespace:base
The environment remotely sent will contain the following variables : 
[1] "mapResults"   "mergeResults"
The following librairies will be loaded : 
NULL
// processing function: 'mergeResults'
// finding name : mergeResults
// --> found in :.GlobalEnv
// variable mergeResults (closure) stored.
[1] "mergeResults"
//  --> found globals : [, {, <-, colnames, colSums, is.na, mapResults, paste0, save, T
// finding name : [
// --> found in :package:base namespace:base
// finding name : {
// --> found in :package:base namespace:base
// finding name : <-
// --> found in :package:base namespace:base
// finding name : colnames
// --> found in :package:base namespace:base
// finding name : colSums
// --> found in :package:base namespace:base
// finding name : is.na
// --> found in :package:base namespace:base
// finding name : mapResults
// --> found in :.GlobalEnv package:momr namespace:momr
// variable mapResults (closure) stored.
[1] "mapResults"   "mergeResults"
// // processing function: 'mapResults'
// // finding name : mapResults
// // --> found in :.GlobalEnv package:momr namespace:momr
// // variable mapResults (closure) stored.
[1] "mapResults"   "mergeResults"
// //  --> found globals : %%, %in%, :, [, {, <-, ==, as.numeric, c, cbind, data_part_treated, dir, for, gsub, if, length, list, load, order, paste, print, rbind, return, stop, warning
// // finding name : %%
// // --> found in :package:base namespace:base
// // finding name : %in%
// // --> found in :package:base namespace:base
// // finding name : :
// // --> found in :package:base namespace:base
// // finding name : [
// // --> found in :package:base namespace:base
// // finding name : {
// // --> found in :package:base namespace:base
// // finding name : <-
// // --> found in :package:base namespace:base
// // finding name : ==
// // --> found in :package:base namespace:base
// // finding name : as.numeric
// // --> found in :package:base namespace:base
// // finding name : c
// // --> found in :package:base namespace:base
// // finding name : cbind
// // --> found in :package:base namespace:methods namespace:base
// // finding name : data_part_treated
// // finding name : dir
// // --> found in :package:base namespace:base
// // finding name : for
// // --> found in :package:base namespace:base
// // finding name : gsub
// // --> found in :package:base namespace:base
// // finding name : if
// // --> found in :package:base namespace:base
// // finding name : length
// // --> found in :package:base namespace:base
// // finding name : list
// // --> found in :package:base namespace:base
// // finding name : load
// // --> found in :package:base namespace:base
// // finding name : order
// // --> found in :package:base namespace:base
// // finding name : paste
// // --> found in :package:base namespace:base
// // finding name : print
// // --> found in :package:base namespace:PARConnector namespace:base
// // finding name : rbind
// // --> found in :package:base namespace:methods namespace:base
// // finding name : return
// // --> found in :package:base namespace:base
// // finding name : stop
// // --> found in :package:base namespace:base
// // finding name : warning
// // --> found in :package:base namespace:base
// finding name : paste0
// --> found in :package:base namespace:base
// finding name : save
// --> found in :package:base namespace:base
// finding name : T
// --> found in :package:base namespace:base
The environment remotely sent will contain the following variables : 
[1] "mapResults"   "mergeResults"
The following librairies will be loaded : 
NULL
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘getName’ for signature ‘"character"’
In addition: Warning messages:
1: In .findAndStoreName(varName, envir = envir, .listpackages = .libraryDependencies,  :
  Could not find object "data_part_treated"
2: In .findAndStoreName(varName, envir = envir, .listpackages = .libraryDependencies,  :
  Could not find object "data_part_treated"
@fviale
Copy link
Member Author

fviale commented Jul 1, 2016

traceback returns the following:

> traceback()
11: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
        sQuote(fdef@generic), sQuote(cnames)), domain = NA)
10: (function (classes, fdef, mtable) 
    {
        methods <- .findInheritedMethods(classes, fdef, mtable)
        if (length(methods) == 1L) 
            return(methods[[1L]])
        else if (length(methods) == 0L) {
            cnames <- paste0("\"", vapply(classes, as.character, 
                ""), "\"", collapse = ", ")
            stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                sQuote(fdef@generic), sQuote(cnames)), domain = NA)
        }
        else stop("Internal error in finding inherited methods; didn't return a unique method", 
            domain = NA)
    })(list("character"), function (object, value) 
    {
        standardGeneric("getName")
    }, <environment>) at pa_inline_functions.r#5
9: getName(task) at PASolve.r#2
8: .compute.task.dependencies(tasklist[[j]], environment()) at PASolve.r#130
7: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch({
       .peekNewSolveId()
       job <- PAJob(jobName, jobDescription)
       setPriority(job, priority)
       task.names <- NULL
       all.tasks <- list()
       for (i in 1:length(dots)) {
           tasklist <- dots[[i]]
           for (j in 1:length(tasklist)) {
               .compute.task.dependencies(tasklist[[j]], environment())
           }
       }
       unordered <- unlist(lapply(task.names, function(x) strtoi(str_sub(x, 
           2))))
       new.indexes <- sort(unordered, index.return = TRUE)
       task.names <- task.names[new.indexes[["ix"]]]
       all.tasks <- all.tasks[new.indexes[["ix"]]]
       for (i in 1:length(all.tasks)) {
           addTask(job) <- all.tasks[[i]]
       }
       if (.debug) {
           print("Submitting job : ")
           cat(toString(job))
       }
       jobid <- j_try_catch(client$submit(getJavaObject(job)))
       cat(str_c("Job submitted (id : ", jobid$value(), ")", "\n", 
           " with tasks : ", toString(task.names), "\n"))
       jobresult <- PAJobResult(job, jobid$value(), task.names, 
           client)
       PALastResult(jobresult)
       return(jobresult)
   }, finally = {
       .commitNewSolveId()
   }) at PASolve.r#116
5: PASolve(PAM("mergeResults", "results_109_5M/", "data_trunc_100k_60i", 
       PA("downsizeMatrix", PAS("split_ref", "data_trunc_100k_60i", 
           1:30, input.files = list.files(), output.files = "$USER:profiles_109/data_part_%2%.RData"), 
           "results_109_5M", input.files = c("$USER:profiles_109/data_part_%1%.RData", 
               list.files(pattern = "*.R")), output.files = "$USER:results_109_5M/%1%_result.rda")), 
       input.files = c("$USER:results_109_5M/%3%_result.rda", list.files(pattern = "*.R")), 
       output.files = "data_trunc_100k_60i_down_5M.RData") at total_process.R#2
4: eval(expr, envir, enclos)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
1: source("~/INRA/First_steps/total_process.R")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant