0

I went through the existing stackoverflow links regarding this error, but no solution given there is working (and some questions dont have solutions there either)

Here is the problem I am facing: I run Arima models in parallel using mclapply of parallel package. The sample data is being split by key onto different cores and results are clubbed together using do.call + rbind (the server I place the script in has 20 cores of cpu which is passed on to mc.cores field)

Below is my mclapply code:

print('Before lapply') 
data_sub <- do.call(rbind, mclapply(ds,predict_function,mc.cores=num_cores))
print('After lapply')

I get multiple set of values like below as output of 'predict_function'

enter image description here

So basically, I get the file as given above from multiple cores to be send to rbind. The code works perfectly for some part of data. Now, I get another set of data , same like above with same data type of each column, but different value in column 2

enter image description here

data type of each column is given in the column name above.

For the second case, I get below error:

simpleError in charToDate(x): character string is not in a standard unambiguous format

Warning message: In mclapply(ds, predict, mc.cores = num_cores) : scheduled cores 9 encountered errors in user code, all values of the jobs will be affected

I dont see this print: print('After lapply') for the second case, but is visible for first case.

I checked the date column in above dataframe, its in Date format. When I tried unique(df$DATE) it threw all valid values in the format as given above.

What is the cause of the error here? is it the first one due to which mclapply isnt able to rbind the values? Is the warning something we need to understand better?

Any advice would be greatly appreciated.

Varun kadekar
  • 427
  • 6
  • 15
  • It would help if your example was reproducible. From the question at hand it's not clear what the data or code are, which is sort of central piece to this website. :) – Roman Luštrik Sep 20 '19 at 06:35
  • Ah... I wish I could paste the code and data here, but cant due to client confidentiality. Let me see if I can streamline the code and put it here. But meanwhile, any idea why we could get the two errors mentioned there? – Varun kadekar Sep 20 '19 at 09:34
  • You can simulate the data, and it doesn't have to be full blown case. Just enough that reproduces the error. – Roman Luštrik Sep 20 '19 at 12:38

0 Answers0