Skip to content

Parallel processing random 'save' error

2 messages · Rguy, William Dunlap

#
That warning looks like it comes from dir.create().  Do you have
code that looks like:
   if (!file.exists(tempDir)) {
      dir.create(tempDir)
   }
If so that could be the problem.  The directory may not exist when file.exists()
is called but by the time dir.create is called another process may have created
it.  Try replacing such code with
    suppressWarnings(dir.create(tempDir))
    if (!isTRUE(file.info(tempDir)$isdir)) {
        stop("Cannot create tempDir=", tempDir)
    }


Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com