Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Fixed chunk size greater than arg length
Browse files Browse the repository at this point in the history
  • Loading branch information
brnleehng committed Feb 17, 2017
1 parent 66d55c0 commit 54cbaeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/doAzureParallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ getparentenv <- function(pkgname) {
remainingtasks <- ntasks %% chunkSize

startIndices <- seq(1, length(argsList), chunkSize)
endIndices <- seq(chunkSize, length(argsList), chunkSize)

if(chunkSize > length(argsList)){
endIndices <- seq(length(argsList), length(argsList))
}
else{
endIndices <- seq(chunkSize, length(argsList), chunkSize)
}

minLength <- min(length(startIndices), length(endIndices))

Expand Down

0 comments on commit 54cbaeb

Please sign in to comment.